https://github.com/openbabel/openbabel/blob/master/src/residue.cpp


static unsigned int GetAtomIDNumber(const char *atomid) seems to be broken. 
always returns -1. All ch1-ch4 characters are misaligned to the left by 1 (ch1 
contains 'C' for example when in the code it expects ' ').



conv.SetInAndOutFormats("smi", "mol2");
conv.ReadString(&mol, "OC([C@@H](N)CCSC)=O"); //methionine

mol.AddHydrogens(false, false, 7.0);

build.Build(mol);


and then looping through displaying the number.

Resulting mol2 file is correct:


@<TRIPOS>MOLECULE
*****
 20 19 0 0 0
SMALL
GASTEIGER

@<TRIPOS>ATOM
      1 O           1.0572   -0.0682   -0.0456 O.3     1  MET1       -0.4795
      2 C           0.3827   -0.9526    0.7176 C.2     1  MET1        0.3217
      3 CA          1.1237   -1.9243    1.5561 C.3     1  MET1        0.1040
      4 HA          0.8652   -1.7783    2.5841 H       1  MET1        0.0574
      5 N           0.7685   -3.2920    1.1511 N.3     1  MET1       -0.3184
      6 CB          2.6181   -1.7140    1.3747 C.3     1  MET1       -0.0183
      7 CG          2.9853   -1.9214   -0.0856 C.3     1  MET1       -0.0047
      8 SD          2.0803   -0.7347   -1.1097 S.3     1  MET1       -0.1641
      9 CE          0.3007   -0.9851   -0.8937 C.3     1  MET1       -0.0181
     10 OXT        -0.8449   -0.9526    0.7176 O.2     1  MET1       -0.2493
     11 H           2.0572   -0.0682   -0.0456 H       1  MET1        0.2951
     12 H1          1.2785   -3.9608    1.7282 H       1  MET1        0.1190
     13 H2         -0.2343   -3.4332    1.2729 H       1  MET1        0.1190
     14 HB1         2.8766   -0.7185    1.6695 H       1  MET1        0.0293
     15 HB2         3.1531   -2.4156    1.9801 H       1  MET1        0.0293
     16 HG1         4.0373   -1.7734   -0.2134 H       1  MET1        0.0377
     17 HG2         2.7268   -2.9170   -0.3805 H       1  MET1        0.0377
     18 HE1         0.0423   -1.9807   -1.1885 H       1  MET1        0.0340
     19 HE2         0.0423   -0.8391    0.1343 H       1  MET1        0.0340
     20 HE3        -0.2343   -0.2836   -1.4991 H       1  MET1        0.0340
@<TRIPOS>BOND
     1     1    11    1
     2     1     2    1
     3     2    10    2
     4     2     3    1
     5     3     6    1
     6     6    15    1
     7     6    14    1
     8     6     7    1
     9     7    17    1
    10     7    16    1
    11     7     8    1
    12     8     9    1
    13     9    20    1
    14     9    19    1
    15     9    18    1
    16     3     5    1
    17     5    13    1
    18     5    12    1
    19     3     4    1


Nick
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to