io
- isicle.io._check_mol(mol, string_struct)[source]
Check if mol failed to generate. If so, throw error.
- Parameters:
mol (:obj:`~rdkit.Chem.rdchem.Mol’) – RDKit representation of molecule structure.
string_struct (str) – Input used to initialize Mol object.
- isicle.io._load_line_notation(path, func=None, force=False, string=False)[source]
Load line notation representation (InChI, SMILES) from file.
- Parameters:
path (str) – Path to file
force (bool) – Indicate whether to force load input, ignoring errors.
- Returns:
Molecule representation.
- Return type:
- isicle.io._load_mol_from_file(path, func=None)[source]
Load RDKit mol representation from file (pdb, mol, mol2).
- Parameters:
path (str) – Path to supported file.
func (onj)
basename (str)
- Returns:
Molecule representation.
- Return type:
- isicle.io._load_text(path: str)[source]
Load text from file.
- Parameters:
path (str) – Path to text file.
- Returns:
Lines from given text file.
- Return type:
list
- isicle.io.load(path, **kwargs)[source]
Reads in molecule information of the following supported file types: .smi, .inchi, .xyz, .mol, .mol2, .pkl, .pdb. Direct loaders can also be used, see load_* functions for more information.
- Parameters:
path (str) – Path to file with molecule information.
kwargs – Keyword arguments passed to format-specific loaders.
- Returns:
Molecule representation.
- Return type:
GeometryorXYZGeometry
- isicle.io.load_inchi(path, force=False)[source]
Load InChI from file.
- Parameters:
path (str) – Path to file.
force (bool) – Indicate whether to force load input, ignoring errors.
- Returns:
Molecule representation.
- Return type:
- isicle.io.load_joblib(path)[source]
Load joblib file.
- Parameters:
path (str) – Path to pickle.
- Returns:
Previously pickled object instance.
- Return type:
data
- isicle.io.load_mol(path)[source]
Load mol from file.
- Parameters:
path (str) – Path to mol file.
- Returns:
Molecule representation.
- Return type:
- isicle.io.load_mol2(path: str)[source]
Load mol2 from file.
- Parameters:
path (str) – Path to mol2 file.
- Returns:
Molecule representation.
- Return type:
- isicle.io.load_mol_obj(mol_obj)[source]
Load RDKit mol object into geometry instance
- Parameters:
mol_obj (mol) – RDKit mol object
- Returns:
Molecule representation.
- Return type:
- isicle.io.load_pdb(path)[source]
Load PDB from file.
- Parameters:
path (str) – Path to PDB file.
- Returns:
Molecule representation.
- Return type:
- isicle.io.load_pickle(path)[source]
Load pickled file.
- Parameters:
path (str) – Path to pickle.
- Returns:
Previously pickled object instance.
- Return type:
data
- isicle.io.load_smiles(path, force=False)[source]
Load SMILES from file.
- Parameters:
path (str) – Path to file.
force (bool) – Indicate whether to force load input, ignoring errors.
- Returns:
Molecule representation.
- Return type:
- isicle.io.load_xyz(path)[source]
Load XYZ from file.
- Parameters:
path (str) – Path to XYZ file.
- Returns:
Molecule representation.
- Return type:
- isicle.io.save(path, data)[source]
Save molecule, format detected by path extension.
- Parameters:
path (str) – Path to save file. Supported extensions include .pkl, .mfj, .xyz, .mol, .pdb, .inchi, .smi.
data (obj) – Object instance. Must be
Geometryfor .xyz and .mfj.
- isicle.io.save_csv(path, dataframe)[source]
Save pandas.DataFrame as csv file.
- Parameters:
path (str) – Path to output file.
dataframe (
pandas.DataFrame) – Dataframe of results
- isicle.io.save_inchi(path, geom)[source]
Save molecule geometry as InChI file.
- Parameters:
path (str) – Path to output file.
geom (
Geometry) – Molecule representation.
- isicle.io.save_joblib(path, data)[source]
Save object as joblib file.
- Parameters:
path (str) – Path to output file.
data (object) – Aribtrary object instance.
- isicle.io.save_mfj(path, geom)[source]
Save molecule geometry as MFJ file. Must have energy and charge information.
- Parameters:
path (str) – Path to output file.
geom (
Geometry) – orXYZGeometryMolecule representation.
- isicle.io.save_mol(path, geom)[source]
Save molecule geometry as MOL file.
- Parameters:
path (str) – Path to output file.
geom (
Geometry) – Molecule representation.
- isicle.io.save_pdb(path, geom)[source]
Save molecule geometry as PDB file.
- Parameters:
path (str) – Path to output file.
geom (
Geometry) – Molecule representation.
- isicle.io.save_pickle(path, data)[source]
Save object as pickle file.
- Parameters:
path (str) – Path to output file.
data (object) – Aribtrary object instance.