Different renderings of the same chemical structure

User 4ceb4fe234

23-06-2008 07:12:22

Hi everybody,





I've rendered a chemical structure using your AJAX demo jsp mol2image.jsp. I've added the following code into the jsp to get identically sized images:





// Rescale image


MolImageSize misize = mol.getImageSize( format );


double scale = 26;


if( misize.scale >= 26 )


format = format+ ",scale" + String.valueOf( scale );





The strange thing happens when I pass the same structure in different formats to the rendering page. A benzene ring in standard molfile format is about 50% larger than the same ring with identical coordinates and bonds and atom numbering but saved in molfile v3 format. See the four attached files for an example.





Can you help me with this?





Thanks in advance!





Helge

ChemAxon 7c2d26e5cf

23-06-2008 23:11:07

Indeed, the molfile3.mol (MDL extended molfile) is smaller than molfile2.mol (MDL molfile). We will check it.


How did you created molfile3.mol? When I convert molfile3.mol back to "mol" format, I give different output.

User 4ceb4fe234

24-06-2008 11:18:13

Hi Tamas,





the molfiles are comig from our own conversion library. The original structure is stroed in an internal format and converted to molfile or molfile v3, respectively.





So, we don't have an original molfile, they are both only result of a conversion. This conversion is only a format conversion, the underlying chemical structure remains unchanged.





Helge

ChemAxon 7c2d26e5cf

24-06-2008 18:31:54

Have you used Marvin for the conversion?

ChemAxon 909aee4527

30-07-2008 09:47:53

Hello Helge,





In v2 and v3 formats the coordinates are supposed to be scaled differently, for details please visit:


http://www.chemaxon.com/marvin/help/formats/mol-csmol-doc.html#ioption_b





This means that if you save a molecule with Marvin in mol v2 or v3 formats, you'll have different coordinates unless a scaling option is specified.


In your structure files, the coordinates are the same, but the importer interprets them differently.


For the v2 format, we have an option to correct the scaling, but in this case the structure with v3 format is that appears wrong.


We will extend the bXXX option for v3 format in the 5.1 version.





Until that, if you have the possibility, you should use a scaling with v3 when doing the conversion.





Hope this helps.


Kind regards,


Judit

ChemAxon 990acf0dec

30-01-2009 12:51:17

Hi Helge,





I'm not sure whether you realized that this has already been fixed (actually long time ago), so let me inform you that the bXXX option is available in V3 format since 5.1.





Best regards,





Akos

User 4ceb4fe234

17-02-2009 12:31:46

Hi Akos,





thanks for your reminder! I really didn't realize that this option is implemented; I just simply forgot - too much to do.





I'll implement it ASAP.





Thanks





Helge

User 9852713200

16-07-2009 18:28:00

Hello,


In Marvin 5.2.3, when I open a MDL V3000 molfile, it still looks strange because the scale is not right.  Please see attachments.


Is there any way to make it look good (just like V2000 format) right after opening a V3000 mol file without any tweak?


Thanks!

ChemAxon 909aee4527

20-07-2009 10:19:52

Hi,


we are sorry for the late reply.


Using the -b option is necessary to receive the good scaling. You can use it for example as a program argument: "V3000.mol{b0.825}".


Is this solution solution suitable for you? How do you use Marvin: as a desktop application or an intergated tool?


Kind regards,
Judit


 

User 9852713200

20-07-2009 14:58:28

Hello,


I was using a standalone MarvinView that comes from the MarvinBean intallation directly.  So there is no customization at all.  You can reproduce it by dragging this V3000.mol file into the MarvinView 5.2.3.


From user's standpoint, I think, the good scaling should be handled by the program itself by recognizing the input file format without any tweak or customized options.


Please advice.


Thanks!

User ef5e605ae6

21-07-2009 15:52:40











Good idea but how? Can you point us to the MDL documentation page which defines the distance unit or at least the relative size of atom labels? The format is documented in
http://www.symyx.com/downloads/public/ctfile/ctfile.pdf


I have never found this info in the docs and never even had a chance to try it out with an MDL program (since ISISDraw can only write V2000). Our empirical observation is that the entirely inexplicable magic number, 0.825,  is only used in V2000 and 2D. 3D files use Angstrom units in which the average C-C bond length is almost two times the 2D value. Since this difference between 2D and 3D is irrational, we assumed that the untestable V3000 format uses Angstrom both in 2D and 3D. Marvin writes V3000 molfiles using this assumption since the last millenium. This may be a wrong assumption but your V3000.mol file does not falsify it because it was saved in ChemDraw which is not an MDL program either.

User 9852713200

21-07-2009 17:01:05

OK.  So what should I do if I want to receive the good scaling for a V3000 mol file in the following scenarios:

1) Using Marvin APIs, assume I have a Molecule object

2) Using molconvert program.  Is syntax "molconvert.bat mol:V3b0.825 inputfile -o outputfile" right?

3) Using MarvinView to display a V3000 mol file


Many Thanks!

User ef5e605ae6

21-07-2009 19:04:06











It depends on what V3000 mol file you want to see. If it was generated by Marvin, then you do not need any option. If it was generated by an MDL program, then I have no idea (see above). If it was generated by any other program which uses a distance unit different than Angstrom, then you have to experiment with various numbers for the "b" import option to find out which value works.


1) You can specify "bXXXX" (where XXXX is the number you found to work) as the opts argument of the MolImporter constructor. You can also append "{bXXXX}" to the fname argument In case of constructors without opts argument.


2) If outputfile is intended to be ChemDraw mol V3000 but inputfile is something else, then it should work.


3) Import options can only be specified in the command line. You have to run mview with the following command: mview chemdrawV3000molfile.mol{b0.825}

User ef5e605ae6

21-07-2009 19:38:22











I created a special workaround for ChemDraw V3000 molfiles, their import will work without options in marvin 5.2.4.

User 9852713200

21-07-2009 21:32:35

Thanks!