Two questions: Atom names and auto-calculated charges

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Two questions: Atom names and auto-calculated charges

Rocco Moretti-2
I'm trying to analyze some molecules through the python scripting
interface, and have some questions.

Where does OpenBabel store atom names? I realize not all formats have
named atoms, but some (e.g. PDB) do, and I'm not sure where in the
OBAtom/OBMol/other objects I can find this info.

Is there a way to tell whether the partial charges came directly from
the input file, or if they have been auto calculated? I'd like to be
able to trust the supplied charges, if any, but would prefer to use a
different method in preference to OpenBabel's Gasteiger charge calculation.

Thanks.

------------------------------------------------------------------------------

_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Two questions: Atom names and auto-calculated charges

Geoffrey Hutchison
> Where does OpenBabel store atom names? I realize not all formats have
> named atoms, but some (e.g. PDB) do, and I'm not sure where in the
> OBAtom/OBMol/other objects I can find this info.

For PDB-related formats, these are stored in the OBResidue:
http://openbabel.org/api/2.2.0/classOpenBabel_1_1OBResidue.shtml

> Is there a way to tell whether the partial charges came directly from
> the input file, or if they have been auto calculated?

Yes. Starting in OB 2.2 and later, there should be an OBPairData stored with the molecule (e.g., from a quantum output file):

      OBPairData *dp = new OBPairData;
      dp->SetAttribute("PartialCharges");
      dp->SetValue("Mulliken");
      dp->SetOrigin(fileformatInput);

In particular, the SetOrigin method for generic data reflects whether data is perceived (i.e., generated by Open Babel) or from the file format.

> I'd like to be  able to trust the supplied charges, if any, but would prefer to use a
> different method in preference to OpenBabel's Gasteiger charge calculation.

Out of curiosity, what method would you like to use. In the latest development code, there's a new framework for charge models, and we have support for Gasteiger, MMFF94, QEq, and QTPIE. Other methods could certainly be added.

Thanks,
-Geoff
------------------------------------------------------------------------------

_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss