User 870ab5b546
25-07-2006 16:44:38
In this molecule:
When I operate this command for i=6:
I get this output:
N7 had 2 implicit H atoms and now has 1; adding explicit H atoms.
Clearly, molecule.getAtom(6).getImplicitHcount() is returning 1, but just as clearly, the correct value is 2.
I have changed the charge on the N just before this step from -1 to 0; perhaps the bug is that JChem thinks that the charge is still -1.
Code: |
<?xml version="1.0" ?> <MDocument> <MChemicalStruct> <molecule molID="m1"> <atomArray atomID="a1 a2 a3 a4 a5 a6 a7" elementType="C C C C C O N" formalCharge="0 0 0 0 0 -1 0" x2="-8.036874771118164 -9.282741100135192 -8.80687868274797 -7.266870859488357 -6.791008442101136 -5.3034826696159705 -7.459374904632568" y2="0.8768672655063927 -0.02834933300560749 -1.4928967729254987 -1.4928967729254987 -0.02834933300560749 0.37023199645227445 3.4649999141693115" /> <bondArray> <bond atomRefs2="a1 a2" order="1" /> <bond atomRefs2="a2 a3" order="1" /> <bond atomRefs2="a3 a4" order="1" /> <bond atomRefs2="a4 a5" order="1" /> <bond atomRefs2="a1 a5" order="1" /> <bond atomRefs2="a5 a6" order="1" /> <bond atomRefs2="a7 a5" order="1" /> </bondArray> </molecule> </MChemicalStruct> <MEFlow arcAngle="150.0" headSkip="0.15" headLength="0.5" headWidth="0.4" tailSkip="0.25"> <MAtomSetPoint atomRefs="m1.a7" /> <MAtomSetPoint atomRefs="m1.a7 m1.a5" /> </MEFlow> <MEFlow arcAngle="-254.995522631729" headSkip="0.25" headLength="0.5" headWidth="0.4" tailSkip="0.15"> <MAtomSetPoint atomRefs="m1.a5 m1.a6" /> <MAtomSetPoint atomRefs="m1.a6" /> </MEFlow> </MDocument> |
When I operate this command for i=6:
Code: |
MolAtom atom = molecule.getAtom(i); System.out.println(atom.getSymbol() + (i+1) + " had " + initImplicitHcounts[i] + " implicit H atoms and now has " + atom.getImplicitHcount() + "; adding explicit H atoms."); |
I get this output:
N7 had 2 implicit H atoms and now has 1; adding explicit H atoms.
Clearly, molecule.getAtom(6).getImplicitHcount() is returning 1, but just as clearly, the correct value is 2.
I have changed the charge on the N just before this step from -1 to 0; perhaps the bug is that JChem thinks that the charge is still -1.