User 22c88daf92
06-12-2012 08:34:51
hello!
We use Marvin applet to draw a structure reaction, than use "applet.getMol("mol")" to get rxn string like follow:
$RXN
Marvin 120601121459
2 1
$MOL
Mrv0541 12061214592D
5 5 0 0 0 0 999 V2000
-4.8321 3.1473 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-5.4996 2.6624 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-5.2446 1.8778 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-4.4196 1.8778 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-4.1647 2.6624 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
1 5 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
M END
$MOL
Mrv0541 12061214592D
5 5 0 0 0 0 999 V2000
-2.1804 1.6382 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
-2.8948 2.0507 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-2.8948 2.8757 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
...........................
How to change the above format to the following rxn string:
$RXN V3000
Marvin 120601121055
M V30 COUNTS 2 1
M V30 BEGIN REACTANT
M V30 BEGIN CTAB
M V30 COUNTS 5 5 0 0 0
M V30 BEGIN ATOM
M V30 1 C -9.02 5.875 0 0
M V30 2 C -10.2659 4.9698 0 0
M V30 3 C -9.79 3.5052 0 0
M V30 4 C -8.25 3.5052 0 0
M V30 5 C -7.7741 4.9698 0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 2
M V30 2 1 1 5
M V30 3 1 2 3
M V30 4 1 3 4
M V30 5 1 4 5
.........................
Is there any java examples? thanks!