JChem hanging?

User 870ab5b546

04-11-2005 20:46:25

We appear to be causing JChem 3.0.11 to hang.





We submit a target with six C atoms. The middle four are all in a straight line. The middle two have bold or hashed wedges pointing up or down. They don't need to be perpendicular to the main-chain bonds, and it doesn't matter what groups they're pointing to. When we submit this target for an exact match with any query, we never get a response back. I suspect JChem is getting lost in an infinite loop because of the T-shaped stereochemistry. If the three middle bonds of the main chain aren't perfectly aligned, we get a response right back.





Is this something that has been fixed in a later version of JChem?

ChemAxon a3d59b832c

05-11-2005 14:25:32

Bob,





I tried to reproduce the problem with different jchem versions, but could not. I tried to use the attached file both as query and target. Did you mean something like this? If not, can you give me an example molfile?





I was using the jcsearch command line tool.





Best regards,


Szabolcs

User 870ab5b546

06-11-2005 02:27:02

Sorry, I should have provided a molecule. Yours may not trigger the bug because it lacks stereocenters. Try this one:





Code:






  Marvin  11050521242D         





  8  7  0  0  0  0            999 V2000


   -3.5938   -0.5625    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


   -3.0104    0.0209    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


   -0.5354    0.0209    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


   -0.1229    0.7353    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


   -2.1854    0.0209    0.0000 C   0  0  2  0  0  0  0  0  0  0  0  0


   -2.1854    0.8459    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


   -1.3604    0.0209    0.0000 C   0  0  2  0  0  0  0  0  0  0  0  0


   -1.3604    0.8459    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


  1  2  1  0  0  0  0


  2  5  1  0  0  0  0


  5  7  1  0  0  0  0


  7  3  1  0  0  0  0


  3  4  1  0  0  0  0


  5  6  1  1  0  0  0


  7  8  1  1  0  0  0


M  END








I used this molecule as target. It didn't seem to matter what the query was. The critical feature that triggered the bug seemed to be the four C atoms in a line and the two wedges.





As you know, we access JChem methods through Java files, and it's remotely possible that something is going wrong outside of JChem. But it's hard to imagine what that would be.

ChemAxon a3d59b832c

07-11-2005 10:29:45

Bob,





I still could not reproduce the problem using your structure. However, I would not be surprised if your problem would disappear with an upgrade, because there have been many fixes in the stereochemistry parts of the code.





(For example, R/S values were not displayed for this structure in JChem 3.0.11, but they are in the current 3.1.2 version.)





Best regards,


Szabolcs

User 870ab5b546

07-11-2005 17:53:04

OK, try the following query with the previous target:





Code:






  Marvin  11070512522D         





  8  7  0  0  0  0            999 V2000


   -3.8750    1.1250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


   -3.0500    1.1250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


   -2.6375    0.4105    0.0000 C   0  0  1  0  0  0  0  0  0  0  0  0


   -1.8125    0.4105    0.0000 C   0  0  2  0  0  0  0  0  0  0  0  0


   -1.4000    1.1250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


   -0.5750    1.1250    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


   -3.0500   -0.3040    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


   -1.4000   -0.3040    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0


  1  2  1  0  0  0  0


  2  3  1  0  0  0  0


  3  4  1  0  0  0  0


  4  5  1  0  0  0  0


  5  6  1  0  0  0  0


  3  7  1  1  0  0  0


  4  8  1  6  0  0  0


M  END








It seems to hang JChem 3.0.15, too.

ChemAxon 9c0afc9aaf

08-11-2005 07:24:42

Hi Bob,








To reproduce the problem, we should know which API call hangs.


A simple method to determine the location of the endless loop is placing some test printouts to the standard error into your code. The hangup occurs between the last printed and first non-printed line.


Once you have found the operation in question, I suggest to print the affected structure source(s) in mrv format right before this operation, and send them us for analysis:





Code:
Molecule mol=...


System.err.println(mol.toFormat("mrv"));






Please print both the query and the target structures if the hanging method is a search operation.





Best regards,





Szilard

ChemAxon 9c0afc9aaf

13-11-2005 16:56:18

Hi,





Please visit the following topic for the solution:





http://www.chemaxon.com/forum/viewpost4060.html#4060





Kind regards,





Szilard