|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.structure.io.PDBAtomFieldExtractor
public class PDBAtomFieldExtractor
Extracts fields from a PDB ATOM or HETATM record.
The line must be a PDB ATOM record as specified in the
PDB Contents Guide (Version 2.2, 20 Dec 1996).
The column numbers specified in the PDB guide start at 1 rather than
at 0, so a field written as (name field: 13-16) would be in columns
12 to 15 in a String.
Constructor Summary | |
---|---|
PDBAtomFieldExtractor()
Constructs a PDBFieldExtractor. |
Method Summary | |
---|---|
String |
extractAltLocation(String line)
Obtains the alternate location from (altLoc field: 17), or returns an empty String if it is not found (this field is usually blank). |
String |
extractAtomID(String line)
Obtains the atomID from (name field: 13-16). |
int |
extractAtomSerialNo(String line)
Obtains the atom serial number from (serial field: 7-11). |
AtomEnum |
extractAtomType(String line)
Obtains the atom type (chemical element) from an ATOM or HETATM record. |
String |
extractChainID(String line)
Obtains the chainID from (chainID field: 22 ) if it is present. |
int |
extractCharge(String line)
Obtains the charge from (charge field: 79-80), or sets it to 0 if the field is only whitespace. |
double |
extractOccupancy(String line)
Obtains the occupancy from (occupancy field: 55-60). |
String |
extractResidueID(String line)
Obtains the residueID by combining (resName field: 18-20), (resSeq field: 23-26), and the optional (icode field: 27). |
String |
extractResidueName(String line)
Obtains the Residue name from (resName field: 18-20). |
double |
extractTemperature(String line)
Obtains the temperature from (tempFactor field: 61-66). |
double |
extractX(String line)
Obtains the x-coordinate from (x field: 31-38 ). |
double |
extractY(String line)
extractY() - obtains the y-coordinate from (y field: 39-46 ). |
double |
extractZ(String line)
extractZ() - obtains the z-coordinate from (z field: 47-54 ). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PDBAtomFieldExtractor()
Method Detail |
---|
public int extractAtomSerialNo(String line) throws PDBFieldExtractorException
line
- an ATOM or HETATM record (80 characters in length).
PDBFieldExtractorException
- if the atom serial number
field cannot be converted to
an int.public AtomEnum extractAtomType(String line) throws PDBFieldExtractorException
line
- an ATOM or HETATM record (80 characters in length).
PDBFieldExtractorException
- if an AtomEnum type cannot be
determined.public String extractAtomID(String line) throws PDBFieldExtractorException
line
- an ATOM or HETATM record (80 characters in length).
PDBFieldExtractorException
- if the line is too short.public String extractResidueName(String line) throws PDBFieldExtractorException
line
- an ATOM or HETATM record (80 characters in length).
PDBFieldExtractorException
- if the line is too short.public String extractResidueID(String line) throws PDBFieldExtractorException
line
- an ATOM or HETATM record (80 characters in length).
PDBFieldExtractorException
- if the line is too short.public String extractChainID(String line) throws PDBFieldExtractorException
line
- an ATOM or HETATM record (80 characters in length).
PDBFieldExtractorException
- if the line is too short.public double extractTemperature(String line) throws PDBFieldExtractorException
line
- an ATOM or HETATM record (80 characters in length).
PDBFieldExtractorException
- if the tempFactor field cannot
be converted to a double.public int extractCharge(String line) throws PDBFieldExtractorException
line
- an ATOM or HETATM record (80 characters in length).
PDBFieldExtractorException
- if the charge field contains
non-whitespace characters, but
cannot be converted to an int.public double extractOccupancy(String line) throws PDBFieldExtractorException
line
- an ATOM or HETATM record (80 characters in length).
PDBFieldExtractorException
- if the occupancy field cannot
be converted to a double.public String extractAltLocation(String line) throws PDBFieldExtractorException
line
- an ATOM or HETATM record (80 characters in length).
PDBFieldExtractorException
- if the line is too short.public double extractX(String line) throws PDBFieldExtractorException
line
- an ATOM or HETATM record (80 characters in length).
PDBFieldExtractorException
- if the x-coordinate field
cannot be converted to a
double.public double extractY(String line) throws PDBFieldExtractorException
line
- an ATOM or HETATM record (80 characters in length).
PDBFieldExtractorException
- if the y-coordinate field
cannot be converted to a
double.public double extractZ(String line) throws PDBFieldExtractorException
line
- an ATOM or HETATM record (80 characters in length).
PDBFieldExtractorException
- if the z-coordinate field
cannot be converted to a
double.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |