User 870ab5b546
22-08-2006 23:23:31
At the UGM, you showed us shortcut group labels that switched directions depending on the way the bond was coming in. E.g., it could be CO2Me or MeO2C, and the bond would always point to the letter C. I notice this feature is not present in Marvin 4.1. Is it not yet ready for primetime?
User f359e526a1
23-08-2006 08:14:23
User 870ab5b546
23-08-2006 14:39:31
Ah, we have our own default file. I will modify it or just use yours.
User 870ab5b546
26-08-2006 15:32:00
OK, I draw 4-bromoanisole with a shortcut OMe group on the left side of the benzene ring, and it looks great. (See figure 1.) I store the document in the JChem database. When I retrieve it and look at it again, the OMe group is facing the wrong way. (See figure 2.) If I roll the benzene around in a circle, the OMe group never changes its direction. However, if I delete it and redraw it, it goes back to the proper behavior of figure 1.
???
Here's the source:
Code: |
<?xml version="1.0" ?>
<MDocument>
<MChemicalStruct>
<molecule molID="m1">
<atomArray
atomID="a1 a2 a3 a4 a5 a6 a7 a8"
elementType="C C C C C C Br R"
sgroupRef="0 0 0 0 0 0 0 sg1"
x2="2.15824 0.8246933333333335 0.8246933333333335 2.15824 3.491973333333334 3.491973333333334 4.825706666666667 -0.5089857884947018"
y2="5.740000000000001 4.970000000000001 3.43 2.6600000000000006 3.43 4.970000000000001 5.740000000000001 2.6599999999999997"
/>
<bondArray>
<bond atomRefs2="a1 a2" order="1" />
<bond atomRefs2="a1 a6" order="2" />
<bond atomRefs2="a2 a3" order="2" />
<bond atomRefs2="a3 a4" order="1" />
<bond atomRefs2="a4 a5" order="2" />
<bond atomRefs2="a5 a6" order="1" />
<bond atomRefs2="a6 a7" order="1" />
<bond atomRefs2="a3 a8" order="1" />
</bondArray>
<molecule id="sg1" role="SuperatomSgroup" title="OMe" leftName="MeO" molID="m2">
<atomArray
atomID="a9 a10"
elementType="O C"
attachmentPoint="1 0"
x2="3.031875011920929 1.491875011920929"
y2="3.3687500953674316 3.3687500953674316"
/>
<bondArray>
<bond atomRefs2="a10 a9" order="1" />
</bondArray>
</molecule>
</molecule>
</MChemicalStruct>
</MDocument>
|
The relevant part of the jsp page containing the applet call is:
Code: |
<script type="text/javascript">
msketch_name="ans_applet";
msketch_begin("/nosession/marvin", 410, 320);
// arguments: CODEBASE, WIDTH, HEIGHT
msketch_param("preload",
"SmilesExport,MolExport,Clean2D,Parity");
msketch_param("molbg", "#ffffff");
msketch_param("scale", "32"); // also increases atom font size
msketch_param("tmpls0",
":Generic:chemaxon/marvin/templates/generic.t");
msketch_param("tmpls1",
":Rings:chemaxon/marvin/templates/rings.t");
msketch_param("tmpls2",
":Polycyclics:chemaxon/marvin/templates/polycyclics.t");
msketch_param("tmpls3",
":Conformers:chemaxon/marvin/templates/conformers.t");
msketch_param("mol","<%=ChemUtils.toAppletParam(materials)%>");
msketch_param("abbrevgroups","ACE.abbrevgroups");
msketch_param("implicitH","heteroterm");
msketch_end();
</script> |
The relevant part of ACE.abbrevgroups is:
Code: |
MeO CO 2 rightName=OMe
OMe CO 2 leftName=MeO |
User 870ab5b546
26-08-2006 15:39:21
I figured out the source of the bug. I was storing the molecule in MOL format. When a molecule in MOL format is loaded, the rightname/leftname business doesn't work. If I change the loaded molecule to MRV format, it does work.
User 870ab5b546
23-10-2006 18:13:14
Any idea when this bug will be fixed?
User f359e526a1
23-10-2006 18:51:34
I am not really aware that this feature (left/right name) can be used in MOL format. Have you seen it somewhere?
User 870ab5b546
23-10-2006 20:13:38
No, I haven't seen it anywhere. But if I import a MOL file into Marvin, and the file contains a shortcut group that is in the abbrevgroups file, and the group in the file contains a rightName and a leftName, why not display it properly?
User 870ab5b546
24-10-2006 12:20:41
Here's another minor bug. The shortcut group P+Ph3 has the rightName Ph3P+, but the bond points to the Ph, not the P or even the +. See the picture below. The source is also below.
For those of you using or contemplating use of AJAX, the + character in the name of a shortcut group can cause some problems, discussed here:
1. The + symbol is not being feathered by the JavaScript escape() function. One needs to feather it explicitly to '%2b'. That operation is ticklish. I finally got it to feather properly by only doing so after an S character (here, S means superscript).
2. The page returned by the server can contain the string \\S+\\n to mean \S+\n, which means superscript +. But our parsing routines in extractField() convert the \n part to a newline. Converting correctly is ticklish, because in most contexts, \n should be a newline.
Code: |
<?xml version="1.0" ?>
<MDocument>
<MChemicalStruct>
<molecule molID="m1">
<atomArray
atomID="a1 a2 a3 a4 a5 a6 a7 a8 a9 a10"
elementType="C C C C C C C C R R"
sgroupRef="0 0 0 0 0 0 0 0 sg1 sg2"
x2="-4.379374980926514 -5.713054102754549 -7.046723443802808 -8.380392784851066 -8.380392784851066 -7.046723443802808 -5.713054102754549 -9.714076796988298 -3.045695859098478 -11.047755918816334"
y2="-0.24062499403953552 0.529375005960465 2.8394258276375863 2.069408887078546 0.529375005960465 -0.2406419345985754 2.069408887078546 2.8394004167524374 0.5293750059604644 2.069400416752437"
/>
<bondArray>
<bond atomRefs2="a1 a2" order="1" />
<bond atomRefs2="a6 a2" order="1" />
<bond atomRefs2="a2 a7" order="2" />
<bond atomRefs2="a3 a4" order="2" />
<bond atomRefs2="a4 a5" order="1" />
<bond atomRefs2="a5 a6" order="2" />
<bond atomRefs2="a3 a7" order="1" />
<bond atomRefs2="a4 a8" order="1" />
<bond atomRefs2="a1 a9" order="1" />
<bond atomRefs2="a8 a10" order="1" />
</bondArray>
<molecule id="sg1" role="SuperatomSgroup" title="P+Ph3"
leftName="Ph3P+" molID="m2">
<atomArray
atomID="a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29"
elementType="P C C C C C C C C C C C C C C C C C C"
formalCharge="1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"
attachmentPoint="1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"
x2="-4.090624809265137 -2.756945687437101 -2.756945687437101 -4.090624809265137 -5.424303931093172 -5.424303931093172 -4.0906248092651385 -5.424303931093172 -5.424303931093172 -6.757983052921208 -8.091662174749246 -8.091662174749246 -6.757983052921208 -2.756945687437101 -1.4232665656090653 -0.08958744378102956 -0.08958744378102779 -1.4232665656090617 -2.7569456874370992"
y2="-0.09624999761581376 -3.946249997615814 -2.4062499976158143 -1.6362499976158138 -2.4062499976158134 -3.946249997615814 -4.716249997615814 0.6737500023841858 2.2137500023841863 2.983750002384186 2.2137500023841863 0.6737500023841867 -0.09624999761581421 0.6737500023841858 -0.0962499976158151 0.673750002384184 2.2137500023841845 2.983750002384186 2.2137500023841863"
/>
<bondArray>
<bond atomRefs2="a17 a12" order="2" />
<bond atomRefs2="a17 a16" order="1" />
<bond atomRefs2="a12 a13" order="1" />
<bond atomRefs2="a13 a14" order="2" />
<bond atomRefs2="a14 a15" order="1" />
<bond atomRefs2="a14 a11" order="1" />
<bond atomRefs2="a15 a16" order="2" />
<bond atomRefs2="a11 a18" order="1" />
<bond atomRefs2="a11 a24" order="1" />
<bond atomRefs2="a18 a19" order="2" />
<bond atomRefs2="a18 a23" order="1" />
<bond atomRefs2="a19 a20" order="1" />
<bond atomRefs2="a20 a21" order="2" />
<bond atomRefs2="a21 a22" order="1" />
<bond atomRefs2="a22 a23" order="2" />
<bond atomRefs2="a24 a25" order="2" />
<bond atomRefs2="a24 a29" order="1" />
<bond atomRefs2="a25 a26" order="1" />
<bond atomRefs2="a26 a27" order="2" />
<bond atomRefs2="a27 a28" order="1" />
<bond atomRefs2="a28 a29" order="2" />
</bondArray>
</molecule>
<molecule id="sg2" role="SuperatomSgroup" title="P+Ph3"
leftName="Ph3P+" molID="m3">
<atomArray
atomID="a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 a46 a47 a48"
elementType="P C C C C C C C C C C C C C C C C C C"
formalCharge="1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"
attachmentPoint="1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"
x2="-9.961874961853027 -8.628195840024992 -8.628195840024992 -9.961874961853027 -11.295554083681063 -11.295554083681063 -9.96187496185303 -11.295554083681063 -11.295554083681063 -12.629233205509099 -13.962912327337136 -13.962912327337136 -12.629233205509099 -8.628195840024992 -7.294516718196956 -5.96083759636892 -5.960837596368918 -7.294516718196952 -8.62819584002499"
y2="2.9356250762939458 -0.9143749237060548 0.6256250762939453 1.3956250762939457 0.6256250762939461 -0.9143749237060539 -1.6843749237060548 3.705625076293945 5.245625076293946 6.015625076293945 5.245625076293946 3.7056250762939467 2.9356250762939453 3.705625076293945 2.9356250762939444 3.705625076293943 5.245625076293944 6.015625076293945 5.245625076293946"
/>
<bondArray>
<bond atomRefs2="a36 a31" order="2" />
<bond atomRefs2="a36 a35" order="1" />
<bond atomRefs2="a31 a32" order="1" />
<bond atomRefs2="a32 a33" order="2" />
<bond atomRefs2="a33 a34" order="1" />
<bond atomRefs2="a33 a30" order="1" />
<bond atomRefs2="a34 a35" order="2" />
<bond atomRefs2="a30 a37" order="1" />
<bond atomRefs2="a30 a43" order="1" />
<bond atomRefs2="a37 a38" order="2" />
<bond atomRefs2="a37 a42" order="1" />
<bond atomRefs2="a38 a39" order="1" />
<bond atomRefs2="a39 a40" order="2" />
<bond atomRefs2="a40 a41" order="1" />
<bond atomRefs2="a41 a42" order="2" />
<bond atomRefs2="a43 a44" order="2" />
<bond atomRefs2="a43 a48" order="1" />
<bond atomRefs2="a44 a45" order="1" />
<bond atomRefs2="a45 a46" order="2" />
<bond atomRefs2="a46 a47" order="1" />
<bond atomRefs2="a47 a48" order="2" />
</bondArray>
</molecule>
</molecule>
</MChemicalStruct>
</MDocument>
|
ChemAxon 7c2d26e5cf
26-10-2006 15:37:07
We are thinking on how to solve righname/leftname issue. It is not an easy question.
Thanks for the new comment in this issue.
User f359e526a1
27-10-2006 08:20:41
Indeed, it sounds like a simple enhancement to include left names from the dictionary when importing MOL files, but it is not so. In the files (irrespecively whether is it an MRV or MOL file) when you have a SuperatomSgroup its atoms have coordinates and the order of atoms is arbitrary. But not in the abbreviated group dictionary. So when you have a "COOH" abbreviation in the MOL file, I can certainly look up whether we have a similar abbreviation, but I have to match atoms (make a substructure search), create a SuperatomSroup, find the attachment point, assign coordinates (abbreviated groups are represented as SMILES in the dictionary). If you check the MRV format, to avoid this we are actually saving everything into the file - when you are reading back it next time I am using the descriptions in the file and are not conserned about things stored in the dictionary. So it is doable, but not as straightforward is it looks for the first sight. I will make a task to myself but being honest I will assign a low priority to it.
Not for the other two things. I was aware of possible problems as a bond pointing towards the 'h' in Ph3P+ left name (actually it is pointing towards the first P) and that can be mended. I have not dive into JavaScript and AJAX - apparently I have to. Will try to fix the last two for the next minor release if possible.