# skchem.io.sdf
Defining input and output operations for sdf files.
skchem.io.sdf.
read_sdf
(sdf, error_bad_mol=False, warn_bad_mol=True, nmols=None, skipmols=None, skipfooter=None, read_props=True, mol_props=False, *args, **kwargs)[source]¶Read an sdf file into a pd.DataFrame.
The function wraps the RDKit ForwardSDMolSupplier object.
Parameters: |
|
---|---|
Returns: | The loaded data frame, with Mols supplied in the structure field. |
Return type: | pandas.DataFrame |
See also
rdkit.Chem.SDForwardMolSupplier skchem.read_smiles
skchem.io.sdf.
write_sdf
(data, sdf, write_cols=True, index_as_name=True, mol_props=False, *args, **kwargs)[source]¶Write an sdf file from a dataframe.
Parameters: |
|
---|
# skchem.io.smiles
Defining input and output operations for smiles files.
skchem.io.smiles.
read_smiles
(smiles_file, smiles_column=0, name_column=None, delimiter='\t', title_line=False, error_bad_mol=False, warn_bad_mol=True, drop_bad_mol=True, *args, **kwargs)[source]¶Read a smiles file into a pandas dataframe.
The class wraps the pandas read_csv function.
Returns: | The loaded data frame, with Mols supplied in the structure field. |
---|---|
Return type: | pandas.DataFrame |
See also
pandas.read_csv skchem.Mol.from_smiles skchem.io.sdf
skchem.io
Module defining input and output methods in scikit-chem.
skchem.io.
read_sdf
(sdf, error_bad_mol=False, warn_bad_mol=True, nmols=None, skipmols=None, skipfooter=None, read_props=True, mol_props=False, *args, **kwargs)[source]¶Read an sdf file into a pd.DataFrame.
The function wraps the RDKit ForwardSDMolSupplier object.
Parameters: |
|
---|---|
Returns: | The loaded data frame, with Mols supplied in the structure field. |
Return type: | pandas.DataFrame |
See also
rdkit.Chem.SDForwardMolSupplier skchem.read_smiles
skchem.io.
write_sdf
(data, sdf, write_cols=True, index_as_name=True, mol_props=False, *args, **kwargs)[source]¶Write an sdf file from a dataframe.
Parameters: |
|
---|
skchem.io.
read_smiles
(smiles_file, smiles_column=0, name_column=None, delimiter='\t', title_line=False, error_bad_mol=False, warn_bad_mol=True, drop_bad_mol=True, *args, **kwargs)[source]¶Read a smiles file into a pandas dataframe.
The class wraps the pandas read_csv function.
Returns: | The loaded data frame, with Mols supplied in the structure field. |
---|---|
Return type: | pandas.DataFrame |
See also
pandas.read_csv skchem.Mol.from_smiles skchem.io.sdf
skchem.io.
write_smiles
(data, smiles_path)[source]¶Write a dataframe to a smiles file.
Parameters: |
|
---|
skchem.io.
read_config
(conf)[source]¶Deserialize an object from a config dict.
Parameters: | conf (dict) – The config dict to deseriailize. |
---|---|
Returns: | object |
Note
config is different from params, in that it specifies the class. The params dict is a subdict in config.
skchem.io.
read_yaml
(conf)[source]¶Deserialize an object from a yaml file, filename or str.
Parameters: | yaml (str or filelike) – The yaml file to deserialize. |
---|---|
Returns: | object |