Select all molecules and add names

User 2b68687bb8

21-10-2009 13:50:57

Hi,


 


probably this is an easy question, but at the moment I can not find the solution.


 


The thing is that using Sketch I generate with Markus Enumeration 256 structures. Afterwards I would like to save them in a mol2 file with some appropriate name so I can distinguish them. My question is how can I add the smiles or iupac name as the name for each mol2 molecule in the resulting file. I do not know how I can select all molecules from the table. I read on the help that with "CTRL+A" it should be possible but I can not do that.


 


Thanks


 


 

ChemAxon fb166edcbd

22-10-2009 10:55:31

Although we have Table/Show molecule name and Table/Show SMILES in MView, these are not saved with File/Save as (which saves all molecules in the viewer). Plugin calculations (e.g. Naming) can only be run for one selected molecule at a time (unfortunately).


What you can do right in the Marvin GUI is to identify enumerated molecules with their Markush generation code: select the "Generate Markush code" option in the Markush Enumeration parameter panel. Then the Markush codes will be written in an SDF tag which is saved in SDF format. Example:



  1. msketch test.mol

  2. Tools / Markush Enumeration

  3. select "Sequential enumeration", "Generate all enumerations" and

  4. select the "Generate Markush code" option

  5. press OK

  6. in the viewer: File / Save as, save in SDF format (or any other format storing molecule properties, e.g. MRV)


 


To add the IUPAC name as an identifier you should run the naming plugin separately in the command line:



  1. msketch test.mol

  2. Tools / Markush Enumeration

  3. select "Secuential enumeration", "Generate all enumerations"

  4. in the viewer: File / Save as, save in SDF format (e.g. out.sdf) (or any other format storing multiple molecules)

  5. run the naming plugin from cxcalc with SDF output (-S parameter):
    cxcalc -o o.sdf -S name out.sdf

    this will store the molecule name in the NAME field, you can specify the field name in the -t parameter:
    cxcalc -o o.sdf -S -t ID name out.sdf

    your final output is saved in o.sdf.


Remark: you can just as well run the enumeration from cxcalc, replacing steps 1-4 above by this command:


cxcalc -o out.sdf markushenumerations test.mol -f sdf

 


I cannot think of a solution which writes the SMILES as identifier in a molecule field.

User 2b68687bb8

04-11-2009 14:58:41

Hi,


 


thanks for the answer, now it works much better for me.


 


Just one issue I found;


 


when I do


 



cxcalc -o o.sdf -S name out.sdf


with a mol2 files;

cxcalc -o o.mol2 -S name out.mol2

The resulting file o.mol2 is a SDF file and not a mol2 file.

Can I get mol2 to mol2 ?

Thanks


ChemAxon 8b644e6bf4

13-11-2009 04:33:20

Hi,


You can use molconvert to convert the resulting sdf file to mol2. Currently it is not possible to write mol2 output from cxcalc.


Unfortunatelly generated names are stored in SDF properties which are not preserved during mol2 conversion. 


There exists a workaround for this problem:


1., structures are stored in "out.sdf"


2., generate a text file containing only the names:


cxcalc -N ih name out.sdf > names.txt


3., convert the structures to SMILES format


molconvert smiles out.sdf > smiles.txt


4., create a merged file which lines contains one SMILES string and the corresponding name separated by white space. You can use "paste" command in unix or cygwin:


(note that if you use cygwin invoke "dos2unix names.txt" and "dos2unix smiles.txt")


paste smiles.txt names.txt > merged.smi


5., convert this generated smiles file to mol2


molconvert mol2 merged.smi > merged.mol2


Regards,


Gabor