module Chem

Defined in:

chem.cr
chem/connectivity.cr
chem/core/atom.cr
chem/core/atom_view.cr
chem/core/bias.cr
chem/core/bond_array.cr
chem/core/chain.cr
chem/core/chain_view.cr
chem/core/residue_view.cr
chem/core/structure.cr
chem/core/structure/builder.cr
chem/pull_parser.cr
chem/register_format.cr
chem/version.cr

Constant Summary

Log = ::Log.for("chem")
VERSION = "0.1.0"

Class Method Summary

Class Method Detail

def self.guess_format(path : Path | String, type : Chem::Spatial::Grid.class) : Chem::Cube.class | Chem::DX.class | Chem::VASP::Chgcar.class | Chem::VASP::Locpot.class #

Returns the format compatible with Chem::Spatial::Grid based on path. Raises ArgumentError if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format(path : Path | String, type : Chem::Spatial::Grid::Info.class) : Chem::Cube.class | Chem::DX.class | Chem::VASP::Chgcar.class | Chem::VASP::Locpot.class #

Returns the format compatible with Chem::Spatial::Grid::Info based on path. Raises ArgumentError if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format(path : Path | String, type : Chem::Structure.class) : Chem::Cube.class | Chem::Gen.class | Chem::JDFTx.class | Chem::Mol.class | Chem::Mol2.class | Chem::PDB.class | Chem::PSF.class | Chem::Protein::Stride.class | Chem::PyMOL.class | Chem::SDF.class | Chem::VASP::Chgcar.class | Chem::VASP::Locpot.class | Chem::VASP::Poscar.class | Chem::VMD.class | Chem::XYZ.class #

Returns the format compatible with Chem::Structure based on path. Raises ArgumentError if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format(path : Path | String, type : Enumerable(Chem::Structure).class) : Chem::Mol2.class | Chem::PDB.class | Chem::SDF.class | Chem::XYZ.class #

Returns the format compatible with Enumerable(Chem::Structure) based on path. Raises ArgumentError if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format(path : Path | String, type : Chem::Spatial::Positions3.class) : Chem::DCD.class #

Returns the format compatible with Chem::Spatial::Positions3 based on path. Raises ArgumentError if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format(path : Path | String, type : Enumerable(Chem::Spatial::Positions3).class) : Chem::DCD.class #

Returns the format compatible with Enumerable(Chem::Spatial::Positions3) based on path. Raises ArgumentError if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format(path : Path | String, type : Chem::DCD::Info.class) : Chem::DCD.class #

Returns the format compatible with Chem::DCD::Info based on path. Raises ArgumentError if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format(path : Path | String, type : Chem::AtomView.class) : Chem::Gen.class | Chem::Mol.class | Chem::Mol2.class | Chem::PDB.class | Chem::XYZ.class #

Returns the format compatible with Chem::AtomView based on path. Raises ArgumentError if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format(path : Path | String, type : Chem::PDB::Info.class) : Chem::PDB.class #

Returns the format compatible with Chem::PDB::Info based on path. Raises ArgumentError if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format(path : Path | String, type : Chem::Structure::Experiment.class) : Chem::PDB.class #

Returns the format compatible with Chem::Structure::Experiment based on path. Raises ArgumentError if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format(path : Path | String) #

Returns the format module for path based on its filename. File stem matching via File.match? is case-sensitive but extension matching is not. Raises ArgumentError if the format cannot be determined.


[View source]
def self.guess_format?(path : Path | String, type : Chem::Spatial::Grid.class) : Chem::Cube.class | Chem::DX.class | Chem::VASP::Chgcar.class | Chem::VASP::Locpot.class | Nil #

Returns the format compatible with Chem::Spatial::Grid based on path or nil if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format?(path : Path | String, type : Chem::Spatial::Grid::Info.class) : Chem::Cube.class | Chem::DX.class | Chem::VASP::Chgcar.class | Chem::VASP::Locpot.class | Nil #

Returns the format compatible with Chem::Spatial::Grid::Info based on path or nil if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format?(path : Path | String, type : Chem::Structure.class) : Chem::Cube.class | Chem::Gen.class | Chem::JDFTx.class | Chem::Mol.class | Chem::Mol2.class | Chem::PDB.class | Chem::PSF.class | Chem::Protein::Stride.class | Chem::PyMOL.class | Chem::SDF.class | Chem::VASP::Chgcar.class | Chem::VASP::Locpot.class | Chem::VASP::Poscar.class | Chem::VMD.class | Chem::XYZ.class | Nil #

Returns the format compatible with Chem::Structure based on path or nil if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format?(path : Path | String, type : Enumerable(Chem::Structure).class) : Chem::Mol2.class | Chem::PDB.class | Chem::SDF.class | Chem::XYZ.class | Nil #

Returns the format compatible with Enumerable(Chem::Structure) based on path or nil if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format?(path : Path | String, type : Chem::Spatial::Positions3.class) : Chem::DCD.class | Nil #

Returns the format compatible with Chem::Spatial::Positions3 based on path or nil if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format?(path : Path | String, type : Enumerable(Chem::Spatial::Positions3).class) : Chem::DCD.class | Nil #

Returns the format compatible with Enumerable(Chem::Spatial::Positions3) based on path or nil if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format?(path : Path | String, type : Chem::DCD::Info.class) : Chem::DCD.class | Nil #

Returns the format compatible with Chem::DCD::Info based on path or nil if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format?(path : Path | String, type : Chem::AtomView.class) : Chem::Gen.class | Chem::Mol.class | Chem::Mol2.class | Chem::PDB.class | Chem::XYZ.class | Nil #

Returns the format compatible with Chem::AtomView based on path or nil if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format?(path : Path | String, type : Chem::PDB::Info.class) : Chem::PDB.class | Nil #

Returns the format compatible with Chem::PDB::Info based on path or nil if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format?(path : Path | String, type : Chem::Structure::Experiment.class) : Chem::PDB.class | Nil #

Returns the format compatible with Chem::Structure::Experiment based on path or nil if the format does not support type or cannot be determined.

This method effectively narrows down the union of available formats to those compatible with type. See .guess_format?(path) for more details.


[View source]
def self.guess_format?(path : Path | String) #

Returns the format module for path based on its filename, or nil if unknown. File stem matching via File.match? is case-sensitive but extension matching is not.


[View source]