class Chem::PDB::Reader
- Chem::PDB::Reader
- Reference
- Object
Included Modules
- Chem::FormatReader(Chem::Structure)
- Chem::FormatReader::Headed(Chem::Structure::Experiment)
- Chem::FormatReader::MultiEntry(Chem::Structure)
Defined in:
chem/formats/pdb.crConstant Summary
-
HELIX_TYPES =
{1 => Sec::RightHandedHelixAlpha, 3 => Sec::RightHandedHelixPi, 5 => Sec::RightHandedHelix3_10}
Constructors
- .new(io : IO, alt_loc : Char | Nil = nil, chains : Enumerable(Char) | String | Nil = nil, guess_bonds : Bool = false, het : Bool = true, sync_close : Bool = false)
-
.new(path : Path | String, alt_loc : Char | Nil = nil, chains : Enumerable(Char) | String | Nil = nil, guess_bonds : Bool = false, het : Bool = true) : self
Creates a new object from the given path.
Class Method Summary
-
.open(io : IO, alt_loc : Char | Nil = nil, chains : Enumerable(Char) | String | Nil = nil, guess_bonds : Bool = false, het : Bool = true, sync_close : Bool = false, & : self -> )
Creates a new object from the given io, yields it to the given block, and closes it at the end.
-
.open(path : Path | String, alt_loc : Char | Nil = nil, chains : Enumerable(Char) | String | Nil = nil, guess_bonds : Bool = false, het : Bool = true, & : self -> )
Creates a new object from the given path yields it to the given block, and closes it at the end.
Instance Method Summary
-
#next_entry : Structure | Nil
Returns the next entry in the IO, or
nil
if there are no more entries. -
#read_header : Structure::Experiment
Reads the header object from the IO.
-
#skip_entry : Nil
Discards the next entry in the IO without fully parsing it.
Instance methods inherited from module Chem::FormatReader::Headed(Chem::Structure::Experiment)
read_header : T
read_header
Instance methods inherited from module Chem::FormatReader::MultiEntry(Chem::Structure)
each(indexes : Enumerable(Int), & : T -> )each(& : T -> ) : Nil each, next_entry : T | Nil next_entry, read_entry : T read_entry, skip_entry : Nil skip_entry
Instance methods inherited from module Chem::FormatReader(Chem::Structure)
read? : Bool
read?,
read_entry : T
read_entry
Instance methods inherited from module IO::Wrapper
close
close,
closed? : Bool
closed?,
sync_close : Bool
sync_close,
sync_close=(sync_close : Bool)
sync_close=
Constructor Detail
Creates a new object from the given path. Positional and named arguments are forwarded to the designated constructor.
An IO
object will be created and open from the given path,
which will be closed when closing this object (sync_close = true
). The file open mode is specified by the FILE_MODE
constant.
Class Method Detail
Creates a new object from the given io, yields it to the given block, and closes it at the end. Positional and named arguments are forwarded to the constructor.
Creates a new object from the given path yields it to the given block, and closes it at the end. Positional and named arguments are forwarded to the constructor.
An IO
object will be created and open from the given path,
which will be closed when closing this object (sync_close = true
). The file open mode is specified by the FILE_MODE
constant.
Instance Method Detail
Returns the next entry in the IO, or nil
if there are no more
entries.
Reads the header object from the IO. Raises IO::Error
if the
reader is closed or ParseException
if the header cannot be
decoded.
Discards the next entry in the IO without fully parsing it.