class Chem::PDB::Writer

Included Modules

Defined in:

chem/formats/pdb.cr

Constant Summary

LINE_WIDTH = 80
PDB_VERSION = "3.30"
PDB_VERSION_DATE = Time.local(2011, 7, 13)
WHITESPACE = ' '

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Chem::FormatWriter::MultiEntry(Chem::AtomCollection)

<<(obj : T) : self <<, multi? : Bool multi?

Constructor methods inherited from module Chem::FormatWriter::MultiEntry(Chem::AtomCollection)

new(io : IO, total_entries : Int32 | Nil = nil, sync_close : Bool = false) new

Instance methods inherited from module Chem::FormatWriter(Chem::AtomCollection)

<<(obj : T) : Nil <<, format(str : String, *args, **options) : Nil format, formatl(str : String, *args, **options) : Nil formatl, written? : Bool written?

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

def self.new(io : IO, bonds : Chem::PDB::Writer::BondOptions = Chem::PDB::Writer::BondOptions.flags(Het, Disulfide), renumber : Bool = true, ter_on_fragment : Bool = false, total_entries : Int32 | Nil = nil, sync_close : Bool = false) #

[View source]
def self.new(path : Path | String, bonds : Chem::PDB::Writer::BondOptions = Chem::PDB::Writer::BondOptions.flags(Het, Disulfide), renumber : Bool = true, ter_on_fragment : Bool = false, total_entries : Int32 | Nil = nil) : self #

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

def self.open(io : IO, bonds : Chem::PDB::Writer::BondOptions = Chem::PDB::Writer::BondOptions.flags(Het, Disulfide), renumber : Bool = true, ter_on_fragment : Bool = false, total_entries : Int32 | Nil = nil, 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. Positional and named arguments are forwarded to the constructor.


def self.open(path : Path | String, bonds : Chem::PDB::Writer::BondOptions = Chem::PDB::Writer::BondOptions.flags(Het, Disulfide), renumber : Bool = true, ter_on_fragment : Bool = false, total_entries : Int32 | Nil = nil, & : self -> ) #

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

def close : Nil #
Description copied from module IO::Wrapper

Closes this object. If sync_close is true, it will also close the enclosed IO.


[View source]