Incorporating filename using molconvert

ChemAxon fa971619eb

27-11-2010 10:35:02

It is possible to incorporate the name of the file when using molconvert to convert a set of structure files into a SDF?


e.g. molconvert sdf *.mol -o molecules.sdf


but somehow have the file name appear as a field of the SDF.


Thanks


Tim

ChemAxon 7c2d26e5cf

01-12-2010 14:51:52

No, you can not do it with MolConverter.


I recommend to use  the MarvinBeans API to do that.


Import structures with MolImporter, add an SD field with the file name to each Molecule object then export it with MolExporter.


http://www.chemaxon.com/marvin/help/developer/beans/api/chemaxon/formats/MolImporter.html


http://www.chemaxon.com/marvin/help/developer/beans/api/chemaxon/struc/Molecule.html#setProperty(java.lang.String, java.lang.String)


http://www.chemaxon.com/marvin/help/developer/beans/api/chemaxon/formats/MolExporter.html