Oh, I forgot I should instanciate a PDBFileParser, so the following codeworks
fine:
public static Object parse_pdb(String pdb_datafile, String pdb_id) {
Structure structure = null; pdb_inputstream =
Utils.get_pdbinputstream(pdb_datafile,pdb_id); PDBFileParser
pdbfileparser = n
In my case, I had a bunch of pdb files in a jar archive, so here's the codeI
try to use:
public static InputStream get_pdbinputstream(String fileName,Stringpdb_id) {
System.out.println(fileName); InputStream returnstream =
null; JarFile jarFile = null;tr
Hi Tamas,
In case you are working with a PDB file that is located
somewhere on your hard disk, you could use the code from below
to parse it in.
Cheers,
Andreas
String filename = "path/to/pdbfile.ent" ;
PDBFileReader pdbreader = new PDBFileReader();
try{
Structure struc = pdbread
Combine into a single String separated with newline characters, then see
java.io.StringReader - this provides a Reader, which you can then wrap
in a BufferedReader.
Richard Holland
Bioinformatics Specialist
GIS extension 8199
-
This email is confidential