Clean function randomly changes the structure.

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;


                  }


            }


      }

ChemAxon 9c0afc9aaf

18-10-2010 21:30:13

Hi Bin,


 


Could you let us know the JChem  version you are using ?


Also could you copy any error message or stack trace you are getting ?


 


Best regards,


 


Szilard

User f50dadc210

18-10-2010 21:37:24











System.out.println(VersionInfo.JCHEM_VERSION);
 The above code returns 5.1.0


No error message.


Szilard wrote:



Hi Bin,


 


Could you let us know the JChem  version you are using ?


Also could you copy any error message or stack trace you are getting ?


 


Best regards,


 


Szilard



 

ChemAxon 9c0afc9aaf

18-10-2010 22:26:47

Hi Bin,


5.1.0 is more than two years old and there are no planned bugfix releases for the 5.1.x versions.


I have only tested with MarvinSketch so far, but it seems we do not have issues with the structure in the latest version.


So I suggest to upgrade to the latest stable version, if possible.


 


Best regards,


Szilard