C interface reference¶
The C interface is define in the
chemfiles.h, in which all the functions and
enums have a
chfl_ prefix for namespacing. Main chemfiles types are the
following opaque pointer types:
CHFL_TRAJECTORY maps to the Trajectory class;
CHFL_FRAME maps to the Frame class;
CHFL_TOPOLOGY maps to the Topology class.
CHFL_RESIDUE maps to the Residue class.
CHFL_SELECTION maps to the Selection class.
CHFL_PROPERTY maps to the Property class.
The user is reponsible for memory management when using these types.
Constructors functions (functions returning pointers to types defined above)
return freshly allocated memory, and calling the
return the corresponding memory to the operating system.
void chfl_free(const void *object)¶
Free the memory associated with a chemfiles object.
This function is NOT equivalent to the standard C function
free, as memory is acquired and released for all chemfiles objects using a references counter to allow direct modification of C++ objects.
typedef double chfl_vector3d¶
A 3-dimensional vector for the chemfiles interface.
chemfiles.h also exports the same macro as in the
C++ interface, and the
chfl_version function allow to access the version of
the Chemfiles library.
const char *chfl_version(void)¶
Get the version of the chemfiles library.
A null-terminated string containing the version of Chemfiles.