Hi everyone
addExplicitHydrogensToSatisfyValency does not work well using imidazole and
pyrrole.
Java code which I use is as follows.
import org.openscience.cdk.exception.InvalidSmilesException;
import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.smiles.SmilesParser;
import org.openscience.cdk.tools.HydrogenAdder;
class ha{
public static void main(String[] args){
IMolecule m = null;
HydrogenAdder adder = new HydrogenAdder();
try {
SmilesParser sp = new SmilesParser();
m = sp.parseSmiles("C1=NC=CN1");
System.out.println(m.getAtomCount()); // =5 for C3N2
adder.addExplicitHydrogensToSatisfyValency(m);
int atomCount = m.getAtomCount(); // should be 9
(C3H4N2)
System.out.println(atomCount); // ->8
} catch (Exception e) {
System.out.println(e.toString());
}
}
}
Using "c1nccn1" instead of "C1=NC=CN1" works well.
Thanks in advance.
Takayuki KOTANI, Ph.D.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user