On 14 May 2012 07:07, Egon Willighagen <egon.willighagen@gmail.com> wrote:

On Sun, May 13, 2012 at 4:30 PM, Pantelis Sopasakis <chvng@mail.ntua.gr> wrote:
> MDLReader reader = new MDLReader(fileInputStream);
> ChemFile chemFile = (ChemFile) reader.read((ChemObject) new ChemFile());
> List<IAtomContainer> containersList =
> ChemFileManipulator.getAllAtomContainers(chemFile);

Keep in mind that this approach doesn't scale well, as it will read
all of the SD file in memory first.

On Sun, May 13, 2012 at 4:43 PM, Pantelis Sopasakis <chvng@mail.ntua.gr> wrote:
>   I noticed that you use "getProperty("cdk:Title")" to get the title of
> the molecule as it is declared in the SD file. I think it would be
> convenient and more intuitive to have a method like
> getDeclaredTitle()::String. (Btw, I'm using CDK from Java).

We try to keep the number of methods in IAtomContainer low... it's
already pretty loaded.

The first line in SF file not necessary contains a title ... unless you have control on how SD files are generated.

> I have one more question regarding automatic naming of compounds. Is
> there a way to get the IUPAC name for a molecule given its structure?
> For the time being, I have to use Marvin sketch to generate the IUPAC
> name, store it inside the SD file and parse it from Java. There's an
> alternative that I've also tried using the newly released REST interface
> of PubChem - the problem is that it returns the IUPAC Name only for
> registered molecules.

No, we currently do not have such functionality :(


Dr E.L. Willighagen
Postdoctoral Researcher
Department of Bioinformatics - BiGCaT
Maastricht University (http://www.bigcat.unimaas.nl/)
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

Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Cdk-devel mailing list