#include "adt/array.h"
#include "mdio/file.h"
#include "mdapi/mdtypes.h"
Go to the source code of this file.
Classes | |
struct | mdio_Bincoord_t |
Binary coordinate reader and writer class. More... | |
Typedefs | |
typedef mdio_Bincoord_t | mdio_Bincoord |
Binary coordinate reader and writer class. | |
Functions | |
mdio_Bincoord * | mdio_createBincoord (void) |
Constructor. | |
void | mdio_destroyBincoord (mdio_Bincoord *) |
Destructor. | |
int | mdio_readBincoord (mdio_Bincoord *, const char *name, int n_expect) |
Read binary coordinate file. | |
MD_Dvec * | mdio_getBincoord (mdio_Bincoord *, int *nelems) |
Obtain array of coordinates. | |
int | mdio_setBincoord (mdio_Bincoord *, MD_Dvec *dvec, int nelems) |
Set an array of coordinates. | |
int | mdio_writeBincoord (mdio_Bincoord *, const char *name) |
Write binary coordinate file. | |
int | mdio_initializeBincoord (mdio_Bincoord *) |
Alternative constructor. | |
void | mdio_cleanupBincoord (mdio_Bincoord *) |
Alternative destructor. |
mdio_Bincoord
class reads and writes NAMD-style binary coordinate files. Reads are stored into an array of MD_Dvec
coordinates which is then obtained from the mdio_Bincoord
object. The mdio_Bincoord
object can also be provided with a user-defined array of MD_Dvec
coordinates for writing.
The mdio_Bincoord
class is derived from mdio_File
so that error handling is performed by typecasting (mdio_Bincoord
*
) to (mdio_File
*
).
|
Binary coordinate reader and writer class. Members should be treated as private. |
|
Alternative destructor.
Use to destroy a preallocated |
|
Constructor. Creates dynamically allocated binary coordinate file reader and writer object.
|
|
Destructor.
Frees dynamically allocated binary coordinate file reader and writer object after freeing an allocated array of
Note that an |
|
Obtain array of coordinates.
mdio_readBincoord() , then it will persist only until destruction of the mdio_Bincoord object.
|
|
Alternative constructor.
Use to construct a preallocated |
|
Read binary coordinate file.
n_expect should be set to 0. Otherwise, this value is used to validate the expected number of coordinates.
|
|
Set an array of coordinates.
dvec array will still belong to the user, which means that no attempt will be made to free it, and the burden of any dynamic memory management still belongs to the user.
|
|
Write binary coordinate file.
mdio_Bincoord object, either from a previous call to mdio_setBincoord() or a previous read using mdio_readBincoord() .
|