Input / Output¶
IO Submodule
-
class
scine_molassembler.io.
LineNotation
¶ Generates
Molecule
instances from line notations of molecules-
enabled
= True¶
-
static
from_canonical_smiles
(canonical_smiles: str) → scine_molassembler.Molecule¶ Construct a single
Molecule
from a canonical SMILES string
-
static
from_inchi
(inchi: str) → scine_molassembler.Molecule¶ Construct a single
Molecule
from an InChI string
-
static
from_isomeric_smiles
(isomeric_smiles: str) → scine_molassembler.Molecule¶ Construct a single
Molecule
from an isomeric SMILES string
-
-
scine_molassembler.io.
read
(filename: str) → scine_molassembler.Molecule¶ Reads a single
Molecule
from a file. Interprets the file format from its extension. Supported formats: - mol: MOLFile V2000 - xyz: XYZ file - cbor/bson/json: Serialization formats of molecules- Parameters
filename – File to read.
-
scine_molassembler.io.
split
(filename: str) → List[scine_molassembler.Molecule]¶ Reads multiple molecules from a file. Interprets the file format from its extension just like read(). Note that serializations of molecules contain only a single
Molecule
. Use read() instead.- Parameters
filename – File to read.
-
scine_molassembler.io.
write
(*args, **kwargs)¶ Overloaded function.
write(filename: str, molecule: scine_molassembler.Molecule, positions: numpy.ndarray[float64[m, 3]]) -> None
Write a
Molecule
and its positions to a file- param filename
File to write to. File format is interpreted from this parameter’s file extension.
- param molecule
Molecule
to write to file- param positions
Positions of molecule’s atoms in bohr
write(filename: str, molecule: scine_molassembler.Molecule) -> None
Write a
Molecule
serialization with the endings json/cbor/bson or a graph representation with ending dot/svg to a file.- param filename
File to write to. File format is interpreted from this parameter’s file extension
- param molecule
Molecule
to write to file