The fixed-column parser of the PDB ATOM/HETATM records.
PdbLineParser
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| ParseLine | 1 | Parse one raw ATOM/HETATM line into the given atom instance. |
| AcceptAltLoc | 1 | Is the given alternate location indicator accepted? |
| NormalizeElement | 1 | Normalize the raw element symbol text into the canonical form. |
| GuessElement | 1 | Guess the element symbol from the atom name when the element column is missing. |
| SafeSub | 1 | Take a sub string from the fixed-column text line in a safe way: the short lines never throw an ArgumentOutOfRangeException. |
| ParseLine | 1 |
03 Members
String, ``0, Boolean)Parse one raw ATOM/HETATM line into the given atom instance.
The alternate location indicator is not filtered here, the caller decides whether to keep the alternate conformations via PdbLineParser.AcceptAltLoc().
| Name | Description |
|---|---|
T | The atom model type, derived from Atom. |
| Name | Type | Description |
|---|---|---|
rawLine | String | The raw record line, the record name prefix must be kept intact, otherwise the column offsets will be broken. |
atom | ``0 | The atom instance that accepts the parsed field values. |
isHet | Boolean | Is current line comes from a |
Returns True if the coordinate columns are parsed successfully; returns False if the line is too short or the coordinates are not valid numbers -- the caller should skip such a line instead of appending an atom at the origin point.
String)Is the given alternate location indicator accepted?
| Name | Type | Description |
|---|---|---|
altLoc | String | The alternate location indicator (PDB column 17). |
Only the empty indicator and the primary conformation A are accepted.
String)Normalize the raw element symbol text into the canonical form.
NOTE: the two-char element detection requires the second character to be a lower case letter, so the all-upper-case PDB element column value (e.g. CL, BR) falls back to the single char element. This behaviour is kept identical to the original implementation to avoid changing the downstream atom typing result.
| Name | Type | Description |
|---|---|---|
raw | String | The raw element symbol text, e.g. |
The canonical element symbol: the first character is in upper case and the second character (if it is a two-char element) is normalized to upper case too.
String, String)Guess the element symbol from the atom name when the element column is missing.
PDB 原子名约定:列 13-14,元素从首位(单字符元素时首位是元素+空格)
| Name | Type | Description |
|---|---|---|
atomName | String | The atom name (PDB column 13-16). |
resName | String | The residue name (PDB column 18-20). |
String, Int32, Int32)Take a sub string from the fixed-column text line in a safe way: the short lines never throw an ArgumentOutOfRangeException.
| Name | Type | Description |
|---|---|---|
line | String | The raw record line. |
start | Int32 | The zero based column offset. |
len | Int32 | The expected field width. |
String, T, Boolean)