- openff.nagl.utils.resonance.enumerate_resonance_forms(molecule: Molecule, lowest_energy_only: bool = True, max_path_length: Optional[int] = None, include_all_transfer_pathways: bool = False, as_dicts: bool = False) List[Union[Molecule, Dict[str, Dict[str, Any]]]]
Recursively attempts to find all resonance structures of an input molecule according to a modified version of the algorithm proposed by Gilson et al .
Enumeration proceeds by:
The molecule is turned into a
2. All hydrogen’s and uncharged sp3 carbons are removed from the graph as these will not be involved in electron transfer. 3. Disjoint sub-graphs are detected and separated out. 4. Sub-graphs that don’t contain at least 1 donor and 1 acceptor are discarded 5. For each disjoint subgraph:
a) The original v-charge algorithm is applied to yield the resonance structures of that subgraph.
This will lead to
M_iresonance structures for each of the
as_dicts=Truethen the resonance states in each sub-graph are returned. This avoids the need to combinatorially combining resonance information from each sub-graph. When
M_0 x M_1 x ... x M_Nforms are fully enumerated and return as molecule objects matching the input molecule type.
This method will strip all stereochemistry and aromaticity information from
the input molecule. * The method only attempts to enumerate resonance forms that occur when a pair of electrons can be transferred along a conjugated path from a donor to an acceptor. Other types of resonance, e.g. different Kekule structures, are not enumerated.
openff.toolkit.topology.Molecule) – The molecule to enumerate resonance forms for.
bool, optional) – Whether to only return the resonance forms with the lowest ‘energy’ as defined in .
int, optional) – The maximum number of bonds between a donor and acceptor to consider. If None, all paths are considered.
bool, optional) – Whether to return the resonance forms in a form that is more compatible with producing feature vectors. If false, all combinatorial resonance forms will be returned which may be significantly slow if the molecule is very heavily conjugated and has many donor / acceptor pairs.
bool, optional) – Whether to include resonance forms that have the same formal charges but have different arrangements of bond orders. Such cases occur when there exists multiple electron transfer pathways between electron donor-acceptor pairs e.g. in cyclic systems.
 Gilson, Michael K., Hillary SR Gilson, and Michael J. Potter. “Fast assignment of accurate partial atomic charges: an electronegativity equalization method that accounts for alternate resonance forms.” Journal of chemical information and computer sciences 43.6 (2003): 1982-1997.
List[Molecule]) – A list of all resonance forms including the original molecule.