GetType returns the internal OpenBabel atom type. If you want to translate this to Sybyl atom types, see the example code at http://baoilleach.blogspot.com/2008/07/calculate-circular-fingerprints-with.html .
Does this answer your question? - Noel 2009/10/21 B.W.H. van Beest <b...@xs4all.nl>: > Hi, > > Can somebody explain to me what the "OBAtom::GetType()" method returns? > I don't understand what OpenBabel intends to do here. > > For example, when I have a file in the Tripos mol2 format (see fragment > below), the atoms read > have the type "C.3" for the first and the last atom, and "C.2" for the > atoms 2-9. (column 6 below) > > When I read the mol2-file into an OBMol, then, when I ask for the type > then the result is always "C3", for all 10 atoms. > When I set the type to e.g. "foo", then I get an error message that the > type "foo" is not valid. Fair enough, > but is there a way that I can set the type (in the mol2 file) to any > string I like, and then get the same string back > when I ask fot the OBAtomM::GetType()? > > > @<TRIPOS>ATOM > 1 C1 3.690 2.630 2.480 C.3 0 aap1 0.12 > 2 C2 4.940 1.840 2.810 C.2 0 aap2 1.23 > 3 C3 6.130 2.710 2.420 C.2 0 aap3 1.23 > 4 C4 7.420 1.980 2.740 C.2 0 aap4 1.23 > 5 C5 8.590 2.860 2.340 C.2 0 aap5 1.23 > 6 C6 9.890 2.140 2.660 C.2 0 aap6 1.23 > 7 C7 11.060 3.030 2.250 C.2 0 aap7 1.23 > 8 C8 12.320 2.270 2.580 C.2 0 aap8 1.23 > 9 C9 13.550 3.060 2.180 C.2 0 aap9 1.23 > 10 C10 14.690 2.130 2.510 C.3 0 aap0 0.34 > > > Kind Regards, > Bertwim > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss > ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss