> On Jul 9, 2008, at 3:30 PM, Rajarshi Guha wrote: > > > > > > Thanks for the info. However something seems to be wrong. I'm > > generating an IAtomContainer from c1ccccc1CN and then doing > > > > CDKHueckelAromaticityDetector.detectAromaticity(mol1); > > addExplicitHydrogens(mol1); > > AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol1); > > lpcheck.saturate(mol1); > > > > GasteigerPEPEPartialCharges pepe = new GasteigerPEPEPartialCharges(); > > pepe.calculateCharges(mol1); > > > > However, when I print the charge on each atom via atom.getCharge() > > all of them have 0 > > Digging into the code of GasteigerPEPEPartialCharges I see that there > are two exit points from the method assignGasteigerPiPartialCharges() > > It seems that when using c1ccccc1CN the method is exiting at line 237 > - - and at this point no charges have been set. Furthermore, exiting at > this point results in the sigma partial charges not even being > calculated. >
The GasteigerPEPEPartialCharges is based on resonance structures. If the method doesn't find any (line 237) and this is the case for c1ccccc1CN what I can see, the method goes out no setting any charge. One of the problems setting charge into an atom is that atom.setCharge method does not distinguish between what charge it means: either sigma, pi or total charge. On principle if you used the GasteigerPEPEPartialCharges to set the pi charge, I am the opinion that the method should not add other type of charge like sigma charge e.g. calculate with the GasteigerMarsiliPartialCharges method. So, the next problem comes when you want to share both charges. My suggestion could be to calculate the total charge, have a look to PartialTChargePEOEDescriptor please. Best regards, Miquel ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Cdk-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cdk-user

