Functional Group Identification (thermo.functional_groups)

This module contains various methods for identifying functional groups in molecules. This functionality requires the RDKit library to work.

For submitting pull requests, please use the GitHub issue tracker.

Specific molecule matching functions

thermo.functional_groups.is_organic(mol, restrict_atoms=None, organic_smiles=frozenset({'C', 'CO', 'NC(N)=O', 'O=C(OC(=O)C(F)(F)F)C(F)(F)F'}), inorganic_smiles=frozenset({'BrC(Br)(Br)Br', 'C#N', 'ClC(Cl)(Cl)Cl', 'FC(F)(F)F', 'IC(I)(I)I', 'O=C(Cl)Cl', 'O=C(F)F', 'O=C(O)O', 'O=C=O', 'O=C=S', 'S=C=S', '[C-]#[O+]'}))[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is organic. The definition of organic vs. inorganic compounds is arabitrary. The rules implemented here are fairly complex.

  • If a compound has an C-C bond, a C=C bond, a carbon triple bond, a carbon attatched however to a hydrogen, a carbon in a ring, or an amide group.

  • If a compound is in the list of canonical smiles organic_smiles, either the defaults in the library or those provided as an input to the function, the molecule is considered organic.

  • If a compound is in the list of canonical smiles inorganic_smiles, either the defaults in the library or those provided as an input to the function, the molecule is considered inorganic.

  • If restrict_atoms is provided and atoms are present in the molecule that are restricted, the compound is considered restricted.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

restrict_atomsIterable[str]

Atoms that cannot be found in an organic molecule, [-]

organic_smilesIterable[str]

Smiles that are hardcoded to be organic, [-]

inorganic_smilesIterable[str]

Smiles that are hardcoded to be inorganic, [-]

Returns
is_organicbool

Whether or not the compound is a organic or not, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_organic(MolFromSmiles("CC(C)C(C)C(C)C")) 
True
thermo.functional_groups.is_inorganic(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is inorganic.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_inorganicbool

Whether or not the compound is inorganic or not, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_inorganic(MolFromSmiles("O=[Zr].Cl.Cl")) 
True

Hydrocarbon Groups

thermo.functional_groups.is_alkane(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an alkane, also refered to as a paraffin. All bonds in the molecule must be single carbon-carbon or carbon-hydrogen.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_alkanebool

Whether or not the compound is an alkane or not, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_alkane(MolFromSmiles("CCC")) 
True
thermo.functional_groups.is_cycloalkane(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a cycloalkane, also refered to as a naphthenes.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_cycloalkanebool

Whether or not the compound is a cycloalkane or not, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_cycloalkane(MolFromSmiles('C1CCCCCCCCC1')) 
True
thermo.functional_groups.is_branched_alkane(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a branched alkane, also refered to as an isoparaffin. All bonds in the molecule must be single carbon-carbon or carbon-hydrogen.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_branched_alkanebool

Whether or not the compound is a branched alkane or not, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_branched_alkane(MolFromSmiles("CC(C)C(C)C(C)C")) 
True
thermo.functional_groups.is_alkene(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an alkene. Alkenes are also refered to as olefins.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_alkenebool

Whether or not the compound is a alkene or not, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_alkene(MolFromSmiles('C=C')) 
True
thermo.functional_groups.is_alkyne(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an alkyne.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_alkynebool

Whether or not the compound is a alkyne or not, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_alkyne(MolFromSmiles('CC#C')) 
True
thermo.functional_groups.is_aromatic(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is aromatic.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_aromaticbool

Whether or not the compound is aromatic or not, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_aromatic(MolFromSmiles('CC1=CC=CC=C1C')) 
True

Oxygen Groups

thermo.functional_groups.is_alcohol(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule any alcohol functional groups.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_alcoholbool

Whether or not the compound is an alcohol, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_alcohol(MolFromSmiles('CCO')) 
True
thermo.functional_groups.is_polyol(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a polyol (more than 1 alcohol functional groups).

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_polyolbool

Whether or not the compound is a polyol, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_polyol(MolFromSmiles('C(C(CO)O)O')) 
True
thermo.functional_groups.is_ketone(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a ketone.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_ketonebool

Whether or not the compound is a ketone, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_ketone(MolFromSmiles('C1CCC(=O)CC1')) 
True
thermo.functional_groups.is_aldehyde(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an aldehyde.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_aldehydebool

Whether or not the compound is an aldehyde, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_aldehyde(MolFromSmiles('C=O')) 
True
thermo.functional_groups.is_carboxylic_acid(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a carboxylic acid.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_carboxylic_acidbool

Whether or not the compound is a carboxylic acid, [-].

Examples

Butyric acid (butter)

>>> from rdkit.Chem import MolFromSmiles 
>>> is_carboxylic_acid(MolFromSmiles('CCCC(=O)O')) 
True
thermo.functional_groups.is_ether(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an ether.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_etherbool

Whether or not the compound is an ether, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_ether(MolFromSmiles('CC(C)OC(C)C')) 
True
thermo.functional_groups.is_phenol(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a phenol.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_phenolbool

Whether or not the compound is a phenol, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_phenol(MolFromSmiles('CC(=O)NC1=CC=C(C=C1)O')) 
True
thermo.functional_groups.is_ester(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an ester.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_esterbool

Whether or not the compound is an ester, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_ester(MolFromSmiles('CCOC(=O)C')) 
True
thermo.functional_groups.is_anhydride(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an anhydride.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_anhydridebool

Whether or not the compound is an anhydride, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_anhydride(MolFromSmiles('C1=CC(=O)OC1=O')) 
True
thermo.functional_groups.is_acyl_halide(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a acyl halide.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_acyl_halidebool

Whether or not the compound is a acyl halide, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_acyl_halide(MolFromSmiles('C(CCC(=O)Cl)CC(=O)Cl')) 
True
thermo.functional_groups.is_carbonate(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a carbonate.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_carbonatebool

Whether or not the compound is a carbonate, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_carbonate(MolFromSmiles('C(=O)(OC(Cl)(Cl)Cl)OC(Cl)(Cl)Cl')) 
True
thermo.functional_groups.is_carboxylate(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a carboxylate.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_carboxylatebool

Whether or not the compound is a carboxylate, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_carboxylate(MolFromSmiles('CC(=O)[O-].[Na+]')) 
True
thermo.functional_groups.is_hydroperoxide(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a hydroperoxide.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_hydroperoxidebool

Whether or not the compound is a hydroperoxide, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_hydroperoxide(MolFromSmiles('CC(C)(C)OO')) 
True
thermo.functional_groups.is_peroxide(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a peroxide.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_peroxidebool

Whether or not the compound is a peroxide, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_peroxide(MolFromSmiles('CC(C)(C)OOC(C)(C)C')) 
True
thermo.functional_groups.is_orthoester(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a orthoester.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_orthoesterbool

Whether or not the compound is a orthoester, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_orthoester(MolFromSmiles('CCOC(C)(OCC)OCC')) 
True
thermo.functional_groups.is_methylenedioxy(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a methylenedioxy.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_methylenedioxybool

Whether or not the compound is a methylenedioxy, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_methylenedioxy(MolFromSmiles('C1OC2=CC=CC=C2O1')) 
True
thermo.functional_groups.is_orthocarbonate_ester(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a orthocarbonate ester .

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_orthocarbonate_esterbool

Whether or not the compound is a orthocarbonate ester , [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_orthocarbonate_ester (MolFromSmiles('COC(OC)(OC)OC') 
True
thermo.functional_groups.is_carboxylic_anhydride(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a carboxylic anhydride .

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_carboxylic_anhydridebool

Whether or not the compound is a carboxylic anhydride, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_carboxylic_anhydride (MolFromSmiles('CCCC(=O)OC(=O)CCC') 
True

Nitrogen Groups

thermo.functional_groups.is_amide(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule has a amide RC(=O)NR′R″ group.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_amidebool

Whether or not the compound is a amide or not, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_amide(MolFromSmiles('CN(C)C=O')) 
True
thermo.functional_groups.is_amidine(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule has a amidine RC(NR)NR2 group.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_amidinebool

Whether or not the compound is a amidine or not, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_amidine(MolFromSmiles('C1=CC(=CC=C1C(=N)N)OCCCCCOC2=CC=C(C=C2)C(=N)N')) 
True
thermo.functional_groups.is_amine(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a amine.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_aminebool

Whether or not the compound is a amine, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_amine(MolFromSmiles('CN')) 
True
thermo.functional_groups.is_primary_amine(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a primary amine.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_primary_aminebool

Whether or not the compound is a primary amine, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_primary_amine(MolFromSmiles('CN')) 
True
thermo.functional_groups.is_secondary_amine(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a secondary amine.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_secondary_aminebool

Whether or not the compound is a secondary amine, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_secondary_amine(MolFromSmiles('CNC')) 
True
thermo.functional_groups.is_tertiary_amine(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a tertiary amine.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_tertiary_aminebool

Whether or not the compound is a tertiary amine, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_tertiary_amine(MolFromSmiles('CN(C)C')) 
True
thermo.functional_groups.is_quat(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a quat.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_quatbool

Whether or not the compound is a quat, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_quat(MolFromSmiles('CCCCCCCCCCCCCCCCCC[N+](C)(C)CCCCCCCCCCCCCCCCCC.[Cl-]')) 
True
thermo.functional_groups.is_imine(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a imine.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_iminebool

Whether or not the compound is a imine, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_imine(MolFromSmiles('C1=CC=C(C=C1)C(=N)C2=CC=CC=C2')) 
True
thermo.functional_groups.is_primary_ketimine(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a primary ketimine.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_primary_ketiminebool

Whether or not the compound is a primary ketimine, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_primary_ketimine(MolFromSmiles('C1=CC=C(C=C1)C(=N)C2=CC=CC=C2')) 
True
thermo.functional_groups.is_secondary_ketimine(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a secondary ketimine.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_secondary_ketiminebool

Whether or not the compound is a secondary ketimine, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_secondary_ketimine(MolFromSmiles('CC(C)CC(=NC1=CC=C(C=C1)CC2=CC=C(C=C2)N=C(C)CC(C)C)C')) 
True
thermo.functional_groups.is_primary_aldimine(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a primary aldimine.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_primary_aldiminebool

Whether or not the compound is a primary aldimine, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_primary_aldimine(MolFromSmiles('CC=N')) 
True
thermo.functional_groups.is_secondary_aldimine(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a secondary aldimine.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_secondary_aldiminebool

Whether or not the compound is a secondary aldimine, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_secondary_aldimine(MolFromSmiles( 'C1=CC=C(C=C1)/C=N\\O')) 
True
thermo.functional_groups.is_imide(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a imide.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_imidebool

Whether or not the compound is a imide, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_imide(MolFromSmiles('C1=CC=C2C(=C1)C(=O)NC2=O')) 
True
thermo.functional_groups.is_azide(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a azide.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_azidebool

Whether or not the compound is a azide, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_azide(MolFromSmiles('C1=CC=C(C=C1)N=[N+]=[N-]')) 
True
thermo.functional_groups.is_azo(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a azo.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_azobool

Whether or not the compound is a azo, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_azo(MolFromSmiles('C1=CC=C(C=C1)N=NC2=CC=CC=C2')) 
True
thermo.functional_groups.is_cyanate(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a cyanate.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_cyanatebool

Whether or not the compound is a cyanate, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_cyanate(MolFromSmiles('COC#N')) 
True
thermo.functional_groups.is_isocyanate(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a isocyanate.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_isocyanatebool

Whether or not the compound is a isocyanate, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_isocyanate(MolFromSmiles('CN=C=O')) 
True
thermo.functional_groups.is_nitrate(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a nitrate.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_nitratebool

Whether or not the compound is a nitrate, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_nitrate(MolFromSmiles('CCCCCO[N+](=O)[O-]')) 
True
thermo.functional_groups.is_nitrile(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a nitrile.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_nitrilebool

Whether or not the compound is a nitrile, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_nitrile(MolFromSmiles('CC#N')) 
True
thermo.functional_groups.is_isonitrile(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a isonitrile.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_isonitrilebool

Whether or not the compound is a isonitrile, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_isonitrile(MolFromSmiles('C[N+]#[C-]')) 
True
thermo.functional_groups.is_nitrite(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a nitrite.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_nitritebool

Whether or not the compound is a nitrite, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_nitrite(MolFromSmiles('CC(C)CCON=O')) 
True
thermo.functional_groups.is_nitro(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a nitro.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_nitrobool

Whether or not the compound is a nitro, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_nitro(MolFromSmiles('C[N+](=O)[O-]')) 
True
thermo.functional_groups.is_nitroso(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a nitroso.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_nitrosobool

Whether or not the compound is a nitroso, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_nitroso(MolFromSmiles('C1=CC=C(C=C1)N=O')) 
True
thermo.functional_groups.is_oxime(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a oxime.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_oximebool

Whether or not the compound is a oxime, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_oxime(MolFromSmiles('CC(=NO)C')) 
True
thermo.functional_groups.is_pyridyl(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a pyridyl.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_pyridylbool

Whether or not the compound is a pyridyl, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_pyridyl(MolFromSmiles('CN1CCC[C@H]1C1=CC=CN=C1')) 
True
thermo.functional_groups.is_carbamate(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a carbamate.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_carbamatebool

Whether or not the compound is a carbamate, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_carbamate(MolFromSmiles('CC(C)OC(=O)NC1=CC(=CC=C1)Cl')) 
True

Sulfur Groups

thermo.functional_groups.is_mercaptan(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule has a mercaptan R-SH group. This is also called a thiol.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_mercaptanbool

Whether or not the compound is a mercaptan or not, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_mercaptan(MolFromSmiles("CS")) 
True
thermo.functional_groups.is_sulfide(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a sulfide. This group excludes disulfides.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_sulfidebool

Whether or not the compound is a sulfide, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_sulfide(MolFromSmiles('CSC')) 
True
thermo.functional_groups.is_disulfide(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a disulfide.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_disulfidebool

Whether or not the compound is a disulfide, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_disulfide(MolFromSmiles('CSSC')) 
True
thermo.functional_groups.is_sulfoxide(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a sulfoxide.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_sulfoxidebool

Whether or not the compound is a sulfoxide, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_sulfoxide(MolFromSmiles('CS(=O)C')) 
True
thermo.functional_groups.is_sulfone(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a sulfone.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_sulfonebool

Whether or not the compound is a sulfone, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_sulfone(MolFromSmiles('CS(=O)(=O)C')) 
True
thermo.functional_groups.is_sulfinic_acid(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a sulfinic acid.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_sulfinic_acidbool

Whether or not the compound is a sulfinic acid, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_sulfinic_acid(MolFromSmiles('O=S(O)CCN')) 
True
thermo.functional_groups.is_sulfonic_acid(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a sulfonic acid.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_sulfonic_acidbool

Whether or not the compound is a sulfonic acid, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_sulfonic_acid(MolFromSmiles('OS(=O)(=O)c1ccccc1')) 
True
thermo.functional_groups.is_sulfonate_ester(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a sulfonate ester.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_sulfonate_esterbool

Whether or not the compound is a sulfonate ester, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_sulfonate_ester(MolFromSmiles('COS(=O)(=O)C(F)(F)F')) 
True
thermo.functional_groups.is_thiocyanate(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a thiocyanate.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_thiocyanatebool

Whether or not the compound is a thiocyanate, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_thiocyanate(MolFromSmiles('C1=CC=C(C=C1)SC#N')) 
True
thermo.functional_groups.is_isothiocyanate(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a isothiocyanate.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_isothiocyanatebool

Whether or not the compound is a isothiocyanate, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_isothiocyanate(MolFromSmiles('C=CCN=C=S')) 
True
thermo.functional_groups.is_thioketone(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a thioketone.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_thioketonebool

Whether or not the compound is a thioketone, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_thioketone(MolFromSmiles('C1=CC=C(C=C1)C(=S)C2=CC=CC=C2')) 
True
thermo.functional_groups.is_thial(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a thial.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_thialbool

Whether or not the compound is a thial, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_thial(MolFromSmiles('CC=S')) 
True
thermo.functional_groups.is_carbothioic_s_acid(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a Carbothioic S-acid.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_carbothioic_s_acidbool

Whether or not the compound is a Carbothioic S-acid, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_carbothioic_s_acid(MolFromSmiles('C1=CC=C(C=C1)C(=O)S')) 
True
thermo.functional_groups.is_carbothioic_o_acid(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a Carbothioic S-acid.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_carbothioic_o_acidbool

Whether or not the compound is a Carbothioic S-acid, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_carbothioic_o_acid(MolFromSmiles('OC(=S)c1ccccc1O')) 
True
thermo.functional_groups.is_thiolester(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a thiolester.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_thiolesterbool

Whether or not the compound is a thiolester, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_thiolester(MolFromSmiles('CSC(=O)C=C')) 
True
thermo.functional_groups.is_thionoester(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a thionoester.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_thionoesterbool

Whether or not the compound is a thionoester, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_thionoester(MolFromSmiles('CCOC(=S)S')) 
True
thermo.functional_groups.is_carbodithioic_acid(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a carbodithioic acid .

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_carbodithioic_acidbool

Whether or not the compound is a carbodithioic acid , [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_carbodithioic_acid(MolFromSmiles('C1=CC=C(C=C1)C(=S)S')) 
True
thermo.functional_groups.is_carbodithio(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a carbodithio.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_carbodithiobool

Whether or not the compound is a carbodithio, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_carbodithio(MolFromSmiles('C(=S)(N)SSC(=S)N')) 
True

Silicon Groups

thermo.functional_groups.is_siloxane(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a siloxane.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_siloxanebool

Whether or not the compound is a siloxane, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_siloxane(MolFromSmiles('C[Si]1(O[Si](O[Si](O[Si](O1)(C)C)(C)C)(C)C)C')) 
True
thermo.functional_groups.is_silyl_ether(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule any silyl ether functional groups.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_silyl_etherbool

Whether or not the compound is an silyl ether, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_silyl_ether(MolFromSmiles('C[Si](C)(C)OS(=O)(=O)C(F)(F)F')) 
True

Boron Groups

thermo.functional_groups.is_boronic_acid(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule has any boronic acid functional groups.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_boronic_acidbool

Whether or not the compound is an boronic acid, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_boronic_acid(MolFromSmiles('B(C)(O)O')) 
True
thermo.functional_groups.is_boronic_ester(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a boronic ester.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_boronic_esterbool

Whether or not the compound is a boronic ester, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_boronic_ester(MolFromSmiles('B(C)(OC(C)C)OC(C)C')) 
True
thermo.functional_groups.is_borinic_acid(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a borinic acid.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_borinic_acidbool

Whether or not the compound is a borinic acid, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_borinic_acid(MolFromSmiles('BO')) 
True
thermo.functional_groups.is_borinic_ester(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a borinic ester.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_borinic_esterbool

Whether or not the compound is a borinic ester, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_borinic_ester(MolFromSmiles('B(C1=CC=CC=C1)(C2=CC=CC=C2)OCCN')) 
True

Phosphorus Groups

thermo.functional_groups.is_phosphine(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a phosphine.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_phosphinebool

Whether or not the compound is a phosphine, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_phosphine(MolFromSmiles('CCCPC')) 
True
thermo.functional_groups.is_phosphonic_acid(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a phosphonic_acid.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_phosphonic_acidbool

Whether or not the compound is a phosphonic_acid, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_phosphonic_acid(MolFromSmiles('C1=CC=C(C=C1)CP(=O)(O)O')) 
True
thermo.functional_groups.is_phosphodiester(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a phosphodiester.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_phosphodiesterbool

Whether or not the compound is a phosphodiester, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_phosphodiester(MolFromSmiles('C(COP(=O)(O)OCC(C(=O)O)N)N=C(N)N')) 
True
thermo.functional_groups.is_phosphate(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a phosphate.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_phosphatebool

Whether or not the compound is a phosphate, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_phosphate(MolFromSmiles('C1=CN(C(=O)N=C1N)[C@H]2[C@@H]([C@@H]([C@H](O2)COP(=O)(O)OP(=O)(O)OP(=O)(O)O)O)O')) 
True

Halogen Groups

thermo.functional_groups.is_haloalkane(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a haloalkane.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_haloalkanebool

Whether or not the compound is a haloalkane, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_haloalkane(MolFromSmiles('CCCl')) 
True
thermo.functional_groups.is_fluoroalkane(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a fluoroalkane.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_fluoroalkanebool

Whether or not the compound is a fluoroalkane, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_fluoroalkane(MolFromSmiles('CF')) 
True
thermo.functional_groups.is_chloroalkane(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a chloroalkane.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_chloroalkanebool

Whether or not the compound is a chloroalkane, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_chloroalkane(MolFromSmiles('CCl')) 
True
thermo.functional_groups.is_bromoalkane(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a bromoalkane.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_bromoalkanebool

Whether or not the compound is a bromoalkane, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_bromoalkane(MolFromSmiles('CBr')) 
True
thermo.functional_groups.is_iodoalkane(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is a iodoalkane.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_iodoalkanebool

Whether or not the compound is a iodoalkane, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_iodoalkane(MolFromSmiles('CI')) 
True

Organometalic Groups

thermo.functional_groups.is_alkyllithium(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule any alkyllithium functional groups.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_alkyllithiumbool

Whether or not the compound is an alkyllithium, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_alkyllithium(MolFromSmiles('[Li+].[CH3-]')) 
True
thermo.functional_groups.is_alkylaluminium(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule any alkylaluminium functional groups.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_alkylaluminiumbool

Whether or not the compound is an alkylaluminium, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_alkylaluminium(MolFromSmiles('CC[Al](CC)CC')) 
True
thermo.functional_groups.is_alkylmagnesium_halide(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule any alkylmagnesium_halide functional groups.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_alkylmagnesium_halidebool

Whether or not the compound is an alkylmagnesium_halide, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_alkylmagnesium_halide(MolFromSmiles('C1=CC=[C-]C=C1.[Mg+2].[Br-]')) 
True

Other Groups

thermo.functional_groups.is_acid(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, returns whether or not the molecule is an acid.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
is_acidbool

Whether or not the compound is a acid, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> is_acid(MolFromSmiles('CC(=O)O')) 
True

Utility functions

thermo.functional_groups.count_ring_ring_attatchments(mol)[source]

Given a rdkit.Chem.rdchem.Mol object, count the number of times a ring in the molecule is bonded with another ring in the molecule.

An easy explanation is cubane - each edge of the cube is a ring uniquely bonding with another ring; so this function returns twelve.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

Returns
ring_ring_attatchmentsbool

The number of ring-ring bonds, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> count_ring_ring_attatchments(MolFromSmiles('C12C3C4C1C5C2C3C45')) 
12
thermo.functional_groups.count_rings_attatched_to_rings(mol, allow_neighbors=True, atom_rings=None)[source]

Given a rdkit.Chem.rdchem.Mol object, count the number of rings in the molecule that are attatched to another ring. if allow_neighbors is True, any bond to another atom that is part of a ring is allowed; if it is False, the rings have to share a wall.

Parameters
molrdkit.Chem.rdchem.Mol

Molecule [-]

allow_neighborsbool

Whether or not to count neighboring rings or just ones sharing a wall, [-]

atom_ringsrdkit.Chem.rdchem.RingInfo, optional

Internal parameter, used for performance only

Returns
rings_attatched_to_ringsbool

The number of rings bonded to other rings, [-].

Examples

>>> from rdkit.Chem import MolFromSmiles 
>>> count_rings_attatched_to_rings(MolFromSmiles('C12C3C4C1C5C2C3C45')) 
6

Functions using group identification

thermo.functional_groups.BVirial_Tsonopoulos_extended_ab(Tc, Pc, dipole, smiles)[source]

Calculates the of a and b parameters of the Tsonopoulos (extended) second virial coefficient prediction method. These parameters account for polarity. This function uses rdkit to identify the component type of the molecule.

Parameters
Tcfloat

Critical temperature of fluid [K]

Pcfloat

Critical pressure of the fluid [Pa]

dipolefloat

dipole moment, optional, [Debye]

Returns
afloat

Fit parameter matched to one of the supported chemical classes.

bfloat

Fit parameter matched to one of the supported chemical classes.

Notes

To calculate a or b, the following rules are used:

For ‘simple’ or ‘normal’ fluids:

\[a = 0 \]
\[b = 0 \]

For ‘ketone’, ‘aldehyde’, ‘alkyl nitrile’, ‘ether’, ‘carboxylic acid’, or ‘ester’ types of chemicals:

\[a = -2.14\times 10^{-4} \mu_r - 4.308 \times 10^{-21} (\mu_r)^8 \]
\[b = 0 \]

For ‘alkyl halide’, ‘mercaptan’, ‘sulfide’, or ‘disulfide’ types of chemicals:

\[a = -2.188\times 10^{-4} (\mu_r)^4 - 7.831 \times 10^{-21} (\mu_r)^8 \]
\[b = 0 \]

For ‘alkanol’ types of chemicals (except methanol):

\[a = 0.0878 \]
\[b = 0.00908 + 0.0006957 \mu_r \]

For methanol:

\[a = 0.0878 \]
\[b = 0.0525 \]

For water:

\[a = -0.0109 \]
\[b = 0 \]

If required, the form of dipole moment used in the calculation of some types of a and b values is as follows:

\[\mu_r = 100000\frac{\mu^2(Pc/101325.0)}{Tc^2} \]

References

1

Tsonopoulos, C., and J. L. Heidman. “From the Virial to the Cubic Equation of State.” Fluid Phase Equilibria 57, no. 3 (1990): 261-76. doi:10.1016/0378-3812(90)85126-U

2

Tsonopoulos, Constantine, and John H. Dymond. “Second Virial Coefficients of Normal Alkanes, Linear 1-Alkanols (and Water), Alkyl Ethers, and Their Mixtures.” Fluid Phase Equilibria, International Workshop on Vapour-Liquid Equilibria and Related Properties in Binary and Ternary Mixtures of Ethers, Alkanes and Alkanols, 133, no. 1-2 (June 1997): 11-34. doi:10.1016/S0378-3812(97)00058-7.