|
MMTF-C++
The C++ language MMTF libraries
|
Data Structures | |
| class | BinaryDecoder |
| Helper class to decode msgpack binary into a vector. More... | |
| struct | BioAssembly |
| Data store for the biological assembly annotation. More... | |
| class | BondAdder |
| Helper class for adding bonds to a group-redundant system. More... | |
| class | DecodeError |
| Exception thrown when failing during decoding. More... | |
| class | EncodeError |
| Exception thrown when failing during encoding. More... | |
| struct | Entity |
| Entity type. More... | |
| struct | GroupType |
| Group (residue) level data store. More... | |
| class | MapDecoder |
| Helper class to decode msgpack maps into object fields. More... | |
| struct | StructureData |
| Top level MMTF data container. More... | |
| struct | Transform |
| Transformation definition for a set of chains. More... | |
Functions | |
| std::vector< char > | encodeInt8ToByte (std::vector< int8_t > vec_in) |
| std::vector< char > | encodeFourByteInt (std::vector< int32_t > vec_in) |
| std::vector< char > | encodeStringVector (std::vector< std::string > in_sv, int32_t CHAIN_LEN) |
| std::vector< char > | encodeRunLengthChar (std::vector< char > in_cv) |
| std::vector< char > | encodeRunLengthDeltaInt (std::vector< int32_t > int_vec) |
| std::vector< char > | encodeRunLengthFloat (std::vector< float > floats_in, int32_t multiplier) |
| std::vector< char > | encodeDeltaRecursiveFloat (std::vector< float > floats_in, int32_t multiplier) |
| void | decodeFromBuffer (StructureData &data, const char *buffer, size_t size) |
| Decode an MMTF data structure from a byte buffer. More... | |
| template<typename Stream > | |
| void | decodeFromStream (StructureData &data, Stream &stream) |
| Decode an MMTF data structure from a stream. More... | |
| void | decodeFromFile (StructureData &data, const std::string &filename) |
| Decode an MMTF data structure from an existing file. More... | |
| void | encodeToFile (const StructureData &data, const std::string &filename, int32_t coord_divider=1000, int32_t occupancy_b_factor_divider=100, int32_t chain_name_max_length=4) |
| Encode an MMTF data structure into a file. More... | |
| template<typename Stream > | |
| void | encodeToStream (const StructureData &data, Stream &stream, int32_t coord_divider=1000, int32_t occupancy_b_factor_divider=100, int32_t chain_name_max_length=4) |
| Encode an MMTF data structure into a stream. More... | |
| std::map< std::string, msgpack::object > | encodeToMap (const StructureData &data, msgpack::zone &m_zone, int32_t coord_divider=1000, int32_t occupancy_b_factor_divider=100, int32_t chain_name_max_length=4) |
| Encode an MMTF data structure into a map of msgpack objects. More... | |
| void | compressGroupList (StructureData &data) |
| Eliminate redundant groups from groupList. More... | |
| std::string | getVersionString () |
| Get string representation of MMTF spec version implemented here. More... | |
| bool | isVersionSupported (const std::string &version_string) |
| Check if version is supported (minor revisions ok, major ones not) More... | |
| template<typename T > | |
| T | getDefaultValue () |
| Get default value for given type. More... | |
| template<typename T > | |
| bool | isDefaultValue (const T &value) |
| template<typename T > | |
| bool | isDefaultValue (const std::vector< T > &value) |
| template<> | |
| bool | isDefaultValue (const std::string &value) |
| template<typename T > | |
| void | setDefaultValue (T &value) |
| Set default value to given type. More... | |
| bool | is_hetatm (const char *type) |
| Check if type is hetatm. More... | |
|
inline |
Eliminate redundant groups from groupList.
Modifies groupList and groupTypeList
| [in,out] | data | Consistent system |
|
inline |
Decode an MMTF data structure from a byte buffer.
| [out] | data | MMTF data structure to be filled |
| [in] | buffer | File contents |
| [in] | size | Size of buffer |
| mmtf::DecodeError | if an error occured |
|
inline |
Decode an MMTF data structure from an existing file.
| [out] | data | MMTF data structure to be filled |
| [in] | filename | Path to file to load |
| mmtf::DecodeError | if an error occured |
|
inline |
Decode an MMTF data structure from a stream.
Note that the full stream is read until the end before decoding it!
| [out] | data | MMTF data structure to be filled |
| [in] | stream | Any stream type compatible to std::ostream |
| mmtf::DecodeError | if an error occured |
|
inline |
encode Delta Recursive Float encoding (type 10)
| [in] | floats_in | vector of ints |
| [in] | multiplier | float multiplier |
|
inline |
encode 4 bytes to int encoding (type 4)
| [in] | vec_in | vector of ints to encode |
|
inline |
encode 8 bit int to bytes encoding (type 2)
| [in] | vec_in | vector of ints to encode |
|
inline |
encode Run Length Char encoding (type 6)
| [in] | in_cv | vector for chars |
|
inline |
encode Run Length Delta Int encoding (type 8)
| [in] | int_vec | vector of ints |
|
inline |
encode Run Length Float encoding (type 9)
| [in] | floats_in | vector of ints |
| [in] | multiplier | float multiplier |
|
inline |
encode string vector encoding (type 5)
| [in] | in_sv | vector of strings |
| [in] | CHAIN_LEN | maximum length of string |
|
inline |
Encode an MMTF data structure into a file.
| [in] | data | MMTF data structure to be stored |
| [in] | filename | Path to file to load |
| [in] | coord_divider | Divisor for coordinates |
| [in] | occupancy_b_factor_divider | Divisor for occupancy and b-factor |
| [in] | chain_name_max_length | Max. length for chain name strings |
| mmtf::EncodeError | if an error occurred |
Common settings for the divisors are the default values for a loss-less encoding and both set to 10 for a lossy variant.
|
inline |
Encode an MMTF data structure into a map of msgpack objects.
| [in] | data | MMTF data structure to be stored |
| [in] | m_zone | msgpack::zone object to use |
Other parameters and behavior are as in encodeToFile, but this enables you to add additional fields before packing.
|
inline |
Encode an MMTF data structure into a stream.
| [in] | data | MMTF data structure to be stored |
| [in] | stream | Stream to encode to |
Other parameters and behavior are as in encodeToFile, but this enables you to store the data to other types of storage.
|
inline |
Get default value for given type.
|
inline |
Get string representation of MMTF spec version implemented here.
|
inline |
Check if type is hetatm.
| type | cstring of group.chemCompType |
|
inline |
| T | Can be any numeric type, vector of string |
|
inline |
|
inline |
|
inline |
Check if version is supported (minor revisions ok, major ones not)
|
inline |
Set default value to given type.
| T | Can be any numeric type (no need for vector or strings here) |