MARVIN QUERIES

ChemAxon 89bfcec588

11-09-2009 19:38:12


My primary use case (right now) is semi-automated generation of chemical
graphs (e.g., PNG or CDX format) from aromatized SMILES.



I have been initially satisfied with Standardizer for dearomatization
and bond angles. I think that I will be happier when I try defining
and using templates to aid the process. The chemists with whom I work
are very fond of the ACS 1996 document settings available in ChemDraw,
as well as monospaced bold-face atom labels, and stereochemistry shown
by equal-width solid or horizontally-dashed bonds rather than
tapering bonds. How does ChemAxon provide control for font, font size
and bond dimensions?



Will templates allow me to show specific hydrogen atoms, such as
to specify steroeochemistry? And will they by any chance allow me
to reduce the font size for certain atoms (e.g., those in
sterically tight areas) while allowing other atoms to remain larger? My
previous experience has been using Standardizer to convert SMILES to MOL
files and using ChemDraw (via Applescript) to apply document
settings, customize fonts and print the structures. An advantage of my
previous approach is that the CDX files can be easily edited manually
and PNGs regenerated. I would be happy to complete the process entirely
within ChemAxon if that is possible. I do appreciate your suggestions.

ChemAxon 7c2d26e5cf

16-09-2009 17:16:27

It is a very complex question. I do not think that one of them answer its all aspects.


I do not know whether you can assign templates to Standardizer to select atoms/bonds by a certain criteria for later higlighting. Gyuri can help you in this question. (Now, he is on the US UGM, probably, he can answer only after he returned.)


But I know that displaying aspect (font size of atom labels, line style of bonds) can be controlled by image exporter module (if you use the API) or by the MolConverter application.


To be able to specify font size and line styles for certain atoms and bonds, you have to describe them in the molecule source file. The MRV format support Marvin display option (alike SMILES).


I recommend to convert the standardization result into MRV format. Render those atoms and bonds that you would like to customize into atom and bond sets and define the display settings of these sets. MRV can store various display options of atom sets (like font-style, color, font-size, etc.). Below, you can see a part of an MRV file where display options of atom sets are defined.


<?xml version="1.0" ?>
<cml>
<MDocument atomSetRGB="0:N,1:N,2:N"
           atomSetFont="1:Monospaced-PLAIN-10,2:Monospaced-PLAIN-10"
           bondSetRGB="0:N">
  <MChemicalStruct>
    <molecule molID="m1">
      <atomArray
          atomID="a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13"
          elementType="C C C C C C C C C C O N P"
          mrvSetSeq="0 0 0 0 0 0 0 0 0 0 2 0 1"


If you use MarvinSketch, you can create this MRV code easy, just select the required atom control its display options via the "Format" menu. When you export the drawn structure into MRV format (Save As MRV or Edit/Source/View/MRV), you can see that Marvin renders customized atoms into atom sets where font-style, font-size and other attributes are stored in the atomSetFont attribute of the MDocument tag.
Of course, you can edit any MRV file manually, in this case you have to identify which atom belongs to which group in the mrvSetSeq attribute of the atomArray tag and define atomsetFont attribute as described above.


If you convert the modified MRV into PNG format, you will see customized settings on required atoms / bonds.

User c71cb8097a

17-09-2009 21:21:56

Thank you Tamas for your helpful reply. Thank you Anu for posting my question. Gyuri and anyone else who is interested in or knowledgeable about this subject, your advice is very much appreciated.


Previous work on solving this was based on reading some of the APIs and using Standardizer rather than exploring Marvin Sketch. I am now finding Marvin Sketch (5.2) pretty useful as you suggest. Thank you for introducing the concept of "atom and bond sets." I will write up my results and remaining questions using the Marvin Sketch preferences and format dialog boxes to mimic the ACS settings as a later post to this thread. I appreciate any help getting started using templates to define the orientation of common substructures. I would also like to show stereochemistry with thick solid or hashed bonds rather than wedges. What would be a smart approach to this? Defining a new bond type or overriding the graphics object for a "Single Up" bond initially appears too complicated. If others are interested in collaboration, please contact about that as well. Thank you.

ChemAxon 990acf0dec

25-09-2009 15:36:23

Thank you Hy, I'm happy to hear that "atom and bond sets" work well for you.


Further discussing the issue you raised we decided to implement a new feature into molconvert to enable the batch formatting of Mrv files using Styles (both journal or custom styles. The only problem is that we have no capacity to implement it into Marvin in version 5.3 (because the commit deadline is very closed), so it will be released only in the 5.4 version. Thank you for your understanding.


Regarding the use of templates, please read the following sections of the documentation:


- http://www.chemaxon.com/marvin/help/sketch/sketch-basic.html#templates


- http://www.chemaxon.com/marvin/help/sketch/gui/toolbars.html#templates


Regarding the thick solid bond: it is under implementation, but we will call it Bold bond. It is coming in version 5.3


Regarding the hashed bond: in Marvin this representation is used for a coordinate bond when it is connected to a multicenter atom, so we cannot implement it to another purpose.


 


Best regards,


Akos