#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) |
| int(* | write_volumetric_data )(void *, molfile_volumetric_t *metadata, float *datablock, float *colorblock) |
| int(* | read_angles )(void *, int *numangles, int *angles, double *angleforces, int *numdihedrals, int *dihedrals, double *dihedralforces, int *numimpropers, int *impropers, double *improperforces, int *numcterms, int *cterms, int *ctermcols, int *ctermrows, double *ctermforces) |
| int(* | write_angles )(void *, int numangles, const int *angles, const double *angleforces, int numdihedrals, const int *dihedrals, const double *dihedralforces, int numimpropers, const int *impropers, const double *improperforces, int numcterms, const int *cterms, int ctermcols, int ctermrows, const double *ctermforces) |
| int(* | read_qm_metadata )(void *, molfile_qm_metadata_t *metadata) |
| int(* | read_qm_rundata )(void *, molfile_qm_t *qmdata) |
| int(* | read_timestep )(void *, int natoms, molfile_timestep_t *, molfile_qm_metadata_t *, molfile_qm_timestep_t *) |
| int(* | read_timestep_metadata )(void *, molfile_timestep_metadata_t *) |
Definition at line 353 of file molfile_plugin.h.
|
|
Close the file and release all data. The handle cannot be reused. Referenced by main, and VMDPLUGIN_init. |
|
|
Close the file and release all data. The handle cannot be reused. Referenced by VMDPLUGIN_init. |
|
|
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 one that lists the extension earliest in its list is selected. In the case of a "tie", the first one tried/checked "wins". Definition at line 369 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, and VMDPLUGIN_init. |
|
|
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. Referenced by VMDPLUGIN_init. |
|
|
Read in Angles, Dihedrals, Impropers, and Cross Terms, and their forces Forces are in Kcal/mol (Cross terms pertain to the CHARMM/NAMD CMAP feature, forces are given as a 2-D matrix) |
|
|
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_init. |
|
|
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. Referenced by VMDPLUGIN_init. |
|
|
XXX this function will be augmented and possibly superceded by a new QM-capable version named read_timestep, when finished. 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. |
|
|
Retrieve metadata pertaining to QM datasets in this file. Referenced by VMDPLUGIN_init. |
|
|
Read QM data Referenced by 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_init. |
|
|
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, and VMDPLUGIN_init. |
|
|
Read the next timestep from the file. Return MOLFILE_SUCCESS, or MOLFILE_EOF on EOF. If the molfile_timestep_t or molfile_qm_metadata_t arguments are NULL, then the coordinate or qm data should be skipped. Otherwise, the application must prepare molfile_timestep_t and molfile_qm_timestep_t by allocating space for the corresponding number of coordinates, orbital wavefunction coefficients, etc. Since it is common for users to want to load only the final timestep data from a QM run, the application may provide any combination of valid, or NULL pointers for the molfile_timestep_t and molfile_qm_timestep_t parameters, depending on what information the user is interested in. The natoms and qm metadata parameters exist because some file formats cannot determine for themselves how many atoms etc are in a timestep; the app must therefore obtain this information elsewhere and provide it to the plugin. |
|
|
|
|
|
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_init. |
|
|
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_init. |
|
|
Write out Angles, Dihedrals, Impropers, and Cross Terms Forces are in Kcal/mol (Cross terms pertain to the CHARMM/NAMD CMAP feature, forces are given as a 2-D matrix) |
|
|
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. Referenced by VMDPLUGIN_init. |
|
|
Write structure information. Return success. Referenced by VMDPLUGIN_init. |
|
|
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. Referenced by VMDPLUGIN_init. |
|
|
Write the specified volumetric data set into the space pointed to by datablock. The * 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_init. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002