PDBFileReader (BioJava-1.5-beta API)
Keywords: org.biojava.bio.structure.io.PDBFileReader class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.structure.io
Class PDBFileReader

    java.lang.Object
      org.biojava.bio.structure.io.PDBFileReader

All Implemented Interfaces:
  StructureIO, StructureIOFile

    public class PDBFileReader

extends Object
implements StructureIOFile

A PDB file parser.

Author:
  Andreas Prlic

  Q: How can I get a Structure object from a PDB file?

  A:

       String filename =  "path/to/pdbfile.ent" ;

       PDBFileReader pdbreader = new PDBFileReader();

       try{
           Structure struc = pdbreader.getStructure(filename);
           System.out.println(struc);
       } catch (Exception e) {
           e.printStackTrace();
       }

Constructor Summary
`PDBFileReader()`

Method Summary
`void` | `addExtension(String s)` define supported file extensions compressed extensions .Z,.gz do not need to be specified they are dealt with automatically.
`String` | `getPath()` Returns the path value.
`Structure` | `getStructure(File filename)` opens filename, parses it and returns a Structure object
`Structure` | `getStructure(String filename)` opens filename, parses it and returns aStructure object .
`Structure` | `getStructureById(String pdbId)` load a structure from local file system and return a PDBStructure object
`void` | `setPath(String p)` directory where to find PDB files

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PDBFileReader

    public PDBFileReader()

Method Detail

### setPath

    public void setPath(String p)

  directory where to find PDB files

  Specified by:
    `setPath` in interface `StructureIOFile`
  Parameters:
    `p` - a String specifying the path value

### getPath

    public String getPath()

  Returns the path value.

  Returns:
    a String representing the path value
  See Also:
    `setPath(java.lang.String)`

### addExtension

    public void addExtension(String s)

  define supported file extensions compressed extensions .Z,.gz do not need to be specified they are dealt with automatically.

  Specified by:
    `addExtension` in interface `StructureIOFile`
  Parameters:
    `s` - a String ...

### getStructureById

    public Structure getStructureById(String pdbId)
                               throws IOException

  load a structure from local file system and return a PDBStructure object

  Specified by:
    `getStructureById` in interface `StructureIO`
  Parameters:
    `pdbId` - a String specifying the id value (PDB code)
  Returns:
    the Structure object
  Throws:
    `IOException` - ...

### getStructure

    public Structure getStructure(String filename)
                           throws IOException

  opens filename, parses it and returns aStructure object .

  Specified by:
    `getStructure` in interface `StructureIOFile`
  Parameters:
    `filename` - a String
  Returns:
    the Structure object
  Throws:
    `IOException` - ...

### getStructure

    public Structure getStructure(File filename)
                           throws IOException

  opens filename, parses it and returns a Structure object

  Parameters:
    `filename` - a File object
  Returns:
    the Structure object
  Throws:
    `IOException` - ...

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD