Gromacs
2024.4
|
#include "gmxpre.h"
#include "mrcserializer.h"
#include "config.h"
#include "gromacs/fileio/mrcdensitymapheader.h"
#include "gromacs/utility/inmemoryserializer.h"
Implements methods from mrcserializer.h.
Enumerations | |
enum | gmx::anonymous_namespace{mrcserializer.cpp}::MachineStamp : int32_t { gmx::anonymous_namespace{mrcserializer.cpp}::MachineStamp::bigEndian = 0x11110000, gmx::anonymous_namespace{mrcserializer.cpp}::MachineStamp::smallEndian = 0x44440000 } |
Machine stamp to indicate endianess of mrc/ccp4 file. As named in "EMDB Map Distribution Format Description Version 1.01 (c) emdatabank.org 2014" The first two bytes of a 4 byte unsigned int are used to indicate endianess: 0x11 0x11 big endian 0x44 0x44 small endian Byte-swap data if appropriate, when transferring data files between machines. More... | |
Functions | |
template<typename ContainerType > | |
std::enable_if_t < std::is_same_v< typename ContainerType::value_type, int32_t >, void > | gmx::anonymous_namespace{mrcserializer.cpp}::serialize (ISerializer *serializer, ContainerType *valueContainer) |
Serialize a container of int32_t values. Serializes all containers with value_type int32_t that may looped over in a range based for loop and have modifiable elements. More... | |
template<typename ContainerType > | |
std::enable_if_t < std::is_same_v< typename ContainerType::value_type, float >, void > | gmx::anonymous_namespace{mrcserializer.cpp}::serialize (ISerializer *serializer, ContainerType *valueContainer) |
Serialize a container of float values. Serializes all containers with value_type float that may looped over in a range based for loop and have modifiable elements. More... | |
void | gmx::anonymous_namespace{mrcserializer.cpp}::serializeIndex (ISerializer *serializer, int32_t *index) |
Serialize and convert from FORTRAN 1-based to C 0-based indices when reading and vice versa when writing. | |
void | gmx::anonymous_namespace{mrcserializer.cpp}::serializeIndices (ISerializer *serializer, std::array< int32_t, 3 > *valueArray) |
Serializes an integer array and add unity when writing, substracting unity when reading. | |
template<class IntegralType > | |
std::enable_if_t <(std::is_integral_v < IntegralType > ||std::is_enum_v< IntegralType > ), void > | gmx::anonymous_namespace{mrcserializer.cpp}::serializeAsInt32 (ISerializer *serializer, IntegralType *value) |
Serialize input as int32_t via static casting. More... | |
float | gmx::anonymous_namespace{mrcserializer.cpp}::mrcUnitsToNm (float mrcValue) |
Convert MRC distances to nm. | |
float | gmx::anonymous_namespace{mrcserializer.cpp}::nmToMrcUnits (float nmValue) |
Convert nm to MRC distances. | |
void | gmx::anonymous_namespace{mrcserializer.cpp}::serializeDistance (ISerializer *serializer, float *distance) |
Serialize and convert between MRC and GROMACS distance units. | |
void | gmx::anonymous_namespace{mrcserializer.cpp}::serializeCrystallographicSkewData (ISerializer *serializer, MrcDensitySkewData *skewData) |
Serialize the skew data, words 25-37 in an mrc file. | |
void | gmx::anonymous_namespace{mrcserializer.cpp}::doMrcDensityMapHeader (ISerializer *serializer, MrcDensityMapHeader *mrcFile) |
Symmetrise and de-serializes the mrc density map header. More... | |
void | gmx::serializeMrcDensityMapHeader (ISerializer *serializer, const MrcDensityMapHeader &mrcHeader) |
Serializes an MrcDensityMapHeader from a given serializer. More... | |
MrcDensityMapHeader | gmx::deserializeMrcDensityMapHeader (ISerializer *serializer) |
Deserializes an MrcDensityMapHeader from a given serializer. More... | |
Variables | |
constexpr float | gmx::anonymous_namespace{mrcserializer.cpp}::c_nmToMrcUnits = 10 |
conversion constant from nm to MRC distance units (Ångström) | |