OEAssignPartialCharges

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)

Note

This deprecated function will not be developed further. It is being replaced by OEAssignCharges which provides more control and greater expandability.

This function sets the partial charge value of each atom in a molecule. 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 OECharges namespace. The third argument is a boolean for whether the final molecule should have 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 its original partial charge and all of the attached hydrogen partial charges. The debug flag controls the volume of debug information written to standard error. This function returns a boolean value evaluating the success of the calculation.

This function is overloaded to accept an OEMolBase or an OEMCMolBase. Currently, only AM1 and AM1BCC charges have specialized multiconformer implementations in the OEMCMolBase overload. For all other charges, the OEMCMolBase and OEMolBase implementations are identical.

See also