Hi Julio, Not that I know of. There is the MolecularFormulaManipulator.putInOrder method, but that is not quite doing the job. I can imagine a method in AtomContainerManipulator to do what you want - it just hasn't been written yet!
The other possibility is to have a specialised AtomContainer that internally maintains the atoms in element order. So, its addAtom method would work out where to put the new atom in the list. I'm not sure which data structure could do this efficiently, though - perhaps a LinkedList? gilleain On 4/1/11, Julio Peironcely <pey...@gmail.com> wrote: > Hello, > > Is there a way of sorting the atoms that are included in an IAtomContainer? > Example: I read into a IAtomContainer a SD file where the first atoms are > oxygens, then carbons, and then nitrogens. I would like that in the > IAtomContainer the atoms are ordered C,O,N, for instance. If I would read a > different SD with atoms ordered N,O,C, the resulting IAtomContainer will > have again C,O,N. > Is there a function in CDK that performs this? > > Cheers, > Julio > > -- > Julio E. Peironcely, PhD student > http://juliopeironcely.com > Leiden/Amsterdam Center for Drug Research || Netherlands Metabolomics Centre > peironc...@chem.leidenuniv.nl || pey...@gmail.com > ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ Cdk-user mailing list Cdk-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdk-user