Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

MolFilePlugin Class Reference

VMD interface to 'molfile' plugins. Molfile plugins read coordinate files, structure files, volumetric data, and graphics data. The data is loaded into a new or potentially preexisting molecule in VMD. More...

#include <MolFilePlugin.h>

List of all members.

Public Methods

 MolFilePlugin (vmdplugin_t *p)
virtual ~MolFilePlugin ()
const char * name () const
const char * prettyname () const
const char * extension () const
int can_read_structure () const
int can_read_bonds () const
int can_read_timesteps () const
int can_read_graphics () const
int can_read_volumetric () const
int can_read_metadata () const
int can_write_structure () const
int can_write_bonds () const
int can_write_timesteps () const
int init_read (const char *file)
 open file for reading; read natoms. Return 0 on success. More...

int natoms () const
 Number of atoms in each timestep -1 if unknown (not in file). More...

void set_natoms (int)
 override the number of atoms in each step; this is needed for CRD files :-(. More...

int read_structure (Molecule *m, int filebonds, int autobonds)
 init mol, file bond determination auto bond determination return 0 on success. More...

int read_optional_structure (Molecule *m, int filebonds)
 Read optional structure information into the molecule, but without initializing atoms. Sets all optional fields like radius and charge, as well as bonds, but only if the file explicitly contains it. If bonds are found then the molecular topology is recalculated as well. More...

Timestepnext (Molecule *m)
 next timestep. More...

int skip (Molecule *m)
 skip over a step; return 0 on success. More...

int read_rawgraphics (Molecule *, Scene *)
 Read raw graphics data into the given molecule. More...

int read_volumetric (Molecule *, int nsets, const int *setids)
 Read selected volumetric datasets into molecule. Return 0 on success. If nsets == -1 then all sets will be read. More...

int read_metadata (Molecule *)
 Read file metadata into molecule. Return 0 on success. More...

int init_write (const char *file, int natoms)
int write_structure (Molecule *, const int *sel)
 if can_write_structure returns true, then write_structure must be called before the first invocation of write_timestep. If sel is non-NULL, it must point to an array of indices, one for each atom in Molecule or Timestep, indicating which atoms are to be written to the file. More...

int write_timestep (const Timestep *, const int *sel)


Detailed Description

VMD interface to 'molfile' plugins. Molfile plugins read coordinate files, structure files, volumetric data, and graphics data. The data is loaded into a new or potentially preexisting molecule in VMD.

Definition at line 42 of file MolFilePlugin.h.


Constructor & Destructor Documentation

MolFilePlugin::MolFilePlugin vmdplugin_t *    p
 

Definition at line 54 of file MolFilePlugin.C.

References NULL.

MolFilePlugin::~MolFilePlugin   [virtual]
 

Definition at line 69 of file MolFilePlugin.C.


Member Function Documentation

int MolFilePlugin::can_read_bonds   const [inline]
 

Definition at line 62 of file MolFilePlugin.h.

References NULL.

Referenced by read_optional_structure, and read_structure.

int MolFilePlugin::can_read_graphics   const [inline]
 

Definition at line 64 of file MolFilePlugin.h.

References NULL.

Referenced by init_read, VMDApp::molecule_load, and read_rawgraphics.

int MolFilePlugin::can_read_metadata   const [inline]
 

Definition at line 66 of file MolFilePlugin.h.

References NULL.

Referenced by init_read, and VMDApp::molecule_load.

int MolFilePlugin::can_read_structure   const [inline]
 

Definition at line 61 of file MolFilePlugin.h.

References NULL.

Referenced by init_read, VMDApp::molecule_load, read_optional_structure, and read_structure.

int MolFilePlugin::can_read_timesteps   const [inline]
 

Definition at line 63 of file MolFilePlugin.h.

References NULL.

Referenced by init_read, VMDApp::molecule_load, next, and skip.

int MolFilePlugin::can_read_volumetric   const [inline]
 

Definition at line 65 of file MolFilePlugin.h.

References NULL.

Referenced by init_read, and VMDApp::molecule_load.

int MolFilePlugin::can_write_bonds   const [inline]
 

Definition at line 81 of file MolFilePlugin.h.

References NULL.

Referenced by write_structure.

int MolFilePlugin::can_write_structure   const [inline]
 

Definition at line 80 of file MolFilePlugin.h.

References NULL.

Referenced by CoorPluginData::CoorPluginData, init_write, and write_structure.

int MolFilePlugin::can_write_timesteps   const [inline]
 

Definition at line 82 of file MolFilePlugin.h.

References NULL.

Referenced by SaveTrajectoryFltkMenu::act_on_command, init_write, and write_timestep.

const char* MolFilePlugin::extension   const [inline]
 

Definition at line 59 of file MolFilePlugin.h.

Referenced by SaveTrajectoryFltkMenu::act_on_command, and VMDApp::guess_filetype.

int MolFilePlugin::init_read const char *    file
 

open file for reading; read natoms. Return 0 on success.

Definition at line 687 of file MolFilePlugin.C.

References can_read_graphics, can_read_metadata, can_read_structure, can_read_timesteps, can_read_volumetric, NULL, and stringdup.

Referenced by VMDApp::molecule_load.

int MolFilePlugin::init_write const char *    file,
int    natoms
 

Definition at line 969 of file MolFilePlugin.C.

References can_write_structure, can_write_timesteps, natoms, NULL, and stringdup.

Referenced by VMDApp::molecule_savetrajectory.

const char* MolFilePlugin::name void    const [inline]
 

Definition at line 57 of file MolFilePlugin.h.

Referenced by SaveTrajectoryFltkMenu::act_on_command, VMDApp::guess_filetype, and write_structure.

int MolFilePlugin::natoms   const [inline]
 

Number of atoms in each timestep -1 if unknown (not in file).

Definition at line 93 of file MolFilePlugin.h.

Referenced by CoorPluginData::CoorPluginData, init_write, and VMDApp::molecule_load.

Timestep * MolFilePlugin::next Molecule   m
 

next timestep.

Definition at line 699 of file MolFilePlugin.C.

References Timestep::a_length, QMTimestep::add_wavefunction, Timestep::alpha, Timestep::b_length, Timestep::beta, Timestep::c_length, can_read_timesteps, Timestep::gamma, DrawMolecule::get_frame, NULL, DrawMolecule::numframes, Timestep::physical_time, Timestep::pos, Timestep::qm_timestep, QMCHARGE_ESP, QMCHARGE_LOWDIN, QMCHARGE_MULLIKEN, QMCHARGE_NPA, QMCHARGE_UNKNOWN, QMTimestep::set_charges, QMTimestep::set_gradients, QMTimestep::set_scfenergies, QMTimestep::sort_orbitals, Timestep::vel, WAVE_BOYS, WAVE_CANON, WAVE_CINATUR, WAVE_GEMINAL, WAVE_MCSCFNAT, WAVE_MCSCFOPT, WAVE_PIPEK, WAVE_RUEDEN, and WAVE_UNKNOWN.

Referenced by CoorPluginData::next.

const char* MolFilePlugin::prettyname   const [inline]
 

Definition at line 58 of file MolFilePlugin.h.

int MolFilePlugin::read_metadata Molecule  
 

Read file metadata into molecule. Return 0 on success.

Definition at line 1597 of file MolFilePlugin.C.

References NULL, Molecule::record_database, and Molecule::record_remarks.

Referenced by VMDApp::molecule_load.

int MolFilePlugin::read_optional_structure Molecule   m,
int    filebonds
 

Read optional structure information into the molecule, but without initializing atoms. Sets all optional fields like radius and charge, as well as bonds, but only if the file explicitly contains it. If bonds are found then the molecular topology is recalculated as well.

Definition at line 396 of file MolFilePlugin.C.

References BaseMolecule::add_angle, BaseMolecule::add_bond, BaseMolecule::add_cterm, BaseMolecule::add_dihedral, BaseMolecule::add_improper, NameList< int >::add_name, BaseMolecule::analyze, BaseMolecule::ANGLES, BaseMolecule::angleTypeNames, BaseMolecule::ANGLETYPES, BaseMolecule::atom, MolAtom::atomicnumber, BaseMolecule::ATOMICNUMBER, BaseMolecule::beta, BaseMolecule::BFACTOR, BaseMolecule::BONDORDERS, BaseMolecule::BONDS, MolAtom::bonds, BaseMolecule::bondTypeNames, BaseMolecule::BONDTYPES, can_read_bonds, can_read_structure, BaseMolecule::charge, BaseMolecule::CHARGE, BaseMolecule::clear_angles, BaseMolecule::clear_dihedrals, BaseMolecule::clear_impropers, DrawMolItem::COL_REGEN, BaseMolecule::CTERMS, BaseMolecule::dihedralTypeNames, DrawMolecule::force_recalc, BaseMolecule::improperTypeNames, DrawMolecule::invalidate_ss, BaseMolecule::mass, BaseMolecule::MASS, BaseMolecule::nAtoms, NULL, BaseMolecule::occupancy, BaseMolecule::OCCUPANCY, BaseMolecule::radius, BaseMolecule::RADIUS, DrawMolItem::SEL_REGEN, BaseMolecule::set_dataset_flag, BaseMolecule::set_radii_changed, and NameList< int >::typecode.

Referenced by VMDApp::molecule_load.

int MolFilePlugin::read_rawgraphics Molecule  ,
Scene  
 

Read raw graphics data into the given molecule.

Definition at line 1421 of file MolFilePlugin.C.

References MoleculeGraphics::add_cone, MoleculeGraphics::add_cylinder, MoleculeGraphics::add_line, MoleculeGraphics::add_point, MoleculeGraphics::add_sphere, MoleculeGraphics::add_text, MoleculeGraphics::add_triangle, MoleculeGraphics::add_tricolor, MoleculeGraphics::add_trinorm, can_read_graphics, data, DrawMolecule::moleculeGraphics, Scene::nearest_index, NULL, and MoleculeGraphics::use_color.

Referenced by VMDApp::molecule_load.

int MolFilePlugin::read_structure Molecule   m,
int    filebonds,
int    autobonds
 

init mol, file bond determination auto bond determination return 0 on success.

Definition at line 74 of file MolFilePlugin.C.

References BaseMolecule::add_angle, BaseMolecule::add_atom, BaseMolecule::add_bond, BaseMolecule::add_bond_dupcheck, BaseMolecule::add_cterm, BaseMolecule::add_dihedral, BaseMolecule::add_improper, NameList< int >::add_name, BaseMolecule::ALTLOC, BaseMolecule::ANGLES, BaseMolecule::angleTypeNames, BaseMolecule::ANGLETYPES, BaseMolecule::ATOMICNUMBER, BaseMolecule::beta, BaseMolecule::BFACTOR, BaseMolecule::BONDORDERS, BaseMolecule::BONDS, BaseMolecule::bondTypeNames, BaseMolecule::BONDTYPES, can_read_bonds, can_read_structure, BaseMolecule::CHARGE, BaseMolecule::charge, BaseMolecule::clear_angles, BaseMolecule::clear_dihedrals, BaseMolecule::clear_impropers, BaseMolecule::CTERMS, BaseMolecule::default_beta, BaseMolecule::default_charge, BaseMolecule::default_mass, BaseMolecule::default_occup, BaseMolecule::default_radius, BaseMolecule::dihedralTypeNames, BaseMolecule::find_bonds_from_timestep, BaseMolecule::find_unique_bonds_from_timestep, get_pte_mass, get_pte_vdw_radius, BaseMolecule::improperTypeNames, BaseMolecule::init_atoms, BaseMolecule::INSERTION, BaseMolecule::MASS, BaseMolecule::mass, NULL, BaseMolecule::OCCUPANCY, BaseMolecule::occupancy, BaseMolecule::RADIUS, BaseMolecule::radius, BaseMolecule::set_dataset_flag, BaseMolecule::set_radii_changed, and NameList< int >::typecode.

Referenced by VMDApp::molecule_load.

int MolFilePlugin::read_volumetric Molecule  ,
int    nsets,
const int *    setids
 

Read selected volumetric datasets into molecule. Return 0 on success. If nsets == -1 then all sets will be read.

Definition at line 1516 of file MolFilePlugin.C.

References BaseMolecule::add_volume_data, NULL, and stringdup.

Referenced by VMDApp::molecule_load.

void MolFilePlugin::set_natoms int   
 

override the number of atoms in each step; this is needed for CRD files :-(.

Definition at line 683 of file MolFilePlugin.C.

Referenced by CoorPluginData::CoorPluginData.

int MolFilePlugin::skip Molecule   m
 

skip over a step; return 0 on success.

Definition at line 949 of file MolFilePlugin.C.

References can_read_timesteps.

Referenced by CoorPluginData::next.

int MolFilePlugin::write_structure Molecule  ,
const int *    sel
 

if can_write_structure returns true, then write_structure must be called before the first invocation of write_timestep. If sel is non-NULL, it must point to an array of indices, one for each atom in Molecule or Timestep, indicating which atoms are to be written to the file.

Definition at line 991 of file MolFilePlugin.C.

References BaseMolecule::ALTLOC, MolAtom::altlocindex, BaseMolecule::altlocNames, BaseMolecule::angles, BaseMolecule::ANGLES, BaseMolecule::angleTypeNames, BaseMolecule::ANGLETYPES, ResizeArray::append, BaseMolecule::atom, BaseMolecule::ATOMICNUMBER, MolAtom::atomicnumber, BaseMolecule::atomNames, BaseMolecule::atomTypes, BaseMolecule::beta, BaseMolecule::BFACTOR, BaseMolecule::BONDORDERS, MolAtom::bonds, BaseMolecule::BONDS, MolAtom::bondTo, BaseMolecule::bondTypeNames, BaseMolecule::BONDTYPES, can_write_bonds, can_write_structure, MolAtom::chainindex, BaseMolecule::chainNames, BaseMolecule::CHARGE, BaseMolecule::charge, BaseMolecule::cterms, BaseMolecule::CTERMS, BaseMolecule::dihedrals, BaseMolecule::dihedralTypeNames, BaseMolecule::get_angletype, BaseMolecule::get_dihedraltype, BaseMolecule::get_impropertype, BaseMolecule::getbondorder, BaseMolecule::getbondtype, BaseMolecule::has_structure, BaseMolecule::impropers, BaseMolecule::improperTypeNames, BaseMolecule::INSERTION, MolAtom::insertionstr, BaseMolecule::MASS, BaseMolecule::mass, NameList< int >::name, name, MolAtom::nameindex, BaseMolecule::nAtoms, NULL, ResizeArray::num, NameList< int >::num, BaseMolecule::num_angles, BaseMolecule::num_cterms, BaseMolecule::num_dihedrals, BaseMolecule::num_impropers, BaseMolecule::OCCUPANCY, BaseMolecule::occupancy, BaseMolecule::RADIUS, BaseMolecule::radius, MolAtom::resid, MolAtom::resnameindex, BaseMolecule::resNames, MolAtom::segnameindex, BaseMolecule::segNames, BaseMolecule::test_dataset_flag, and MolAtom::typeindex.

Referenced by CoorPluginData::CoorPluginData.

int MolFilePlugin::write_timestep const Timestep  ,
const int *    sel
 

Definition at line 1357 of file MolFilePlugin.C.

References Timestep::a_length, Timestep::alpha, Timestep::b_length, Timestep::beta, Timestep::c_length, can_write_timesteps, Timestep::gamma, NULL, Timestep::num, Timestep::physical_time, Timestep::pos, and Timestep::vel.

Referenced by CoorPluginData::next.


The documentation for this class was generated from the following files:
Generated on Mon May 20 01:47:08 2013 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002