#include <Molecule.h>
Inheritance diagram for Molecule:
Public Methods | |
Molecule (const char *, VMDApp *, Displayable *) | |
constructor ... nothing much to do, just save the source, and pass on the other data. Pass the VMDApp and parent Displayable on to DrawMolecule. More... | |
virtual | ~Molecule (void) |
destructor ... just clear out unread files. More... | |
int | rename (const char *newname) |
rename the molecule, as shown in the GUI and as accessed by text commands. More... | |
int | num_files () const |
Return the number of file components that make up the loaded molecule. More... | |
const char * | get_type (int i) const |
Return the file type of the indexed molecule file component. More... | |
const char * | get_file (int i) const |
Return the file name of the indexed molecule file component. More... | |
const char * | get_file_specs (int i) const |
Return the file loading specs of the indexed molecule file component. More... | |
const char * | get_database (int i) const |
Return the source database of the indexed molecule file component. More... | |
const char * | get_accession (int i) const |
Return the database accession code of the indexed molecule file component. More... | |
const char * | get_remarks (int i) const |
Return the text comments for the indexed molecule file component. More... | |
void | record_file (const char *filename, const char *filetype, const char *filespecs) |
Record the file component's name, type, and loading specs in the molecule. More... | |
void | record_database (const char *dbname, const char *dbcode) |
Record the file component's source database and accession code in the molecule. More... | |
void | record_remarks (const char *remarks) |
Record the file component's text comments in the molecule. More... | |
void | add_coor_file (CoorData *) |
add a CoorFile object to the file I/O queue. Molecule will read/write frames until the CoorFileData object says its finished. Then Molecule will delete it. More... | |
void | close_coor_file (CoorData *) |
Complete/close a CoorFile object. Molecule will signal any necessary callbacks etc. More... | |
int | get_new_frames () |
Check for new trajectory frames in I/O queue and IMD. More... | |
int | next_frame () |
Read the next frame in the file I/O queue. Return true if any frames were read; otherwise return false. More... | |
int | cancel () |
cancel loading/saving of all coordinate files return number of files canceled. More... | |
int | file_in_progress () |
return true if file I/O is in progress. More... | |
virtual void | prepare () |
prepare for drawing ... do any updates needed right before draw. This possibly reads a new timestep, if requested. More... | |
void | addForce (int theatom, const float *f) |
add a force "f" to atom index "theatom" for this display loop only. More... | |
void | addPersistentForce (int theatom, const float *f) |
add a persistent force to the given atom; this will stay until cleared (by making the force zero). This force will be added to any other forces coming from addForce. More... |
Definition at line 37 of file Molecule.h.
|
constructor ... nothing much to do, just save the source, and pass on the other data. Pass the VMDApp and parent Displayable on to DrawMolecule.
Definition at line 39 of file Molecule.C. References breakup_filename, BaseMolecule::moleculename, NULL, and stringdup. |
|
destructor ... just clear out unread files.
Definition at line 53 of file Molecule.C. References DrawMolecule::app, BaseMolecule::id, VMDApp::imd_disconnect, BaseMolecule::moleculename, ResizeArray< char * >::num, ResizeArray< CoorData * >::num, and ResizeArray< CoorData * >::remove. |
|
add a CoorFile object to the file I/O queue. Molecule will read/write frames until the CoorFileData object says its finished. Then Molecule will delete it.
Definition at line 95 of file Molecule.C. References ResizeArray< CoorData * >::append, and data. Referenced by VMDApp::molecule_load, and VMDApp::molecule_savetrajectory. |
|
add a force "f" to atom index "theatom" for this display loop only.
Definition at line 250 of file Molecule.C. References ResizeArray< int >::append, and ResizeArray< float >::append3. Referenced by GeometrySpring::prepare, and Tool::tug. |
|
add a persistent force to the given atom; this will stay until cleared (by making the force zero). This force will be added to any other forces coming from addForce.
Definition at line 255 of file Molecule.C. References ResizeArray< int >::append, ResizeArray< float >::append3, ResizeArray< int >::find, ResizeArray< float >::remove, ResizeArray< int >::remove, and Displayable::reset_disp_list. |
|
cancel loading/saving of all coordinate files return number of files canceled.
Definition at line 113 of file Molecule.C. References ResizeArray< CoorData * >::num, and ResizeArray< CoorData * >::remove. Referenced by VMDApp::molecule_cancel_io. |
|
Complete/close a CoorFile object. Molecule will signal any necessary callbacks etc.
Definition at line 99 of file Molecule.C. References DrawMolecule::app, CommandQueue::append, VMDApp::commandQueue, data, BaseMolecule::id, and CoorData::name. Referenced by VMDApp::molecule_savetrajectory, and next_frame. |
|
return true if file I/O is in progress.
Definition at line 139 of file Molecule.h. References ResizeArray< CoorData * >::num. Referenced by DrawMolItem::prepare. |
|
Return the database accession code of the indexed molecule file component.
Definition at line 88 of file Molecule.h. References NULL, and ResizeArray::num. Referenced by molinfo_get, and py_get_accessions. |
|
Return the source database of the indexed molecule file component.
Definition at line 82 of file Molecule.h. References NULL, and ResizeArray::num. Referenced by molinfo_get, and py_get_databases. |
|
Return the file name of the indexed molecule file component.
Definition at line 70 of file Molecule.h. References NULL, and ResizeArray::num. Referenced by molinfo_get, and py_get_filenames. |
|
Return the file loading specs of the indexed molecule file component.
Definition at line 76 of file Molecule.h. References NULL, and ResizeArray::num. Referenced by molinfo_get. |
|
Check for new trajectory frames in I/O queue and IMD.
Definition at line 125 of file Molecule.C. References DrawMolecule::app, ResizeArray::append, ResizeArray::append3, ResizeArray< float >::appendlist, ResizeArray< int >::appendlist, VMDApp::background_processing_set, ResizeArray< float >::clear, ResizeArray< int >::clear, DrawMolecule::current, Timestep::force, BaseMolecule::id, VMDApp::imd_connected, VMDApp::imd_sendforces, BaseMolecule::nAtoms, next_frame, ResizeArray::num, ResizeArray< float >::num, and ResizeArray< int >::num. Referenced by prepare, and VMDApp::VMDupdate. |
|
Return the text comments for the indexed molecule file component.
Definition at line 94 of file Molecule.h. References NULL, and ResizeArray::num. Referenced by molinfo_get, and py_get_remarks. |
|
Return the file type of the indexed molecule file component.
Definition at line 64 of file Molecule.h. References NULL, and ResizeArray::num. Referenced by molinfo_get, and py_get_filetypes. |
|
Read the next frame in the file I/O queue. Return true if any frames were read; otherwise return false.
Definition at line 221 of file Molecule.C. References close_coor_file, CoorData::CoorDataState, CoorData::DONE, CoorData::NOTDONE, ResizeArray< CoorData * >::num, ResizeArray< CoorData * >::remove, and state. Referenced by get_new_frames, and VMDApp::molecule_load. |
|
Return the number of file components that make up the loaded molecule.
Definition at line 61 of file Molecule.h. References ResizeArray::num. Referenced by molinfo_get, py_get_accessions, py_get_databases, py_get_filenames, py_get_filetypes, and py_get_remarks. |
|
prepare for drawing ... do any updates needed right before draw. This possibly reads a new timestep, if requested.
Reimplemented from DrawMolecule. Definition at line 245 of file Molecule.C. References get_new_frames, and DrawMolecule::prepare. |
|
Record the file component's source database and accession code in the molecule.
Definition at line 108 of file Molecule.h. References ResizeArray::append, and stringdup. Referenced by VMDApp::molecule_load, and MolFilePlugin::read_metadata. |
|
Record the file component's name, type, and loading specs in the molecule.
Definition at line 100 of file Molecule.h. References ResizeArray::append, and stringdup. Referenced by VMDApp::molecule_load. |
|
Record the file component's text comments in the molecule.
Definition at line 114 of file Molecule.h. References ResizeArray::append, and stringdup. Referenced by VMDApp::molecule_load, and MolFilePlugin::read_metadata. |
|
rename the molecule, as shown in the GUI and as accessed by text commands.
Definition at line 89 of file Molecule.C. References BaseMolecule::moleculename, and stringdup. Referenced by VMDApp::molecule_from_selection_list, VMDApp::molecule_new, and VMDApp::molecule_rename. |