Hi all,
I am attempting to transform a functional group in a series of molecules.
The reaction is pretty simple (a re-aromatization):
C=C1CC=CC=C1>>Cc1ccccc1
The code which generates this runs without error (and it was written in
Java). What I don't understand is that the products of the reaction are
just Cc1ccccc1. The rest of the molecule is completely missing. Trying to
map these atoms didn't reproduce the error, it did not run. Is there a
trick to simply run something like this on every occurrence in a molecule?
Thanks in advance, and my code fragment is below,
Matt
Here is my code:
SDMolSupplier suppl1 = new SDMolSupplier(cParser.getValue("-in"));
ROMol rdmol;
//String line = "";
while (!suppl1.atEnd())
{
try {
rdmol = suppl1.next();
molId++;
ROMol_Vect reacts = new ROMol_Vect();
reacts.add(rdmol);
String ID = rdmol.getProp("_Name");
System.err.println("MOL_ID: " + ID);
ROMol_Vect_Vect prods = umr.runReactants(reacts);
System.out.println("Reagents: " + reacts.size());
System.err.println("Product AMT: " + prods.size());
if (prods.size() < 1) {
// Write out untransformed molecules if they don't have
the pattern
//writer.write(rdmol);
;
} else {
for (int i = 0; i < prods.size(); i++)
{
System.err.println("In here finally");
prods.get(i).get(0).setProp("_Name",ID);
// Why am I getting the query back to me?
writer.write(prods.get(i).get(0));
}
}
} catch (Exception e) {
System.err.println(e);
} catch (Error e) {
System.err.println(e);
}
}
------------------------------------------------------------------------------
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss