Egon Willighagen wrote:
On Thursday 22 December 2005 09:45, Sneha joshi wrote:

I am working on chemical similarity. I am interested in finding out
followings:
(1) how atom numbers are assigned to each  atom


Atom numbers are counted as the number they have in the array, so implictely stored... Use the methods getAtomNumber(Atom) and getBondNumber(Bond) in
AtomContainer to get those numbers [1].

If you do this, you have to be aware that numbers change if you remove an atom from the molecule. It is always better not to rely on atom and bond numbers whenever it is possible. Object Orientation brings interesting possibilities with it, but you need to decide from case to case how to get around numbering problems.

Alternatively, you might set object IDs, using Atom.setID() and Bond.setID().

Right, in this case, your number stay the same if you remove an atom or a bond from an atomcontainer, but they might afterwards not be meaningful anymore.

Cheers,

Chris


--
Priv. Doz. Dr. Christoph Steinbeck ([EMAIL PROTECTED])
Head of the Research Group for Molecular Informatics
Cologne University BioInformatics Center (http://almost.cubic.uni-koeln.de)
Zülpicher Str. 47, 50674 Cologne
Tel: +49(0)221-470-7426   Fax: +49 (0) 221-470-7786

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to