don't lose molecule names with cxcalc

User 187e4c3b19

13-05-2011 15:12:43

Hi,


 


I would like to use cxcalc for the generation of protonation states etc,


but when I use it I get something like


1 smiles1


2 smiles2


...


 


the problem here is, that the original names are lost. As you can see, here, in a mol2 file you can add a name for each molecule (i.e. the line 


Hi,


I would like to use cxcalc for the generation of protonation states etc,


but when I use it I get something like


1 smiles1


2 smiles2


...


the
problem here is, that the original names are lost. As you can see,
here, in a mol2 file you can add a name for each molecule (i.e. the line
NAMEOFMYMOLECULE).


@<TRIPOS>MOLECULE
NAMEOFMYMOLECULE
26 28 1

...


 


I would like to save that somehow so that I get:


NAME1 smiles1


NAME2 smiles2


...


 


I tried to play with the -i option, but it does not work.


I tried for example "cxcalc -i ID", the result is


null  smiles1


null  smiles2


....


 


What other options can I use with -i ??? Where can I find further informations about it, the help message is not so helpfull.


Which ID comment is ment with "-i ID" ??? I do not have such a thing in my SDF / MOL2 file.


 


kind regards


Sören


 

ChemAxon e08c317633

13-05-2011 15:36:44

Hi,


-i, --id <tag name|format>     SDFile tag that stores the molecule ID
if no such tag exists in the input molecule
then molecule ID is the molecule itself
converted to the specified format
(default: ID = molecule index)

You can specify an SDF tag (= field name, property) after the "--id" command line option. If there is no "ID" field in your molecules then "ID" will not work.


Could you attach an example molecule file? If it contains any SDF properties then we can show you an example.


Zsolt

User 187e4c3b19

17-05-2011 13:45:46

Here is a standart entry of my sdf files:


maybridge78
 OpenBabel12070923223D

 36 38  0  0  0  0  0  0  0  0999 V2000
   -3.9590    0.2920   -2.3290 N   0  0  0  0  0
   -3.3160    0.2850   -1.3940 C   0  0  0  0  0
   -2.4870    0.2930   -0.1730 C   0  0  0  0  0
   -3.0380   -0.6670    0.8930 C   0  0  0  0  0
   -2.1670   -0.6110    2.1480 C   0  0  0  0  0
   -0.6970   -0.8870    1.8250 C   0  0  0  0  0
   -0.1180    0.0870    0.7750 C   0  0  0  0  0
   -0.2790    1.4160    1.3610 N   0  0  0  0  0
    0.2270    2.4740    0.9250 C   0  0  0  0  0
    0.9470    2.7870   -0.2390 N   0  0  0  0  0
    1.6770    1.9890   -0.8770 C   0  0  0  0  0
    1.9950    0.5310   -0.6830 C   0  0  0  0  0
    3.5010    0.3160   -0.7350 C   0  0  0  0  0
    4.0050   -0.8510   -0.3700 C   0  0  0  0  0
    3.1070   -1.9110    0.1110 C   0  0  0  0  0
    1.8780   -1.6210    0.5120 C   0  0  0  0  0
    1.4060   -0.1720    0.5490 C   0  0  0  0  0
   -1.0000    0.0040   -0.5140 C   0  0  0  0  0
   -0.8660   -1.3100   -1.1770 C   0  0  0  0  0
   -0.7670   -2.3220   -1.6820 N   0  0  0  0  0
   -2.5250    1.3020    0.2160 H   0  0  0  0  0
   -3.0630   -1.6750    0.4900 H   0  0  0  0  0
   -4.0600   -0.3910    1.1230 H   0  0  0  0  0
   -2.2620    0.3580    2.6210 H   0  0  0  0  0
   -2.5180   -1.3520    2.8600 H   0  0  0  0  0
   -0.0980   -0.8070    2.7260 H   0  0  0  0  0
   -0.6150   -1.9070    1.4710 H   0  0  0  0  0
    0.0450    3.3640    1.5050 H   0  0  0  0  0
    2.1530    2.4070   -1.7550 H   0  0  0  0  0
    1.5950    0.0490   -1.5790 H   0  0  0  0  0
    4.1270    1.1040   -1.1160 H   0  0  0  0  0
    5.0610   -1.0440   -0.4350 H   0  0  0  0  0
    3.4670   -2.9240    0.1380 H   0  0  0  0  0
    1.2430   -2.4040    0.8710 H   0  0  0  0  0
    1.8730    0.2660    1.4300 H   0  0  0  0  0
   -0.6770    0.7470   -1.2310 H   0  0  0  0  0
  1  2  3  0  0  0
  2  3  1  0  0  0
  3  4  1  0  0  0
  3 18  1  0  0  0
  3 21  1  0  0  0
  4  5  1  0  0  0
  4 22  1  0  0  0
  4 23  1  0  0  0
  5  6  1  0  0  0
  5 24  1  0  0  0
  5 25  1  0  0  0
  6  7  1  0  0  0
  6 26  1  0  0  0
  6 27  1  0  0  0
  7  8  1  0  0  0
  7 17  1  0  0  0
  7 18  1  0  0  0
  8  9  2  0  0  0
  9 10  1  0  0  0
  9 28  1  0  0  0
 10 11  2  0  0  0
 11 12  1  0  0  0
 11 29  1  0  0  0
 12 13  1  0  0  0
 12 17  1  0  0  0
 12 30  1  0  0  0
 13 14  2  0  0  0
 13 31  1  0  0  0
 14 15  1  0  0  0
 14 32  1  0  0  0
 15 16  2  0  0  0
 15 33  1  0  0  0
 16 17  1  0  0  0
 16 34  1  0  0  0
 17 35  1  0  0  0
 18 19  1  0  0  0
 18 36  1  0  0  0
 19 20  3  0  0  0
M  END
$$$$


Here it ends.


It would be nice to have the name instead of the id in the file as output (i.e. maybridge78).


What do I have to insert now to use the -ID option? Does it only work with SDF files or can it be used with MOL2 too?


 

ChemAxon e08c317633

23-05-2011 15:32:14

There are no SDF fields in your molecule file. I created a property field named "ID" in your molecule file, it contains the name of the molecule. This field can provide the id.


Example:


$ cxcalc -i ID majorms mb78withIDProperty.sdf
ID major-ms
maybridge78 N#C[C@H]1CCC[C@]2(N=CN=C[C@H]3C=CC=C[C@H]23)[C@H]1C#N.N#C[C@H]1CCC[C@]2(N=C[NH+]=C[C@H]3C=CC=C[C@H]23)[C@H]1C#N.N#C[C@H]1CCC[C@]2([NH+]=CN=C[C@H]3C=CC=C[C@H]23)[C@H]1C#N.N#C[C@H]1CCC[C@]2([NH+]=C[NH+]=C[C@H]3C=CC=C[C@H]23)[C@H]1C#N

The "ID" column now contains "maybridge78" instead of "1".


The input molecle:


maybridge78
Mrv0541 05231117223D

36 38 0 0 0 0 999 V2000
-3.9590 0.2920 -2.3290 N 0 0 0 0 0 0 0 0 0 0 0 0
-3.3160 0.2850 -1.3940 C 0 0 0 0 0 0 0 0 0 0 0 0
-2.4870 0.2930 -0.1730 C 0 0 1 0 0 0 0 0 0 0 0 0
-3.0380 -0.6670 0.8930 C 0 0 0 0 0 0 0 0 0 0 0 0
-2.1670 -0.6110 2.1480 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.6970 -0.8870 1.8250 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.1180 0.0870 0.7750 C 0 0 1 0 0 0 0 0 0 0 0 0
-0.2790 1.4160 1.3610 N 0 0 0 0 0 0 0 0 0 0 0 0
0.2270 2.4740 0.9250 C 0 0 0 0 0 0 0 0 0 0 0 0
0.9470 2.7870 -0.2390 N 0 0 0 0 0 0 0 0 0 0 0 0
1.6770 1.9890 -0.8770 C 0 0 0 0 0 0 0 0 0 0 0 0
1.9950 0.5310 -0.6830 C 0 0 1 0 0 0 0 0 0 0 0 0
3.5010 0.3160 -0.7350 C 0 0 0 0 0 0 0 0 0 0 0 0
4.0050 -0.8510 -0.3700 C 0 0 0 0 0 0 0 0 0 0 0 0
3.1070 -1.9110 0.1110 C 0 0 0 0 0 0 0 0 0 0 0 0
1.8780 -1.6210 0.5120 C 0 0 0 0 0 0 0 0 0 0 0 0
1.4060 -0.1720 0.5490 C 0 0 2 0 0 0 0 0 0 0 0 0
-1.0000 0.0040 -0.5140 C 0 0 1 0 0 0 0 0 0 0 0 0
-0.8660 -1.3100 -1.1770 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.7670 -2.3220 -1.6820 N 0 0 0 0 0 0 0 0 0 0 0 0
-2.5250 1.3020 0.2160 H 0 0 0 0 0 0 0 0 0 0 0 0
-3.0630 -1.6750 0.4900 H 0 0 0 0 0 0 0 0 0 0 0 0
-4.0600 -0.3910 1.1230 H 0 0 0 0 0 0 0 0 0 0 0 0
-2.2620 0.3580 2.6210 H 0 0 0 0 0 0 0 0 0 0 0 0
-2.5180 -1.3520 2.8600 H 0 0 0 0 0 0 0 0 0 0 0 0
-0.0980 -0.8070 2.7260 H 0 0 0 0 0 0 0 0 0 0 0 0
-0.6150 -1.9070 1.4710 H 0 0 0 0 0 0 0 0 0 0 0 0
0.0450 3.3640 1.5050 H 0 0 0 0 0 0 0 0 0 0 0 0
2.1530 2.4070 -1.7550 H 0 0 0 0 0 0 0 0 0 0 0 0
1.5950 0.0490 -1.5790 H 0 0 0 0 0 0 0 0 0 0 0 0
4.1270 1.1040 -1.1160 H 0 0 0 0 0 0 0 0 0 0 0 0
5.0610 -1.0440 -0.4350 H 0 0 0 0 0 0 0 0 0 0 0 0
3.4670 -2.9240 0.1380 H 0 0 0 0 0 0 0 0 0 0 0 0
1.2430 -2.4040 0.8710 H 0 0 0 0 0 0 0 0 0 0 0 0
1.8730 0.2660 1.4300 H 0 0 0 0 0 0 0 0 0 0 0 0
-0.6770 0.7470 -1.2310 H 0 0 0 0 0 0 0 0 0 0 0 0
1 2 3 0 0 0 0
2 3 1 0 0 0 0
3 4 1 0 0 0 0
3 18 1 0 0 0 0
3 21 1 0 0 0 0
4 5 1 0 0 0 0
4 22 1 0 0 0 0
4 23 1 0 0 0 0
5 6 1 0 0 0 0
5 24 1 0 0 0 0
5 25 1 0 0 0 0
6 7 1 0 0 0 0
6 26 1 0 0 0 0
6 27 1 0 0 0 0
7 8 1 0 0 0 0
7 17 1 0 0 0 0
7 18 1 0 0 0 0
8 9 2 0 0 0 0
9 10 1 0 0 0 0
9 28 1 0 0 0 0
10 11 2 0 0 0 0
11 12 1 0 0 0 0
11 29 1 0 0 0 0
12 13 1 0 0 0 0
12 17 1 0 0 0 0
12 30 1 0 0 0 0
13 14 2 0 0 0 0
13 31 1 0 0 0 0
14 15 1 0 0 0 0
14 32 1 0 0 0 0
15 16 2 0 0 0 0
15 33 1 0 0 0 0
16 17 1 0 0 0 0
16 34 1 0 0 0 0
17 35 1 0 0 0 0
18 19 1 0 0 0 0
18 36 1 0 0 0 0
19 20 3 0 0 0 0
M END
> <ID>
maybridge78

$$$$

I hope this helps to understand how the --id option works.


Zsolt

User 187e4c3b19

24-05-2011 13:51:08

Thank you very much.


One last question: Does it work with mol2 files as well? There I have some fields like this:


@<TRIPOS>MOLECULE
maybridge78


Can I use this, or can I include some statements that are related to the ID field in an SDF file here?


thanks


Sören

ChemAxon e08c317633

25-05-2011 14:09:33

Currently it does not work with mol2 files, becouse our mol2 import/export does not handle molecule properties. See the supported mol2 records here: http://www.chemaxon.com/marvin/help/formats/mol2-doc.html


Zsolt