Subsections

 
6.1 Function API

unsigned int OEEnumerateFormalCharges(OEChem::OEMolBase &mol,
                                      OEMolFunctionBase &mfb,
                                      bool verbose = false);

unsigned int OEEnumerateTautomers(OEChem::OEMolBase &mol,
                                  OEMolFunctionBase &mfb,
                                  unsigned int allflag = 0,
                                  bool ch3flag = false);

bool OEAssignPartialCharges(OEChem::OEMolBase &mol,
                            unsigned int method = OECharges::Default,
                            bool noHydrogen = false,
                            bool debug = false);

bool OEAssignPartialCharges(OEChem::OEMCMolBase &mol,
                            unsigned int method = OECharges::Default,
                            bool noHydrogen = false,
                            bool debug = false);

 
6.1.1 OEEnumerateFormalCharges

This function has three arguments. The first is the non-const molecule whose formal charges are to be enumerated. For details of the enumeration process, please see the section concerning pkatyper above. The second argument is a functor call-back (see functor API below). The functor's operator() is called with each new protonation state enumerated. The enumeration will continue until the functor returns false or until the enumeration is complete. The third argument determines if verbose atom-type information should be written to standard out. The function will return the total number of states which were enumerated.

 
6.1.2 OEEnumerateTautomers

This function has four arguments. The first argument in a non-const molecule that will be the basis for the tautomer enumeration. The second argument is a functor call-back (see functor API below). The functor's operator() is called with each new tautomer state enumerated. The enumeration will continue until the functor returns false or until the enumeration is complete. The third argument is an unsigned int which indicates the maximum acceptable energetic category of enumerated tautomers. The function will return all categories of tautomers from the lowest available up to this cutoff. If the only available level is higher than the cutoff, that single level of tautomers will be enumerated. This control is in addition to the call-back control. Finally, the Boolean ch3flag argument controls whether tautomer enumeration should include tautomerization of methyl and methylene groups adjacent to a conjugated system. This allows cyclohexa-2,4-dien-1-one, O=C1CC=CC=C1, to be canonicalized as a tautomer of phenol, Oc1ccccc1. Unfortunately, the combinatorial explosion from tautomerizing across the alpha carbon of amino acids means that this option should not be used when enumerating the tautomers of proteins and large peptides. This function returns the total number of tautomers enumerated.

 
6.1.3 OEAssignPartialCharges

This function sets the partial charge value of each atom on a molecule using the OEAtomBase::SetPartialCharge method. The molecule to be charged is passed as the first argument. The second argument is the charge model to be used. These values should be selected from the OECharge namespace (vida infra). The third argument is a boolean for whether the final molecule should have any explicit hydrogens. If noHydrogen is set to true, all hydrogens will be made implicit, and the charge on each heavy atom with attached hydrogens will be adjusted to be the sum of it's original partial charge and all of the attached hydrogen partial charges. The final flag is the debug flag which controls the volume of debug information written to standard error. The function returns a boolean value evaluating the success of the calculation.

When calling this function with an OEMCMolBase and AM1BCC charges, the multiconformer algorithm described in the theory section is performed.