rdtools.fix.mult#

Fix the molecule multiplicity.

rdtools.fix.mult.get_biradical_12_query() Mol#

Get a template molecule for 1,2 biradical.

The template is two atoms each with >= 1 radical electrons.

Returns:

Chem.Mol – the structure query.

rdtools.fix.mult.get_biradical_cdb_query(num_segment: int) Mol#

Get a template molecule for 1,4 to 1,N biradical.

The template has the two end atoms each with >= 1 radical electrons. The template used is something like ‘-,=*=,#-,=*=,#*-,=*’.

Parameters:

num_segment (int) – The number of segments in the template. E.g., 1,4 biradical has 1 segments.

Returns:

Chem.Mol – the structure query.

rdtools.fix.mult.get_carbene_query() Mol#

Get a template molecule for carbene.

The template is an atom with >= 2 radical electrons.

Returns:

Chem.Mol – the structure query.

rdtools.fix.mult.get_radical_site_query() Mol#

Get a template molecule for carbene.

The template is an atom with >= 1 radical electrons.

Returns:

Chem.Mol – the structure query.

rdtools.fix.mult.saturate_biradical_12(mol: Mol, multiplicity: int) None#

Saturate 1,2 biradicals to match the given molecule spin multiplicity.

E.g.:

*C - C* => C = C

In the current implementation, no error will be raised, if the function doesn’t achieve the goal. This function has not been been tested on nitrogenate.

Parameters:
  • mol (Chem.Mol) – The molecule to be fixed.

  • multiplicity (int) – The target multiplicity.

rdtools.fix.mult.saturate_biradical_cdb(mol: Mol, multiplicity: int, chain_length: int = 8) None#

Saturate biradicals with conjugated double bonds to match spin multiplicity.

A method help to saturate biradicals that have conjugated double bond in between to match the given molecule spin multiplicity. E.g, 1,4 biradicals can be saturated if there is a unsaturated bond between them:

*C - C = C - C* => C = C - C = C

In the current implementation, no error will be raised, if the function doesn’t achieve the goal. This function has not been been tested on nitrogenate.

Parameters:
  • mol (Chem.Mol) – The molecule to be fixed.

  • multiplicity (int) – The target multiplicity.

  • chain_length (int) – How long the conjugated double bond chain is. A larger value will result in longer computational time. Defaults to 8.

rdtools.fix.mult.saturate_carbene(mol: Mol, multiplicity: int) None#

Saturate carbenes and nitrenes to match the given molecule spin multiplicity.

E.g.:

*C* (triplet) => C(**) (singlet)

In the current implementation, no error will be raised, if the function doesn’t achieve the goal. This function has not been been tested on nitrogenate.

Parameters:
  • mol (Chem.Mol) – The molecule to be fixed.

  • multiplicity (int) – The target multiplicity.

rdtools.fix.mult.saturate_mol(mol: Mol, multiplicity: int = 0, chain_length: int = 8, verbose: bool = False) None#

Saturate the molecule to match the given molecule spin multiplicity.

This is just a wrapper to call SaturateBiradicalSites12(), SaturateBiradicalSitesCDB(), and SaturateCarbene():

*C - C* => C = C
*C - C = C - C* => C = C - C = C
*-C-* (triplet) => C-(**) (singlet)

In the current implementation, no error will be raised, if the function doesn’t achieve the goal. This function has not been been tested on nitrogenate.

Parameters:
  • mol (Chem.Mol) – The molecule to be fixed.

  • multiplicity (int) – The target multiplicity. If 0, the target multiplicity will be inferred from the number of unpaired electrons. Defaults to 0.

  • chain_length (int) – How long the conjugated double bond chain is. A larger value will result in longer computational time. Defaults to 8. It should be an even number >= 4.

  • verbose (bool) – If True, print the warning message if the target multiplicity cannot be fulfilled.