module
Chem::PDB
Defined in:
chem/formats/pdb.crClass Method Summary
-
.each(io : IO, alt_loc : Char | Nil = nil, chains : Enumerable(Char) | String | Nil = nil, guess_bonds : Bool = false, het : Bool = true, & : Structure -> ) : Nil
Yields each structure in io.
-
.each(path : Path | String, alt_loc : Char | Nil = nil, chains : Enumerable(Char) | String | Nil = nil, guess_bonds : Bool = false, het : Bool = true, & : Structure -> ) : Nil
Yields each structure in path.
-
.read(io : IO, info : PDB::Info | Nil = nil, alt_loc : Char | Nil = nil, chains : Enumerable(Char) | String | Nil = nil, guess_bonds : Bool = false, het : Bool = true) : Structure
Returns the next structure from io.
-
.read(path : Path | String, info : PDB::Info | Nil = nil, alt_loc : Char | Nil = nil, chains : Enumerable(Char) | String | Nil = nil, guess_bonds : Bool = false, het : Bool = true) : Structure
Returns the next structure from path.
-
.read_all(io : IO, alt_loc : Char | Nil = nil, chains : Enumerable(Char) | String | Nil = nil, guess_bonds : Bool = false, het : Bool = true) : Array(Structure)
Returns all structures in io.
-
.read_all(path : Path | String, alt_loc : Char | Nil = nil, chains : Enumerable(Char) | String | Nil = nil, guess_bonds : Bool = false, het : Bool = true) : Array(Structure)
Returns all structures in path.
-
.read_header(io : IO) : Structure::Experiment
Returns the experimental information from the header of io.
-
.read_header(path : Path | String) : Structure::Experiment
Returns the experimental information from the header of path.
-
.read_info(io : IO) : Info
Returns the info from io.
-
.read_info(path : Path | String) : Info
Returns the info from path.
-
.write(io : IO, struc : AtomView | Structure, conect conect_options : PDB::ConectOptions = PDB::ConectOptions.flags(Het, Disulfide), renumber : Bool = true, ter_on_fragment : Bool = false, include_header : Bool = true, include_end : Bool = true) : Nil
Writes one or more structures or groups of atoms to io.
-
.write(io : IO, structures : Enumerable(Structure), conect conect_options : PDB::ConectOptions = PDB::ConectOptions.flags(Het, Disulfide), renumber : Bool = true, ter_on_fragment : Bool = false) : Nil
Writes one or more structures or groups of atoms to io.
-
.write(path : Path | String, struc : AtomView | Structure, conect conect_options : PDB::ConectOptions = PDB::ConectOptions.flags(Het, Disulfide), renumber : Bool = true, ter_on_fragment : Bool = false, include_header : Bool = true, include_end : Bool = true) : Nil
Writes one or more structures or groups of atoms to path.
-
.write(path : Path | String, structures : Enumerable(Structure), conect conect_options : PDB::ConectOptions = PDB::ConectOptions.flags(Het, Disulfide), renumber : Bool = true, ter_on_fragment : Bool = false) : Nil
Writes one or more structures or groups of atoms to path.
Class Method Detail
Yields each structure in io.
If passed, only chains in chains will be read, otherwise all chains will be read. Similarly, HET atoms can be excluded by setting het to false.
If the structure has alternate locations, only the most populated one will be read unless alt_loc is set.
Yields each structure in path.
If passed, only chains in chains will be read, otherwise all chains will be read. Similarly, HET atoms can be excluded by setting het to false.
If the structure has alternate locations, only the most populated one will be read unless alt_loc is set.
Returns the next structure from io.
Raises IO::EOFError when there are no more structures.
Use .read_all or .each for multiple.
Experimental and structural data specified in the header is set from info. If info is nil and io is at the beginning, the header is read first.
If passed, only chains in chains will be read, otherwise all chains will be read. Similarly, HET atoms can be excluded by setting het to false.
If the structure has alternate locations, only the most populated one will be read unless alt_loc is set.
Returns the next structure from path.
Raises IO::EOFError when there are no more structures.
Use .read_all or .each for multiple.
Experimental and structural data specified in the header is set from info. If info is nil and path is at the beginning, the header is read first.
If passed, only chains in chains will be read, otherwise all chains will be read. Similarly, HET atoms can be excluded by setting het to false.
If the structure has alternate locations, only the most populated one will be read unless alt_loc is set.
Returns all structures in io.
If passed, only chains in chains will be read, otherwise all chains will be read. Similarly, HET atoms can be excluded by setting het to false.
If the structure has alternate locations, only the most populated one will be read unless alt_loc is set.
Returns all structures in path.
If passed, only chains in chains will be read, otherwise all chains will be read. Similarly, HET atoms can be excluded by setting het to false.
If the structure has alternate locations, only the most populated one will be read unless alt_loc is set.
Returns the experimental information from the header of io.
TODO Remove in favor of .read_info.
Returns the experimental information from the header of path.
TODO Remove in favor of .read_info.
Returns the info from io.
It must be called at the beginning of the PDB content and before reading structures via .read.
Returns the info from path.
It must be called at the beginning of the PDB content and before reading structures via .read.
Writes one or more structures or groups of atoms to io.
Atom numbering starts from 1 and increments sequentially if renumber is true, otherwise the atom numbers are written as is.
CONECT records are written for HET residues and disulfide bridges only, but can be changed using conect. TER records are written for each fragment if ter_on_fragment is true.
If include_header is true, the experimental data, secondary structure, unit cell, and other information is written if available. If include_end is true, the END record is written at the end of the output.
Writes one or more structures or groups of atoms to io.
Atom numbering starts from 1 and increments sequentially if renumber is true, otherwise the atom numbers are written as is.
CONECT records are written for HET residues and disulfide bridges only, but can be changed using conect. TER records are written for each fragment if ter_on_fragment is true.
If include_header is true, the experimental data, secondary structure, unit cell, and other information is written if available. If include_end is true, the END record is written at the end of the output.
Writes one or more structures or groups of atoms to path.
Atom numbering starts from 1 and increments sequentially if renumber is true, otherwise the atom numbers are written as is.
CONECT records are written for HET residues and disulfide bridges only, but can be changed using conect. TER records are written for each fragment if ter_on_fragment is true.
If include_header is true, the experimental data, secondary structure, unit cell, and other information is written if available. If include_end is true, the END record is written at the end of the output.
Writes one or more structures or groups of atoms to path.
Atom numbering starts from 1 and increments sequentially if renumber is true, otherwise the atom numbers are written as is.
CONECT records are written for HET residues and disulfide bridges only, but can be changed using conect. TER records are written for each fragment if ter_on_fragment is true.
If include_header is true, the experimental data, secondary structure, unit cell, and other information is written if available. If include_end is true, the END record is written at the end of the output.