Classes | Namespaces | Macros | Typedefs | Enumerations
molfile_plugin.h File Reference

API for C extensions to define a way to load structure, coordinate, trajectory, and volumetric data files. More...

#include "vmdplugin.h"

Classes

struct  PLMD::molfile::molfile_metadata_t
 File level comments, origin information, and annotations. More...
 
struct  PLMD::molfile::molfile_atom_t
 Per-atom attributes and information. More...
 
struct  PLMD::molfile::molfile_timestep_metadata
 
struct  PLMD::molfile::molfile_timestep_t
 
struct  PLMD::molfile::molfile_volumetric_t
 Metadata for volumetric datasets, read initially and used for subsequent memory allocations and file loading. More...
 
struct  PLMD::molfile::molfile_qm_metadata_t
 Sizes of various QM-related, timestep independent data arrays which must be allocated by the caller (VMD) so that the plugin can fill in the arrays with data. More...
 
struct  PLMD::molfile::molfile_qm_sysinfo_t
 QM run info. More...
 
struct  PLMD::molfile::molfile_qm_basis_t
 Data for QM basis set. More...
 
struct  PLMD::molfile::molfile_qm_hessian_t
 Data from QM Hessian/normal mode runs. More...
 
struct  PLMD::molfile::molfile_qm_t
 QM related information that is timestep independent. More...
 
struct  PLMD::molfile::molfile_qm_timestep_metadata
 Sizes of various QM-related, per-timestep data arrays which must be allocated by the caller (VMD) so that the plugin can fill in the arrays with data. More...
 
struct  PLMD::molfile::molfile_qm_wavefunction_t
 QM wavefunction. More...
 
struct  PLMD::molfile::molfile_qm_timestep_t
 QM per trajectory timestep info Note that each timestep can contain multiple wavefunctions. More...
 
struct  PLMD::molfile::molfile_graphics_t
 Individual graphics object/element data. More...
 
struct  PLMD::molfile::molfile_plugin_t
 Main file reader API. More...
 

Namespaces

 PLMD
 
 PLMD::molfile
 

Macros

#define MOL_FILE_PLUGIN_H
 
#define MOLFILE_PLUGIN_TYPE   "mol file reader"
 Define a common plugin type to be used when registering the plugin. More...
 
#define MOLFILE_CONVERTER_PLUGIN_TYPE   "mol file converter"
 File converter plugins use the same API but register under a different type so that regular file readers can have priority. More...
 
#define MOLFILE_SUCCESS   0
 succeeded in reading file More...
 
#define MOLFILE_EOF   -1
 end of file More...
 
#define MOLFILE_ERROR   -1
 error reading/opening a file More...
 
#define MOLFILE_NOSTRUCTUREDATA   -2
 no structure data in this file More...
 
#define MOLFILE_NUMATOMS_UNKNOWN   -1
 unknown number of atoms More...
 
#define MOLFILE_NUMATOMS_NONE   0
 no atoms in this file type More...
 
#define MOLFILE_BUFSIZ   81
 Maximum string size macro. More...
 
#define MOLFILE_BIGBUFSIZ   4096
 maximum chars in long strings More...
 
#define MOLFILE_MAXWAVEPERTS   25
 maximum number of wavefunctions per timestep More...
 
#define MOLFILE_DIRECTIO_MIN_BLOCK_SIZE   4096
 Hard-coded direct-I/O page size constants for use by both VMD and the plugins that want to use direct, unbuffered I/O for high performance with SSDs etc. More...
 
#define MOLFILE_DIRECTIO_MAX_BLOCK_SIZE   4096
 
#define MOLFILE_QMSTATUS_UNKNOWN   -1 /* don't know yet */
 
#define MOLFILE_QMSTATUS_OPT_CONV   0 /* optimization converged */
 
#define MOLFILE_QMSTATUS_SCF_NOT_CONV   1 /* SCF convergence failed */
 
#define MOLFILE_QMSTATUS_OPT_NOT_CONV   2 /* optimization not converged */
 
#define MOLFILE_QMSTATUS_FILE_TRUNCATED   3 /* file was truncated */
 
#define MOLFILE_SCFTYPE_UNKNOWN   -1 /* no info about the method */
 
#define MOLFILE_SCFTYPE_NONE   0 /* calculation didn't make use of SCF */
 
#define MOLFILE_SCFTYPE_RHF   1 /* restricted Hartree-Fock */
 
#define MOLFILE_SCFTYPE_UHF   2 /* unrestricted Hartree-Fock */
 
#define MOLFILE_SCFTYPE_ROHF   3 /* restricted open-shell Hartree-Fock */
 
#define MOLFILE_SCFTYPE_GVB   4 /* generalized valence bond orbitals */
 
#define MOLFILE_SCFTYPE_MCSCF   5 /* multi-configuration SCF */
 
#define MOLFILE_SCFTYPE_FF   6 /* classical force-field based sim. */
 
#define MOLFILE_RUNTYPE_UNKNOWN   0 /* single point run */
 
#define MOLFILE_RUNTYPE_ENERGY   1 /* single point run */
 
#define MOLFILE_RUNTYPE_OPTIMIZE   2 /* geometry optimization */
 
#define MOLFILE_RUNTYPE_SADPOINT   3 /* saddle point search */
 
#define MOLFILE_RUNTYPE_HESSIAN   4 /* Hessian/frequency calculation */
 
#define MOLFILE_RUNTYPE_SURFACE   5 /* potential surface scan */
 
#define MOLFILE_RUNTYPE_GRADIENT   6 /* energy gradient calculation */
 
#define MOLFILE_RUNTYPE_MEX   7 /* minimum energy crossing */
 
#define MOLFILE_RUNTYPE_DYNAMICS
 
#define MOLFILE_RUNTYPE_PROPERTIES
 
#define MOLFILE_NOOPTIONS   0x0000
 Plugin optional data field availability flag. More...
 
#define MOLFILE_INSERTION   0x0001
 insertion codes provided More...
 
#define MOLFILE_OCCUPANCY   0x0002
 occupancy data provided More...
 
#define MOLFILE_BFACTOR   0x0004
 B-factor data provided. More...
 
#define MOLFILE_MASS   0x0008
 Atomic mass provided. More...
 
#define MOLFILE_CHARGE   0x0010
 Atomic charge provided. More...
 
#define MOLFILE_RADIUS   0x0020
 Atomic VDW radius provided. More...
 
#define MOLFILE_ALTLOC   0x0040
 Multiple conformations present. More...
 
#define MOLFILE_ATOMICNUMBER   0x0080
 Atomic element number provided. More...
 
#define MOLFILE_BONDSSPECIAL   0x0100
 Only non-standard bonds provided. More...
 
#define MOLFILE_BADOPTIONS   0xFFFFFFFF
 Detect badly behaved plugins. More...
 
#define MOLFILE_QMTS_NOOPTIONS   0x0000
 Flags indicating availability of optional data fields for QM timesteps. More...
 
#define MOLFILE_QMTS_GRADIENT   0x0001
 energy gradients provided More...
 
#define MOLFILE_QMTS_SCFITER   0x0002
 

Typedefs

typedef struct PLMD::molfile::molfile_timestep_metadata PLMD::molfile::molfile_timestep_metadata_t
 
typedef struct PLMD::molfile::molfile_qm_timestep_metadata PLMD::molfile::molfile_qm_timestep_metadata_t
 Sizes of various QM-related, per-timestep data arrays which must be allocated by the caller (VMD) so that the plugin can fill in the arrays with data. More...
 

Enumerations

enum  PLMD::molfile::molfile_qm_wavefunc_type {
  PLMD::molfile::MOLFILE_WAVE_CANON, PLMD::molfile::MOLFILE_WAVE_GEMINAL, PLMD::molfile::MOLFILE_WAVE_MCSCFNAT, PLMD::molfile::MOLFILE_WAVE_MCSCFOPT,
  PLMD::molfile::MOLFILE_WAVE_CINATUR, PLMD::molfile::MOLFILE_WAVE_PIPEK, PLMD::molfile::MOLFILE_WAVE_BOYS, PLMD::molfile::MOLFILE_WAVE_RUEDEN,
  PLMD::molfile::MOLFILE_WAVE_NAO, PLMD::molfile::MOLFILE_WAVE_PNAO, PLMD::molfile::MOLFILE_WAVE_NHO, PLMD::molfile::MOLFILE_WAVE_PNHO,
  PLMD::molfile::MOLFILE_WAVE_NBO, PLMD::molfile::MOLFILE_WAVE_PNBO, PLMD::molfile::MOLFILE_WAVE_PNLMO, PLMD::molfile::MOLFILE_WAVE_NLMO,
  PLMD::molfile::MOLFILE_WAVE_MOAO, PLMD::molfile::MOLFILE_WAVE_NATO, PLMD::molfile::MOLFILE_WAVE_UNKNOWN
}
 Enumeration of all of the wavefunction types that can be read from QM file reader plugins. More...
 
enum  PLMD::molfile::molfile_qm_charge_type {
  PLMD::molfile::MOLFILE_QMCHARGE_UNKNOWN, PLMD::molfile::MOLFILE_QMCHARGE_MULLIKEN, PLMD::molfile::MOLFILE_QMCHARGE_LOWDIN, PLMD::molfile::MOLFILE_QMCHARGE_ESP,
  PLMD::molfile::MOLFILE_QMCHARGE_NPA
}
 Enumeration of all of the supported QM related charge types. More...
 
enum  PLMD::molfile::molfile_graphics_type {
  PLMD::molfile::MOLFILE_POINT, PLMD::molfile::MOLFILE_TRIANGLE, PLMD::molfile::MOLFILE_TRINORM, PLMD::molfile::MOLFILE_NORMS,
  PLMD::molfile::MOLFILE_LINE, PLMD::molfile::MOLFILE_CYLINDER, PLMD::molfile::MOLFILE_CAPCYL, PLMD::molfile::MOLFILE_CONE,
  PLMD::molfile::MOLFILE_SPHERE, PLMD::molfile::MOLFILE_TEXT, PLMD::molfile::MOLFILE_COLOR, PLMD::molfile::MOLFILE_TRICOLOR
}
 Enumeration of all of the supported graphics objects that can be read from graphics file reader plugins. More...
 

Detailed Description

API for C extensions to define a way to load structure, coordinate, trajectory, and volumetric data files.

Macro Definition Documentation

#define MOL_FILE_PLUGIN_H
#define MOLFILE_ALTLOC   0x0040

Multiple conformations present.

#define MOLFILE_ATOMICNUMBER   0x0080

Atomic element number provided.

#define MOLFILE_BADOPTIONS   0xFFFFFFFF

Detect badly behaved plugins.

#define MOLFILE_BFACTOR   0x0004

B-factor data provided.

#define MOLFILE_BIGBUFSIZ   4096

maximum chars in long strings

#define MOLFILE_BONDSSPECIAL   0x0100

Only non-standard bonds provided.

#define MOLFILE_BUFSIZ   81

Maximum string size macro.

maximum chars in string data

#define MOLFILE_CHARGE   0x0010

Atomic charge provided.

#define MOLFILE_CONVERTER_PLUGIN_TYPE   "mol file converter"

File converter plugins use the same API but register under a different type so that regular file readers can have priority.

#define MOLFILE_DIRECTIO_MAX_BLOCK_SIZE   4096
#define MOLFILE_DIRECTIO_MIN_BLOCK_SIZE   4096

Hard-coded direct-I/O page size constants for use by both VMD and the plugins that want to use direct, unbuffered I/O for high performance with SSDs etc.

We use two constants to define the range of hardware page sizes that we can support, so that we can add support for larger 8KB or 16KB page sizes in the future as they become more prevalent in high-end storage systems.

At present, VMD uses a hard-coded 4KB page size to reduce memory fragmentation, but these constants will make it easier to enable the use of larger page sizes in the future if it becomes necessary.

#define MOLFILE_EOF   -1

end of file

#define MOLFILE_ERROR   -1

error reading/opening a file

#define MOLFILE_INSERTION   0x0001

insertion codes provided

#define MOLFILE_MASS   0x0008

Atomic mass provided.

#define MOLFILE_MAXWAVEPERTS   25

maximum number of wavefunctions per timestep

#define MOLFILE_NOOPTIONS   0x0000

Plugin optional data field availability flag.

no optional data

#define MOLFILE_NOSTRUCTUREDATA   -2

no structure data in this file

#define MOLFILE_NUMATOMS_NONE   0

no atoms in this file type

#define MOLFILE_NUMATOMS_UNKNOWN   -1

unknown number of atoms

#define MOLFILE_OCCUPANCY   0x0002

occupancy data provided

#define MOLFILE_PLUGIN_TYPE   "mol file reader"

Define a common plugin type to be used when registering the plugin.

#define MOLFILE_QMSTATUS_FILE_TRUNCATED   3 /* file was truncated */
#define MOLFILE_QMSTATUS_OPT_CONV   0 /* optimization converged */
#define MOLFILE_QMSTATUS_OPT_NOT_CONV   2 /* optimization not converged */
#define MOLFILE_QMSTATUS_SCF_NOT_CONV   1 /* SCF convergence failed */
#define MOLFILE_QMSTATUS_UNKNOWN   -1 /* don't know yet */
#define MOLFILE_QMTS_GRADIENT   0x0001

energy gradients provided

#define MOLFILE_QMTS_NOOPTIONS   0x0000

Flags indicating availability of optional data fields for QM timesteps.

no optional data

#define MOLFILE_QMTS_SCFITER   0x0002
#define MOLFILE_RADIUS   0x0020

Atomic VDW radius provided.

#define MOLFILE_RUNTYPE_DYNAMICS
Value:
8 /* Any type of molecular dynamics
* e.g. Born-Oppenheimer, Car-Parinello,
* or classical MD */
#define MOLFILE_RUNTYPE_ENERGY   1 /* single point run */
#define MOLFILE_RUNTYPE_GRADIENT   6 /* energy gradient calculation */
#define MOLFILE_RUNTYPE_HESSIAN   4 /* Hessian/frequency calculation */
#define MOLFILE_RUNTYPE_MEX   7 /* minimum energy crossing */
#define MOLFILE_RUNTYPE_OPTIMIZE   2 /* geometry optimization */
#define MOLFILE_RUNTYPE_PROPERTIES
Value:
9 /* Properties were calculated from a
* wavefunction that was read from file */
#define MOLFILE_RUNTYPE_SADPOINT   3 /* saddle point search */
#define MOLFILE_RUNTYPE_SURFACE   5 /* potential surface scan */
#define MOLFILE_RUNTYPE_UNKNOWN   0 /* single point run */
#define MOLFILE_SCFTYPE_FF   6 /* classical force-field based sim. */
#define MOLFILE_SCFTYPE_GVB   4 /* generalized valence bond orbitals */
#define MOLFILE_SCFTYPE_MCSCF   5 /* multi-configuration SCF */
#define MOLFILE_SCFTYPE_NONE   0 /* calculation didn't make use of SCF */
#define MOLFILE_SCFTYPE_RHF   1 /* restricted Hartree-Fock */
#define MOLFILE_SCFTYPE_ROHF   3 /* restricted open-shell Hartree-Fock */
#define MOLFILE_SCFTYPE_UHF   2 /* unrestricted Hartree-Fock */
#define MOLFILE_SCFTYPE_UNKNOWN   -1 /* no info about the method */
#define MOLFILE_SUCCESS   0

succeeded in reading file