BioSimSpace.IO.readMolecules

BioSimSpace.IO.readMolecules(files, property_map={})

Read a molecular system from file.

Parameters:
  • files (str, [str]) – A file name, or a list of file names.
  • property_map (dict) – A dictionary that maps system “properties” to their user defined values. This allows the user to refer to properties with their own naming scheme, e.g. { “charge” : “my-charge” }
Returns:

system – A molecular system.

Return type:

System

Examples

Load a molecular system from AMBER coordinate and topology files.

>>> import BioSimSpace as BSS
>>> system = BSS.IO.readMolecules(["ala.rst7", "ala.prm7"])

Load the same system, but map the “charge” property to the key “my-charge”.

>>> import BioSimSpace as BSS
>>> system = BSS.IO.readMolecules(["ala.rst7", "ala.prm7"], property_map={"charge" : "my-charge"})
>>> import BioSimSpace as BSS
>>> system = BSS.IO.readMolecules(["ala.rst7", "ala.prm7"])

Load a molecular system from all of the files contained within a directory.

>>> import BioSimSpace as BSS
>>> system = BSS.IO.readMolecules(BSS.IO.glob("dir/*"))