cxcalc output options.

User fca09bdbff

08-02-2010 18:44:16

Hello,


Perhaps this is a silly question: if one does not specify an output file when using cxcalc, is the output named and saved anywhere by default?


Regards,


Tim Ritchie

ChemAxon e08c317633

08-02-2010 18:54:43

Hi,


If output file is not specified, then the output is written to the console.


Example 1:


$ cxcalc logp nci10.smiles
id logP
1 1,42
2 6,22
3 2,15
4 0,71
5 2,09
6 4,61
7 1,54
8 3,37
9 0,41
10 5,11


Example 2 (output is a SMILES "file"):


$ cxcalc majormicrospecies -H 4.0 nci10.smiles -f smiles
CC1=CC(=O)C=CC1=O
S(SC1=NC2=C(S1)C=CC=C2)C1=NC2=C(S1)C=CC=C2
[O-]C1=C(Cl)C=C(C=C1N(=O)=O)N(=O)=O
[NH2+]=C1NC=C(S1)N(=O)=O
NC1=CC2=C(C=C1)C(=O)C1=C(C=CC=C1)C2=O
OC1=C(Br)C2=C(C=C1)C(C1=C(C=CC=C1)C([O-])=O)=C1C=CC(=O)C(Br)=C1O2
CN(C)C1=C(Cl)C(=O)C2=C(C=CC=C2)C1=O
CC1=C(C2=C(C=C1)C(=O)C1=CC=CC=C1C2=O)N(=O)=O
CC(=NO)C(C)=NO
C1=CC=C(C=C1)P(C1=CC=CC=C1)C1=CC=CC=C1


Zsolt



User fca09bdbff

08-02-2010 19:18:21

OK, thanks for the clarification.


Could you confirm the syntax to specify an output file please?


Regards,


Tim Ritchie.

ChemAxon e08c317633

08-02-2010 19:28:22

The


-o, --output         output file path (default: stdout)

option can be used to specify the output file.


Example:


$ cxcalc -o mmicrospecies.smiles majormicrospecies -H 4.0 nci10.smiles -f smiles


Note: "-o" is a "general option", not a "plugin option". It should be written before the name of the calculation.


See http://www.chemaxon.com/marvin/help/applications/calc.html#usage


Zsolt

User fca09bdbff

09-02-2010 09:45:06

Hello again,


How should I configure the output so that the calculated descriptors are appended as columns to my original file? (I am using .smi rather than .sdf).


Regards,


Tim Ritchie.

ChemAxon e08c317633

11-02-2010 09:17:02

Hi,


At the moment cxcalc has options only for adding properties  to SDF and MRV files ("-S" and "-M"). You can use molconvert to convert these formats to SMILES. Use the "T" SMILES export option to specify SDF fields to export.


Example:


$ cxcalc -S -t logP logp nci10.smiles | molconvert smiles:TlogP
#SMILES logP
CC1=CC(=O)C=CC1=O 1,42
S(SC1=NC2=C(S1)C=CC=C2)C1=NC2=CC=CC=C2S1 6,22
OC1=C(Cl)C=C(C=C1[N+]([O-])=O)[N+]([O-])=O 2,15
[O-][N+](=O)C1=CNC(=N)S1 0,71
NC1=CC2=C(C=C1)C(=O)C1=C(C=CC=C1)C2=O 2,09
OC(=O)C1=C(C=CC=C1)C1=C2C=CC(=O)C(Br)=C2OC2=C1C=CC(O)=C2Br 4,61
CN(C)C1=C(Cl)C(=O)C2=C(C=CC=C2)C1=O 1,54
CC1=C(C2=C(C=C1)C(=O)C1=CC=CC=C1C2=O)[N+]([O-])=O 3,37
CC(=NO)C(C)=NO 0,41
C1=CC=C(C=C1)P(C1=CC=CC=C1)C1=CC=CC=C1 5,11


I hope this helps,


Zsolt

User fca09bdbff

10-06-2010 09:14:21

Is this method possible if more than one descriptor is calculated, i.e. the output would contain the smiles and multiple columns of results (with a header row).


Thanks and regards,


Tim Ritchie.

ChemAxon e08c317633

14-06-2010 11:24:37

Yes, it is.


Example:


$ cxcalc -S -t logP logp nci10.smiles | cxcalc -S -t atomcount atomcount | cxcalc -S -t PSA psa | molconvert smiles:TlogP:atomcount:PSA
#SMILES logP atomcount PSA
CC1=CC(=O)C=CC1=O 1.42 15 34.14
S(SC1=NC2=C(S1)C=CC=C2)C1=NC2=CC=CC=C2S1 6.22 28 25.78
OC1=C(Cl)C=C(C=C1[N+]([O-])=O)[N+]([O-])=O 2.15 17 111.87
[O-][N+](=O)C1=CNC(=N)S1 0.71 12 81.70
NC1=CC2=C(C=C1)C(=O)C1=C(C=CC=C1)C2=O 2.09 26 60.16
OC(=O)C1=C(C=CC=C1)C1=C2C=CC(=O)C(Br)=C2OC2=C1C=CC(O)=C2Br 4.61 37 83.83
CN(C)C1=C(Cl)C(=O)C2=C(C=CC=C2)C1=O 1.54 26 37.38
CC1=C(C2=C(C=C1)C(=O)C1=CC=CC=C1C2=O)[N+]([O-])=O 3.37 29 79.96
CC(=NO)C(C)=NO 0.41 16 65.18
C1=CC=C(C=C1)P(C1=CC=CC=C1)C1=CC=CC=C1 5.11 34 0.00

Simpler syntax, to calculate only the properties:


$ cxcalc nci10.smiles logp atomcount psa
id logP Atom count Polar surface area
1 1.42 15 34.14
2 6.22 28 25.78
3 2.15 17 111.87
4 0.71 12 81.70
5 2.09 26 60.16
6 4.61 37 83.83
7 1.54 26 37.38
8 3.37 29 79.96
9 0.41 16 65.18
10 5.11 34 0.00

Zsolt

User fca09bdbff

14-06-2010 12:01:30

OK. Thanks.


I will give this a try.


Regards,


Tim Ritchie.

User 1d644aa522

04-11-2016 10:47:52

Zsolt, thanks for the useful post. I would have an additional question:


In case where cxcalc is calculating the microspeciesdistribution (and so more than one output molecule is created for each input molecule), it would be possible to output also a molecule identifier (e.g. molcount) as an additional column for the SMILES format?


Thanks in advance

ChemAxon d51151248d

15-11-2016 14:59:02

Hi, 


Yes, you can do that using cxcalc and molconvert together. This is the command you have to use:


cxcalc msdistr -t MD sildenafil adrenaline | molconvert smiles:T_MOLCOUNT:MD

MD is the tag name for microspecies distribution, while _MOLCOUNT is the default molecule ID tag. This command will both output the ID and the relevant %s. I used just 2 molecules as an example.


For further information please see the following documentation on the SMILES format:


https://docs.chemaxon.com/display/docs/SMILES+and+SMARTS+import+and+export+options


I hope this helps, 


Daniel