Classes | Namespaces | Macros | Typedefs | Enumerations
molfile_plugin.h File Reference
#include "vmdplugin.h"

Classes

struct  PLMD::molfile::molfile_atom_t
 Per-atom attributes and information. More...
 
struct  PLMD::molfile::molfile_graphics_t
 Individual graphics object/element data. More...
 
struct  PLMD::molfile::molfile_metadata_t
 File level comments, origin information, and annotations. More...
 
struct  PLMD::molfile::molfile_plugin_t
 Main file reader API. 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_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_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_timestep_t
 QM per trajectory timestep info Note that each timestep can contain multiple wavefunctions. More...
 
struct  PLMD::molfile::molfile_qm_wavefunction_t
 QM wavefunction. More...
 
struct  PLMD::molfile::molfile_timestep_metadata
 
struct  PLMD::molfile::molfile_timestep_t
 
struct  PLMD::molfile::molfile_volumetric_readwrite_t
 Volumetric dataset read/write structure with both flag/parameter sets and VMD-allocated pointers for fields to be used by the plugin. More...
 
struct  PLMD::molfile::molfile_volumetric_t
 Metadata for volumetric datasets, read initially and used for subsequent memory allocations and file loading. More...
 

Namespaces

 PLMD
 
 PLMD::molfile
 

Macros

#define MOL_FILE_PLUGIN_H
 
#define MOLFILE_ALTLOC   0x0040
 Multiple conformations present
More...
 
#define MOLFILE_ATOMICNUMBER   0x0080
 Atomic element number provided
More...
 
#define MOLFILE_BADOPTIONS   0xFFFFFFFF
 Detect badly behaved plugins. More...
 
#define MOLFILE_BFACTOR   0x0004
 B-factor data provided
More...
 
#define MOLFILE_BIGBUFSIZ   4096
 maximum chars in long strings More...
 
#define MOLFILE_BONDSSPECIAL   0x0100
 Only non-standard bonds provided. More...
 
#define MOLFILE_BUFSIZ   81
 Maximum string size macro. More...
 
#define MOLFILE_CHARGE   0x0010
 Atomic charge provided
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_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. More...
 
#define MOLFILE_EOF   -1
 end of file
More...
 
#define MOLFILE_ERROR   -1
 error reading/opening a file
More...
 
#define MOLFILE_INSERTION   0x0001
 insertion codes provided
More...
 
#define MOLFILE_MASS   0x0008
 Atomic mass provided
More...
 
#define MOLFILE_MAXWAVEPERTS   25
 maximum number of wavefunctions per timestep More...
 
#define MOLFILE_NOOPTIONS   0x0000
 Plugin optional data field availability flag. More...
 
#define MOLFILE_NOSTRUCTUREDATA   -2
 no structure data in this file More...
 
#define MOLFILE_NUMATOMS_NONE   0
 no atoms in this file type
More...
 
#define MOLFILE_NUMATOMS_UNKNOWN   -1
 unknown number of atoms
More...
 
#define MOLFILE_OCCUPANCY   0x0002
 occupancy data provided
More...
 
#define MOLFILE_PLUGIN_TYPE   "mol file reader"
 Define a common plugin type to be used when registering the plugin. More...
 
#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
More...
 
#define MOLFILE_QMTS_NOOPTIONS   0x0000
 Flags indicating availability of optional data fields for QM timesteps. More...
 
#define MOLFILE_QMTS_SCFITER   0x0002
 
#define MOLFILE_RADIUS   0x0020
 Atomic VDW radius provided
More...
 
#define MOLFILE_RUNTYPE_DYNAMICS
 
#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
 
#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
More...
 

Typedefs

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...
 
typedef struct PLMD::molfile::molfile_timestep_metadata PLMD::molfile::molfile_timestep_metadata_t
 

Enumerations

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...
 
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_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...
 

Detailed Description

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

Macro Definition Documentation

◆ MOL_FILE_PLUGIN_H

#define MOL_FILE_PLUGIN_H

◆ MOLFILE_ALTLOC

#define MOLFILE_ALTLOC   0x0040

Multiple conformations present

◆ MOLFILE_ATOMICNUMBER

#define MOLFILE_ATOMICNUMBER   0x0080

Atomic element number provided

◆ MOLFILE_BADOPTIONS

#define MOLFILE_BADOPTIONS   0xFFFFFFFF

Detect badly behaved plugins.

◆ MOLFILE_BFACTOR

#define MOLFILE_BFACTOR   0x0004

B-factor data provided

◆ MOLFILE_BIGBUFSIZ

#define MOLFILE_BIGBUFSIZ   4096

maximum chars in long strings

◆ MOLFILE_BONDSSPECIAL

#define MOLFILE_BONDSSPECIAL   0x0100

Only non-standard bonds provided.

◆ MOLFILE_BUFSIZ

#define MOLFILE_BUFSIZ   81

Maximum string size macro.

maximum chars in string data

◆ MOLFILE_CHARGE

#define MOLFILE_CHARGE   0x0010

Atomic charge provided

◆ MOLFILE_CONVERTER_PLUGIN_TYPE

#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.

◆ MOLFILE_DIRECTIO_MAX_BLOCK_SIZE

#define MOLFILE_DIRECTIO_MAX_BLOCK_SIZE   4096

◆ MOLFILE_DIRECTIO_MIN_BLOCK_SIZE

#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.

◆ MOLFILE_EOF

#define MOLFILE_EOF   -1

end of file

◆ MOLFILE_ERROR

#define MOLFILE_ERROR   -1

error reading/opening a file

◆ MOLFILE_INSERTION

#define MOLFILE_INSERTION   0x0001

insertion codes provided

◆ MOLFILE_MASS

#define MOLFILE_MASS   0x0008

Atomic mass provided

◆ MOLFILE_MAXWAVEPERTS

#define MOLFILE_MAXWAVEPERTS   25

maximum number of wavefunctions per timestep

◆ MOLFILE_NOOPTIONS

#define MOLFILE_NOOPTIONS   0x0000

Plugin optional data field availability flag.

no optional data

◆ MOLFILE_NOSTRUCTUREDATA

#define MOLFILE_NOSTRUCTUREDATA   -2

no structure data in this file

◆ MOLFILE_NUMATOMS_NONE

#define MOLFILE_NUMATOMS_NONE   0

no atoms in this file type

◆ MOLFILE_NUMATOMS_UNKNOWN

#define MOLFILE_NUMATOMS_UNKNOWN   -1

unknown number of atoms

◆ MOLFILE_OCCUPANCY

#define MOLFILE_OCCUPANCY   0x0002

occupancy data provided

◆ MOLFILE_PLUGIN_TYPE

#define MOLFILE_PLUGIN_TYPE   "mol file reader"

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

◆ MOLFILE_QMSTATUS_FILE_TRUNCATED

#define MOLFILE_QMSTATUS_FILE_TRUNCATED   3 /* file was truncated */

◆ MOLFILE_QMSTATUS_OPT_CONV

#define MOLFILE_QMSTATUS_OPT_CONV   0 /* optimization converged */

◆ MOLFILE_QMSTATUS_OPT_NOT_CONV

#define MOLFILE_QMSTATUS_OPT_NOT_CONV   2 /* optimization not converged */

◆ MOLFILE_QMSTATUS_SCF_NOT_CONV

#define MOLFILE_QMSTATUS_SCF_NOT_CONV   1 /* SCF convergence failed */

◆ MOLFILE_QMSTATUS_UNKNOWN

#define MOLFILE_QMSTATUS_UNKNOWN   -1 /* don't know yet */

◆ MOLFILE_QMTS_GRADIENT

#define MOLFILE_QMTS_GRADIENT   0x0001

energy gradients provided

◆ MOLFILE_QMTS_NOOPTIONS

#define MOLFILE_QMTS_NOOPTIONS   0x0000

Flags indicating availability of optional data fields for QM timesteps.

no optional data

◆ MOLFILE_QMTS_SCFITER

#define MOLFILE_QMTS_SCFITER   0x0002

◆ MOLFILE_RADIUS

#define MOLFILE_RADIUS   0x0020

Atomic VDW radius provided

◆ MOLFILE_RUNTYPE_DYNAMICS

#define MOLFILE_RUNTYPE_DYNAMICS
Value:
8 /* Any type of molecular dynamics
* e.g. Born-Oppenheimer, Car-Parinello,
* or classical MD */

◆ MOLFILE_RUNTYPE_ENERGY

#define MOLFILE_RUNTYPE_ENERGY   1 /* single point run */

◆ MOLFILE_RUNTYPE_GRADIENT

#define MOLFILE_RUNTYPE_GRADIENT   6 /* energy gradient calculation */

◆ MOLFILE_RUNTYPE_HESSIAN

#define MOLFILE_RUNTYPE_HESSIAN   4 /* Hessian/frequency calculation */

◆ MOLFILE_RUNTYPE_MEX

#define MOLFILE_RUNTYPE_MEX   7 /* minimum energy crossing */

◆ MOLFILE_RUNTYPE_OPTIMIZE

#define MOLFILE_RUNTYPE_OPTIMIZE   2 /* geometry optimization */

◆ MOLFILE_RUNTYPE_PROPERTIES

#define MOLFILE_RUNTYPE_PROPERTIES
Value:
9 /* Properties were calculated from a
* wavefunction that was read from file */

◆ MOLFILE_RUNTYPE_SADPOINT

#define MOLFILE_RUNTYPE_SADPOINT   3 /* saddle point search */

◆ MOLFILE_RUNTYPE_SURFACE

#define MOLFILE_RUNTYPE_SURFACE   5 /* potential surface scan */

◆ MOLFILE_RUNTYPE_UNKNOWN

#define MOLFILE_RUNTYPE_UNKNOWN   0 /* single point run */

◆ MOLFILE_SCFTYPE_FF

#define MOLFILE_SCFTYPE_FF   6 /* classical force-field based sim. */

◆ MOLFILE_SCFTYPE_GVB

#define MOLFILE_SCFTYPE_GVB   4 /* generalized valence bond orbitals */

◆ MOLFILE_SCFTYPE_MCSCF

#define MOLFILE_SCFTYPE_MCSCF   5 /* multi-configuration SCF */

◆ MOLFILE_SCFTYPE_NONE

#define MOLFILE_SCFTYPE_NONE   0 /* calculation didn't make use of SCF */

◆ MOLFILE_SCFTYPE_RHF

#define MOLFILE_SCFTYPE_RHF   1 /* restricted Hartree-Fock */

◆ MOLFILE_SCFTYPE_ROHF

#define MOLFILE_SCFTYPE_ROHF   3 /* restricted open-shell Hartree-Fock */

◆ MOLFILE_SCFTYPE_UHF

#define MOLFILE_SCFTYPE_UHF   2 /* unrestricted Hartree-Fock */

◆ MOLFILE_SCFTYPE_UNKNOWN

#define MOLFILE_SCFTYPE_UNKNOWN   -1 /* no info about the method */

◆ MOLFILE_SUCCESS

#define MOLFILE_SUCCESS   0

succeeded in reading file