From: Joerg K. W. <we...@in...> - 2004-10-18 16:37:03
|
Hi again, >> I understand that these fields have no real chemical meaning, and are >> therefore not included in your class, but for my purpose they are >> essential. If you suggest Joelib is not suitable for this then I'll >> try something else. They are included. The index can be accessed by atom.getIdx() and the element by JOEElementTable.instance().getSymbol(atom.getAtomicNum()) Further things like rings, atomTypes and chemical properties can be also accessed and internally calculated, so what you request is the basic graph of the molecular interpretation and this is not that difficult. Please have a look at the examples and the tutorial and contact me, if you get stuck into the JOELib downs. Kind regards, Joerg >> >> Thijs >> >> On Oct 18, 2004, at 11:28 AM, Joerg K. Wegner wrote: >> >>> Hi Thijs Beuming, >>> >>> as far as i can see i can't recommend this way to proceed. >>> You shouldn't mess around with the Atom class in this way. >>> >>> You should use joelib.io.types.SybylMol2 to read MOL2 entries, e.g. >>> on your String block for one entry. >>> >>> As you can see an interl conversion is required, which will be >>> applied automatically, when using this class. >>> >>> JOETypeTable ttab = JOETypeTable.instance(); >>> ttab.setFromType("SYB"); >>> ttab.setToType("ATN"); >>> str1 = ttab.translate(str); >>> atom.setAtomicNum(Integer.parseInt(str1)); >>> ttab.setToType("INT"); >>> str1 = ttab.translate(str); >>> atom.setType(str1); >>> >>> Kind regards, Joerg >>> >>>> I am trying to modify the JOEAtom class to contain a field for the >>>> atom name, >>>> e.g by reading the second token of a sybylmol2 atom line with >>>> atom.setAtomName(atom_name) in the SybylMol2 class >>>> and the methods in JOEAtom. >>>> public void setAtomName(String atomname) >>>> { >>>> _atomname = new String(atomname); >>>> } >>>> public String getAtomName() >>>> { >>>> return (_atomname); >>>> } >>>> I can't retrieve the stored names however when i iterate over the >>>> atoms from a JOEMol: >>>> for(int i=1;i<=mol.numAtoms();i++){ >>>> JOEAtom atom = mol.getAtom(i); >>>> System.out.println(atom.getAtomName()); >>>> } >>>> all the names are null. >>>> Any suggestions? >>>> Thanks. >>>> --- >>>> Thijs Beuming >>>> Harel Weinstein Lab >>>> Department of Physiology & Biophysics >>>> Weill Medical College of Cornell University >>>> 1300 York Avenue, Box 75 >>>> New York, NY 10021 >>>> Tel: (212) 7466539 >>>> Fax: (212) 746-6361 >>>> th...@me... >>>> ------------------------------------------------------- >>>> This SF.net email is sponsored by: IT Product Guide on >>>> ITManagersJournal >>>> Use IT products in your business? Tell us what you think of them. >>>> Give us >>>> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find >>>> out more >>>> http://productguide.itmanagersjournal.com/guidepromo.tmpl >>>> _______________________________________________ >>>> Joelib-help mailing list >>>> Joe...@li... >>>> https://lists.sourceforge.net/lists/listinfo/joelib-help >>> >>> >>> >>> >>> -- >>> Dipl. Chem. Joerg K. Wegner >>> Center of Bioinformatics Tuebingen (ZBIT) >>> Department of Computer Architecture >>> Univ. Tuebingen, Sand 1, D-72076 Tuebingen, Germany >>> Phone: (+49/0) 7071 29 78970 >>> Fax: (+49/0) 7071 29 5091 >>> E-Mail: mailto:we...@in... >>> WWW: http://www-ra.informatik.uni-tuebingen.de >>> -- >>> Never mistake motion for action. >>> (E. Hemingway) >>> >>> Never mistake action for meaningful action. >>> (Hugo Kubinyi,2004) >>> >>> >> --- >> Thijs Beuming >> Harel Weinstein Lab >> Department of Physiology & Biophysics >> Weill Medical College of Cornell University >> 1300 York Avenue, Box 75 >> New York, NY 10021 >> Tel: (212) 7466539 >> Fax: (212) 746-6361 >> th...@me... >> >> > > -- Dipl. Chem. Joerg K. Wegner Center of Bioinformatics Tuebingen (ZBIT) Department of Computer Architecture Univ. Tuebingen, Sand 1, D-72076 Tuebingen, Germany Phone: (+49/0) 7071 29 78970 Fax: (+49/0) 7071 29 5091 E-Mail: mailto:we...@in... WWW: http://www-ra.informatik.uni-tuebingen.de -- Never mistake motion for action. (E. Hemingway) Never mistake action for meaningful action. (Hugo Kubinyi,2004) |