On Tue, Nov 15, 2011 at 12:02 PM, Martin Guetlein
<[email protected]> wrote:
> On Tue, Nov 15, 2011 at 12:00 PM, Nina Jeliazkova
> <[email protected]> wrote:
> Hmm, that's bit unfortunate, but not too bad, I will hard-code the
> descriptors then.

No need for that.

For the Groovy Cheminformatics book [0] I do this (in Groovy):

output = new File("../moldescriptorlist.tex")
output.text = ""
qsarDescriptors = this.getClass().getClassLoader()
 .getResourceAsStream("qsar-descriptors.set").text
List<String> descriptorClasses = new ArrayList<String>()
qsarDescriptors.eachLine { line ->
  if (line.contains("descriptors.molecular"))
    descriptorClasses.add(line)
}
DescriptorEngine engine =
  new DescriptorEngine(descriptorClasses);
List<IDescriptor> instances =
  engine.getDescriptorInstances()
instances.sort{ it.specification.implementationTitle }
println "Descriptor count: " + instances.size()


The trick is to process the content of this qsar-descriptors.set file,
which contains a list of all molecular descriptors...

Egon

0.http://chem-bla-ics.blogspot.com/2011/07/groovy-cheminformatics-3rd-edition.html

-- 
Dr E.L. Willighagen
Postdoctoral Researcher
Institutet för miljömedicin
Karolinska Institutet (http://ki.se/imm)
Homepage: http://egonw.github.com/
LinkedIn: http://se.linkedin.com/in/egonw
Blog: http://chem-bla-ics.blogspot.com/
PubList: http://www.citeulike.org/user/egonw/tag/papers

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to