further refinement of IOUtilities

tweaked writePDB to allow passing of parameters (current environment
and current "set" of molecules) from SimBox or other objects.