User f50dadc210
18-10-2010 18:59:33
It seems that Clean function
changes the structure somehow. The
following codes randomly breaks at "clean" branch, if I uncomment
dearomatize and aromatize, then it will break at "deromatize". The two smiles are not same, I tested them in cartridge.
Thanks
Bin
public static void smiles2sdf(String[]
args) throws Exception {
int count = 0;
String
original = "CN1C2=CC=CC=C2C2(N\\C(=N\\S(C)(=O)=O)[C@@]1(C)N2S(C)(=O)=O)C1=CC=CC=C1";
String
changed = "CN1C2=CC=CC=C2C2(NC(=NS(C)(=O)=O)[C@@]1(C)N2S(C)(=O)=O)C1=CC=CC=C1";
while (true) {
count++;
System.out.println(count);
MolHandler
mh = new MolHandler(original);
Molecule
mol = mh.getMolecule();
// mol.dearomatize();
// mol.aromatize();
boolean error =
mol.clean(2, null);
System.out.println(error);
if (mol.toFormat("smiles").equals(changed))
{
System.out.println("clean");
break;
}
mol.dearomatize();
if (mol.toFormat("smiles").equals(changed))
{
System.out.println("dearomatize");
break;
}
}
}