User b339fedd4e
28-11-2007 09:53:10
Hi,
How read pdb files using jchem api.
I would like to retrive the data from pdb file
Could u please give me an example.
I am able to retieve the data from sdf and rdf by getting property keys.
Thank u
regards,
richa
ChemAxon efa1591b5a
28-11-2007 10:54:30
User b339fedd4e
29-11-2007 11:54:34
thank u for ur reply.
But I know this api.
I am not getting how to use this. And PDBReader also is there.
Regards,
richa
User b339fedd4e
29-11-2007 12:41:14
hi,
I want to use getAuthor in MacroMolecule. But I am not getting that.
Regarding api, I can read sdf, rdf files. But I am not able to follow this
MacroMolecule.
Please Help How to use this class.
Ex. I want to use getAuthor() method.
Thank u.
Regards,
richa
ChemAxon efa1591b5a
30-11-2007 11:14:36
Hi, try sg like the code sample below:
Code: |
public static void main( String[] args ) {
PDBReader p = new PDBReader();
try {
p.setInput( new MolInputStream( new FileInputStream( args[0]) ) );
MacroMolecule m = p.read();
System.out.println( "name = " + m.getName());
System.out.println( "header = " + m.getHeader() );
System.out.println( "title = " + m.getTitle() );
System.out.println( "source = " + m.getSource() );
System.out.println( "keywords = " + m.getKeywords() );
System.out.println( "exp. data = " + m.getExpData() );
System.out.println( "author = " + m.getAuthor() );
}
catch (Exception e) {
System.out.println("Error reading file " + args[0]);
e.printStackTrace();
}
}
|
Does this help?
Regards,
Miklos
Ps: Relevant API doc (beyong MacroMolecule that you are already familiar with): http://www.chemaxon.com/marvin/doc/api/chemaxon/marvin/modules/PDBReader.html
User b339fedd4e
30-11-2007 12:41:35
Hi Miklos,
Thank you for your Help!
I have tried all these the same way before posting the question. It is not finding the methods during compilation.
I am able to use macromolecule.component class but not
this.
Actually I want to retrieve the co-ordinates, triplet code of aminoacid, other records of a pdb file.
Once again thank you.
Waiting for your reply......
Regards,
Richa.