#include <molfile_plugin.h>
Public Attributes | |
vmdplugin_HEAD const char * | filename_extension |
void *(* | open_file_read )(const char *filepath, const char *filetype, int *natoms) |
int(* | read_structure )(void *, int *optflags, molfile_atom_t *atoms) |
int(* | read_bonds )(void *, int *nbonds, int **from, int **to, float **bondorder) |
int(* | read_next_timestep )(void *, int natoms, molfile_timestep_t *) |
void(* | close_file_read )(void *) |
void *(* | open_file_write )(const char *filepath, const char *filetype, int natoms) |
int(* | write_structure )(void *, int optflags, const molfile_atom_t *atoms) |
int(* | write_timestep )(void *, const molfile_timestep_t *) |
void(* | close_file_write )(void *) |
int(* | read_volumetric_metadata )(void *, int *nsets, molfile_volumetric_t **metadata) |
int(* | read_volumetric_data )(void *, int set, float *datablock, float *colorblock) |
int(* | read_rawgraphics )(void *, int *nelem, const molfile_graphics_t **data) |
int(* | read_molecule_metadata )(void *, molfile_metadata_t **metadata) |
int(* | write_bonds )(void *, int nbonds, int *from, int *to, float *bondorder) |
Definition at line 217 of file molfile_plugin.h.
|
Close the file and release all data. The handle cannot be reused. Referenced by main, VMDPLUGIN_init, and VMDPLUGIN_register. |
|
Close the file and release all data. The handle cannot be reused. |
|
Filename extension for this file type. May be NULL if no filename extension exists and/or is known. For file types that match several common extensions, list them in a comma separated list such as: "pdb,ent,foo,bar,baz,ban" The comma separated list will be expanded when filename extension matching is performed. If multiple plugins solicit the same filename extensions, the first one tried/checked "wins". Definition at line 232 of file molfile_plugin.h. Referenced by VMDPLUGIN_init. |
|
Try to open the file for reading. Return an opaque handle, or NULL on failure. Set the number of atoms; if the number of atoms cannot be determined, set natoms to MOLFILE_NUMATOMS_UNKNOWN. Filetype should be the name under which this plugin was registered; this is provided so that plugins can provide the same function pointer to handle multiple file types. Referenced by main, VMDPLUGIN_init, and VMDPLUGIN_register. |
|
Open a coordinate file for writing using the given header information. Return an opaque handle, or NULL on failure. The application must specify the number of atoms to be written. filetype should be the name under which this plugin was registered. |
|
Read bond information for the molecule. On success the arrays from and to should point to the (one-based) indices of bonded atoms. Each unique bond should be specified only once, so file formats that list bonds twice will need post-processing before the results are returned to the caller. If the plugin provides bond information, but the file loaded doesn't actually contain any bond info, the nbonds parameter should be set to 0 and from/to should be set to NULL to indicate that no bond information was actually present, and automatic bond search should be performed. If the plugin provides bond order information, the bondorder array will contain the bond order for each from/to pair. If not, the bondorder pointer should be set to NULL, in which case the caller will provide a default bond order value of 1.0. These arrays must be freed by the plugin in the close_file_read function. This function can be called only after read_structure. Return MOLFILE_SUCCESS if no errors occur. Referenced by main, and VMDPLUGIN_register. |
|
Read molecule metadata such as what database (if any) this file/data came from, what the accession code for the database is, textual remarks and other notes pertaining to the contained structure/trajectory/volume and anything else that's informative at the whole file level. |
|
Read the next timestep from the file. Return MOLFILE_SUCCESS, or MOLFILE_EOF on EOF. If the molfile_timestep_t argument is NULL, then the frame should be skipped. Otherwise, the application must prepare molfile_timestep_t by allocating space in coords for the corresponding number of coordinates. The natoms parameter exists because some coordinate file formats (like CRD) cannot determine for themselves how many atoms are in a timestep; the app must therefore obtain this information elsewhere and provide it to the plugin. Referenced by main, and VMDPLUGIN_init. |
|
Read raw graphics data stored in this file. Return the number of data elements and the data itself as an array of molfile_graphics_t in the pointer provided by the application. The plugin is responsible for freeing the data when the file is closed. Referenced by VMDPLUGIN_register. |
|
Read molecular structure from the given file handle. atoms is allocated by the caller and points to space for natoms. On success, place atom information in the passed-in pointer. optflags specifies which optional fields in the atoms will be set by the plugin. Referenced by main, VMDPLUGIN_init, and VMDPLUGIN_register. |
|
Read the specified volumetric data set into the space pointed to by datablock. The set is specified with a zero-based index. The space allocated for the datablock must be equal to xsize * ysize * zsize. No space will be allocated for colorblock unless has_color is nonzero; in that case, colorblock should be filled in with three RGB floats per datapoint. Referenced by VMDPLUGIN_register. |
|
Retrieve metadata pertaining to volumetric datasets in this file. Set nsets to the number of volumetric data sets, and set *metadata to point to an array of molfile_volumetric_t. The array is owned by the plugin and should be freed by close_file_read. The application may call this function any number of times. Referenced by VMDPLUGIN_register. |
|
Write bond information for the molecule. The arrays from and to point to the (one-based) indices of bonded atoms. Each unique bond will be specified only once by the caller. File formats that list bonds twice will need to emit both the from/to and to/from versions of each. This function must be called before write_structure. Unlike the read_bonds routine, the bondorder information will always be provided (each bondorder can be set to 1 if unknown). Return MOLFILE_SUCCESS if no errors occur. |
|
Write structure information. Return success. |
|
Write a timestep to the coordinate file. Return MOLFILE_SUCCESS if no errors occur. If the file contains structure information in each timestep (like a multi-entry PDB), it will have to cache the information from the initial calls from write_structure. |