BioSimSpace.IO.readMolecules¶
-
BioSimSpace.IO.
readMolecules
(files, show_warnings=False, property_map={})¶ Read a molecular system from file.
- Parameters
files (str, [str]) – A file name, or a list of file names.
show_warnings (bool) – Whether to show any warnings raised during parsing of the input files.
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
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/*"))
Load a molecular system from GROMACS coordinate and topology files using a custom GROMACS topology directory.
>>> import BioSimSpace as BSS >>> system = BSS.IO.readMolecules(["mol.gro87", "mol.grotop"], property_map={"GROMACS_PATH" : "/path/to/gromacs/topology"})