Hi Jean-Marc, 

if the molecules you are writing contain properties, those should be written 
out as molecular properties lines.
The respective code in the CDK SDFWriter looks like

            // write the properties
            Map<Object,Object> sdFields = container.getProperties();
            if(sdFields != null){
                for (Object propKey : sdFields.keySet()) {
                    if (!isCDKInternalProperty(propKey)) {
                        writer.write("> <" + propKey + ">");
                        writer.newLine();
                        writer.write("" + sdFields.get(propKey));
                        writer.newLine();
                        writer.newLine();


You can set those properties with 
public void setProperty(Object description, Object property);

Let me know if that helps?

Kind regards, 

Chris

--
Dr. Christoph Steinbeck
Head of Cheminformatics and Metabolism
European Bioinformatics Institute (EBI)
Wellcome Trust Genome Campus
Hinxton, Cambridge CB10 1SD UK
Phone +44 1223 49 2640


What is man but that lofty spirit - that sense of enterprise.
... Kirk, "I, Mudd," stardate 4513.3..

On 12 Mar 2012, at 15:40, Jean-Marc Nuzillard wrote:

> Dear CDK users,
> 
> I would like to know which is the way to append molecular property lines to 
> molecules in SD files.
> There is an old post on this list, dated 2006, about this topic.
> I guess the procedure has changed since then.
> I have not seen setSdFields() as a MDLWriter method in the CDK documentation.
> 
> Best regards,
> 
> 
> Dr. Jean-Marc Nuzillard
> Institute of Molecular Chemistry
> CNRS UMR 7312
> Moulin de la Housse
> CPCBAI, Bâtiment 18
> BP 1039
> 51687 REIMS Cedex 2
> France
> 
> Tel : 33 3 26 91 82 10
> Fax :33 3 26 91 31 66
> http://www.univ-reims.fr/ICMR
> 
> http://www.univ-reims.fr/LSD/
> http://www.univ-reims.fr/LSD/JmnSoft/
> 
> 
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Cdk-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cdk-user


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to