Mview import 2D or 3D

User 677b9c22ff

10-07-2008 07:52:54

Hi,


not quite sure if this is a bug or feature,


If I import a molecule as SDF I get different results, depending on the length of the line. Or I get three different results. The 2D or 3D import was due to a corrupt JAVA stack or so, I could not reproduce it (one was white bakcground, the second molecule was black (3D) background.





1) The first one gives a 2D import (correct) - MARVIN07100800423D


2) gives a 3D import (Correct) - MARVINbad07100800423D


3) gives an error in molconvert and Marvin


"internal error: cannot recognize clipboard data format"


Its a defect SMILES - I recreated it from the correct smiles O=S(=O)(Nc1ccccc1)C from Chemspider; but only replaced the coordinates.








This is Marvin 4.1.11


Source is http://pubs.acs.org/cgi-bin/doilookup/?10.1021/ci034007m


http://pubs3.acs.org/acs/journals/supporting_information.page?in_manuscript=ci034007m








--------


ugauga


MARVIN07100800423D


sdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsd


20 20 0 0 0 0 0 0 0 0999 V2000


0.8022 -0.4105 0.0000 O 0 0 0 0 0


0.3897 -1.1250 0.0000 S 0 0 0 0 0


-0.0228 -1.8395 0.0000 O 0 0 0 0 0


-0.3248 -0.7125 0.0000 N 0 0 0 0 0


-0.3248 0.1125 0.0000 C 0 0 0 0 0


0.3897 0.5250 0.0000 C 0 0 0 0 0


0.3897 1.3500 0.0000 C 0 0 0 0 0


-0.3248 1.7625 0.0000 C 0 0 0 0 0


-1.0392 1.3500 0.0000 C 0 0 0 0 0


-1.0392 0.5250 0.0000 C 0 0 0 0 0


1.1042 -1.5375 0.0000 C 0 0 0 0 0


-1.0392 -1.1250 0.0000 H 0 0 0 0 0


1.1042 0.1125 0.0000 H 0 0 0 0 0


1.1042 1.7625 0.0000 H 0 0 0 0 0


-0.3248 2.5875 0.0000 H 0 0 0 0 0


-1.7537 1.7625 0.0000 H 0 0 0 0 0


-1.7537 0.1125 0.0000 H 0 0 0 0 0


1.5167 -0.8230 0.0000 H 0 0 0 0 0


0.6917 -2.2520 0.0000 H 0 0 0 0 0


1.8187 -1.9500 0.0000 H 0 0 0 0 0


1 2 2 0 0 0


2 3 2 0 0 0


2 4 1 0 0 0


2 11 1 0 0 0


4 5 1 0 0 0


4 12 1 0 0 0


5 6 1 0 0 0


5 10 2 0 0 0


6 7 2 0 0 0


6 13 1 0 0 0


7 8 1 0 0 0


7 14 1 0 0 0


8 9 2 0 0 0


8 15 1 0 0 0


9 10 1 0 0 0


9 16 1 0 0 0


10 17 1 0 0 0


11 18 1 0 0 0


11 19 1 0 0 0


11 20 1 0 0 0


M END


$$$$








----------------------------





ugauga


MARVINbad07100800423D


sdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsd


20 20 0 0 0 0 0 0 0 0999 V2000


0.8022 -0.4105 0.0000 O 0 0 0 0 0


0.3897 -1.1250 0.0000 S 0 0 0 0 0


-0.0228 -1.8395 0.0000 O 0 0 0 0 0


-0.3248 -0.7125 0.0000 N 0 0 0 0 0


-0.3248 0.1125 0.0000 C 0 0 0 0 0


0.3897 0.5250 0.0000 C 0 0 0 0 0


0.3897 1.3500 0.0000 C 0 0 0 0 0


-0.3248 1.7625 0.0000 C 0 0 0 0 0


-1.0392 1.3500 0.0000 C 0 0 0 0 0


-1.0392 0.5250 0.0000 C 0 0 0 0 0


1.1042 -1.5375 0.0000 C 0 0 0 0 0


-1.0392 -1.1250 0.0000 H 0 0 0 0 0


1.1042 0.1125 0.0000 H 0 0 0 0 0


1.1042 1.7625 0.0000 H 0 0 0 0 0


-0.3248 2.5875 0.0000 H 0 0 0 0 0


-1.7537 1.7625 0.0000 H 0 0 0 0 0


-1.7537 0.1125 0.0000 H 0 0 0 0 0


1.5167 -0.8230 0.0000 H 0 0 0 0 0


0.6917 -2.2520 0.0000 H 0 0 0 0 0


1.8187 -1.9500 0.0000 H 0 0 0 0 0


1 2 2 0 0 0


2 3 2 0 0 0


2 4 1 0 0 0


2 11 1 0 0 0


4 5 1 0 0 0


4 12 1 0 0 0


5 6 1 0 0 0


5 10 2 0 0 0


6 7 2 0 0 0


6 13 1 0 0 0


7 8 1 0 0 0


7 14 1 0 0 0


8 9 2 0 0 0


8 15 1 0 0 0


9 10 1 0 0 0


9 16 1 0 0 0


10 17 1 0 0 0


11 18 1 0 0 0


11 19 1 0 0 0


11 20 1 0 0 0


M END


$$$$





-----------





no929


Cerius2 04269913163D 1 1.00000


Structure written by MSI Cerius2 SD Exporter


20 20 0 0 0 0 999 V2000


0.8022 -0.4105 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0


0.3897 -1.1250 0.0000 S 0 0 0 0 0 0 0 0 0 0 0 0


-0.0228 -1.8395 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0


-0.3248 -0.7125 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0


-0.3248 0.1125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0


0.3897 0.5250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0


0.3897 1.3500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0


-0.3248 1.7625 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0


-1.0392 1.3500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0


-1.0392 0.5250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0


1.1042 -1.5375 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0


-1.0392 -1.1250 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0


1.1042 0.1125 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0


1.1042 1.7625 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0


-0.3248 2.5875 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0


-1.7537 1.7625 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0


-1.7537 0.1125 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0


1.5167 -0.8230 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0


0.6917 -2.2520 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0


1.8187 -1.9500 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0


1 2 2 0 0 0 0


2 3 2 0 0 0 0


2 4 1 0 0 0 0


4 5 1 0 0 0 0


5 6 1 0 0 0 0


6 7 2 0 0 0 0


7 8 1 0 0 0 0


8 9 2 0 0 0 0


9 10 1 0 0 0 0


5 10 2 0 0 0 0


2 11 1 0 0 0 0


4 12 1 0 0 0 0


6 13 1 0 0 0 0


7 14 1 0 0 0 0


8 15 1 0 0 0 0


9 16 1 0 0 0 0


10 17 1 0 0 0 0


11 18 1 0 0 0 0


11 19 1 0 0 0 0


11 20 1 0 0 0 0


M END


> <logP>


0.950000





$$$$








-------





If I put everything into an SDF file I get the div zero message:





/ by zero


Exception occurred during event dispatching:


java.lang.ArithmeticException: / by zero


at chemaxon.marvin.view.swing.modules.GridBagView.visibleIndex(GridBagView.java:2660)


at chemaxon.marvin.view.swing.modules.GridBagView.setL(GridBagView.java:1227)


at chemaxon.marvin.view.swing.ViewPanel.setL(ViewPanel.java:1435)


at chemaxon.marvin.beans.MViewPane.setL(MViewPane.java:607)


at chemaxon.marvin.View.fillCell(View.java:824)


at chemaxon.marvin.View.fillCells(View.java:873)


at chemaxon.marvin.View.showMolecules(View.java:726)


at chemaxon.marvin.View.access$800(View.java:52)


at chemaxon.marvin.View$12.run(View.java:1191)


at java.awt.event.InvocationEvent.dispatch(Unknown Source)


at java.awt.EventQueue.dispatchEvent(Unknown Source)


at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)


at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)


at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)


at java.awt.Dialog$1.run(Unknown Source)


at java.awt.Dialog$3.run(Unknown Source)


at java.security.AccessController.doPrivileged(Native Method)


at java.awt.Dialog.show(Unknown Source)


at javax.swing.JOptionPane.showOptionDialog(Unknown Source)


at chemaxon.marvin.common.swing.modules.ExceptionFrame.runErrorDialog(ExceptionFrame.java:136)


at chemaxon.marvin.common.swing.modules.ExceptionFrame.run(ExceptionFrame.java:114)


at java.awt.event.InvocationEvent.dispatch(Unknown Source)


at java.awt.EventQueue.dispatchEvent(Unknown Source)


at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)


at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)


at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)


at java.awt.EventDispatchThread.pumpEvents(Unknown Source)


at java.awt.EventDispatchThread.pumpEvents(Unknown Source)


at java.awt.EventDispatchThread.run(Unknown Source)








---





chemaxon.formats.MolFormatException: Neither in MDL mol nor in SDfile format.


at chemaxon.marvin.modules.MolImport.readMol0(MolImport.java:696)


at chemaxon.marvin.modules.MolImport.readMol(MolImport.java:265)


at chemaxon.formats.MolImporter.readDoc(MolImporter.java:697)


at chemaxon.formats.MolImporter.nextDoc(MolImporter.java:622)


at chemaxon.marvin.view.MDocStorage.readDoc(MDocStorage.java:2289)


at chemaxon.marvin.view.MDocStorage.tryToExtend(MDocStorage.java:866)


at chemaxon.marvin.view.MDocStorage.getMainDoc(MDocStorage.java:813)


at chemaxon.marvin.View.readStream(View.java:569)


at chemaxon.marvin.View.main(View.java:1176)


Caused by: java.lang.NumberFormatException: For input string: "0 0"


at java.lang.NumberFormatException.forInputString(Unknown Source)


at java.lang.Integer.parseInt(Unknown Source)


at java.lang.Integer.parseInt(Unknown Source)


at chemaxon.marvin.modules.MolImport.atoiV2(MolImport.java:1769)


at chemaxon.marvin.modules.MolImport.readCtab(MolImport.java:974)


at chemaxon.marvin.modules.MolImport.readMol0(MolImport.java:681)


... 8 more





Tobias

ChemAxon 7c2d26e5cf

11-07-2008 13:18:22

We will check it.

ChemAxon e500b51457

18-07-2008 08:09:31

Hi,





Some spaces were missing in the third structure of bad.sdf. The numbers in atom and bond block are on a fixed position in V2000 format. After adding the missing spaces the sdf file can be opened with Marvin. Here I attach the fixed sdf file.





Regards,


Erika.

User 677b9c22ff

19-07-2008 01:01:33

Hello Erika,


thank you. I think closing any app after a exception is a good practice. So some of the mentioned problems arose from that.


Have a nice weekend!


Tobias

ChemAxon e500b51457

22-07-2008 19:44:00

Hello,





Yes, exception handling is important in this case we will improve it.


Did extra spaces solve all of your problems?





Erika.

User 677b9c22ff

23-07-2008 01:02:33

Hi Erika,


I just replaced it with the correct structure from Chemspider or PubChem. Thanks.





Tobias

User 677b9c22ff

24-07-2008 02:48:55

Hi Erika,


sorry I sent you the wrong structures, the file was created after MVIEW


had a div/0 so the structures were faulty.





If you co to the original source (training_set.sdf) you will find the faulty


structures and the reason for mviews chocking was an addiional space


in front of the atom number count.





Usually mview just says "can not recognize" if you paste a single structure,


only if you put it into an sdf and load it it will give the div/0





Cheers Tobias








Code:



no928 - is ok (one space removed) in front of 21


  Cerius2 04269913163D 1   1.00000   


Structure written by MSI Cerius2 SD Exporter


 21 21  0  0  0  0  0  0  0  0999 V2000


   -4.3871    0.2340    2.7546 N   0  0  0  0  0  0


   -3.4196   -0.2519    1.9457 C   0  0  0  0  0  0


   -3.2874   -1.5886    1.6265 C   0  0  0  0  0  0


   -4.2164   -2.4740    2.1653 C   0  0  0  0  0  0


   -5.2080   -2.0136    3.0293 C   0  0  0  0  0  0


   -5.2501   -0.6568    3.2877 C   0  0  0  0  0  0


   -4.0875   -3.9123    1.8512 C   0  0  0  0  0  0


   -2.9908   -4.4542    1.9507 O   0  0  0  0  0  0


   -5.2090   -4.6248    1.4488 N   0  0  0  0  0  0


   -6.3330   -4.0352    0.8339 N   0  0  0  0  0  0


   -2.5001    0.6057    1.3772 O   0  0  0  0  0  0


   -2.6626    1.9573    1.7944 C   0  0  0  0  0  0


   -2.4860   -1.9290    0.9804 H   0  0  0  0  0  0


   -5.9094   -2.6891    3.5047 H   0  0  0  0  0  0


   -5.9966   -0.2347    3.9551 H   0  0  0  0  0  0


   -4.9927   -5.5893    1.1927 H   0  0  0  0  0  0


   -6.0346   -3.2674    0.2263 H   0  0  0  0  0  0


   -6.9435   -3.6342    1.5470 H   0  0  0  0  0  0


   -3.6356    2.3546    1.4853 H   0  0  0  0  0  0


   -1.8889    2.5531    1.3003 H   0  0  0  0  0  0


   -2.5211    2.0586    2.8761 H   0  0  0  0  0  0


  1  2  1  0  0  0


  1  6  2  0  0  0


  2 11  1  0  0  0


  3  2  2  0  0  0


  3 13  1  0  0  0


  4  3  1  0  0  0


  4  7  1  0  0  0


  5  4  2  0  0  0


  5 14  1  0  0  0


  6  5  1  0  0  0


  6 15  1  0  0  0


  7  8  2  0  0  0


  7  9  1  0  0  0


  9 10  1  0  0  0


  9 16  1  0  0  0


 10 17  1  0  0  0


 10 18  1  0  0  0


 11 12  1  0  0  0


 12 19  1  0  0  0


 12 20  1  0  0  0


 12 21  1  0  0  0


M  END


>  <logP>


-0.100000





$$$$


no928 - is not ok - original with two spaces in front of 21


  Cerius2 04269913163D 1   1.00000   


Structure written by MSI Cerius2 SD Exporter


  21 21  0  0  0  0  0  0  0  0999 V2000


   -4.3871    0.2340    2.7546 N   0  0  0  0  0  0


   -3.4196   -0.2519    1.9457 C   0  0  0  0  0  0


   -3.2874   -1.5886    1.6265 C   0  0  0  0  0  0


   -4.2164   -2.4740    2.1653 C   0  0  0  0  0  0


   -5.2080   -2.0136    3.0293 C   0  0  0  0  0  0


   -5.2501   -0.6568    3.2877 C   0  0  0  0  0  0


   -4.0875   -3.9123    1.8512 C   0  0  0  0  0  0


   -2.9908   -4.4542    1.9507 O   0  0  0  0  0  0


   -5.2090   -4.6248    1.4488 N   0  0  0  0  0  0


   -6.3330   -4.0352    0.8339 N   0  0  0  0  0  0


   -2.5001    0.6057    1.3772 O   0  0  0  0  0  0


   -2.6626    1.9573    1.7944 C   0  0  0  0  0  0


   -2.4860   -1.9290    0.9804 H   0  0  0  0  0  0


   -5.9094   -2.6891    3.5047 H   0  0  0  0  0  0


   -5.9966   -0.2347    3.9551 H   0  0  0  0  0  0


   -4.9927   -5.5893    1.1927 H   0  0  0  0  0  0


   -6.0346   -3.2674    0.2263 H   0  0  0  0  0  0


   -6.9435   -3.6342    1.5470 H   0  0  0  0  0  0


   -3.6356    2.3546    1.4853 H   0  0  0  0  0  0


   -1.8889    2.5531    1.3003 H   0  0  0  0  0  0


   -2.5211    2.0586    2.8761 H   0  0  0  0  0  0


  1  2  1  0  0  0


  1  6  2  0  0  0


  2 11  1  0  0  0


  3  2  2  0  0  0


  3 13  1  0  0  0


  4  3  1  0  0  0


  4  7  1  0  0  0


  5  4  2  0  0  0


  5 14  1  0  0  0


  6  5  1  0  0  0


  6 15  1  0  0  0


  7  8  2  0  0  0


  7  9  1  0  0  0


  9 10  1  0  0  0


  9 16  1  0  0  0


 10 17  1  0  0  0


 10 18  1  0  0  0


 11 12  1  0  0  0


 12 19  1  0  0  0


 12 20  1  0  0  0


 12 21  1  0  0  0


M  END


>  <logP>


-0.100000





$$$$


ChemAxon e500b51457

27-07-2008 20:11:58

Hi Tobias,





I got MolFormatException instead of div/0 with Marvin 5.0.6. Please update your Marvin.





Regards,


Erika.