#include <stdlib.h>
#include <stdio.h>
#include <tcl.h>
#include "TclCommands.h"
#include "AtomSel.h"
#include "VMDApp.h"
#include "MoleculeList.h"
#include "utilities.h"
#include "config.h"
#include "Atom.h"
#include "Molecule.h"
#include "Measure.h"
#include "FastPBC.h"
Go to the source code of this file.
Functions | |
int | compoundmapper (int compound, Molecule *mol, AtomSel *sel, int *&indexlist, int *&fragmentmap) |
int | check_timesteps (Tcl_Interp *interp, Molecule *mol, int first, int last) |
int | fpbc_wrap (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp) |
int | fpbc_unwrap (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp) |
int | fpbc_join (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp) |
int | fpbc_recenter (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp) |
int | obj_fastpbc (ClientData cd, Tcl_Interp *interp, int argc, Tcl_Obj *const objv[]) |
|
Definition at line 98 of file TclFastPBC.C. References Timestep::a_length, Timestep::alpha, Timestep::b_length, Timestep::beta, Timestep::c_length, Timestep::gamma, DrawMolecule::get_frame, NULL, and DrawMolecule::numframes. Referenced by fpbc_join, fpbc_recenter, fpbc_unwrap, and fpbc_wrap. |
|
Definition at line 40 of file TclFastPBC.C. References Residue::atoms, BaseMolecule::fragment, BaseMolecule::nFragments, BaseMolecule::nResidues, ResizeArray< int >::num, AtomSel::on, BaseMolecule::residue, Fragment::residues, and AtomSel::selected. Referenced by fpbc_join, fpbc_recenter, and fpbc_wrap. |
|
Join molecules/residues that were splitted due to PBC wrapping ## User Usage join <atom selection> [first <first frame ID>] [last <last frame ID>] [compound residue/fragment] ### User Options | Keyword | Type | Value | -------------------- |:------: | --------------------------------------------------------------| | <**atom selection**> | object | An atom selection object created VMD **atomselect** command. | | **first** | int | The staring frame ID | | **last** | int | The last frame ID | Definition at line 411 of file TclFastPBC.C. References check_timesteps, compoundmapper, DrawMolecule::force_recalc, fpbc_exec_join, fpbc_exec_join_cpu, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::moleculeList, AtomSel::molid, NULL, DrawMolecule::numframes, AtomSel::selected, strupncmp, and tcl_commands_get_sel. Referenced by obj_fastpbc. |
|
Definition at line 486 of file TclFastPBC.C. References check_timesteps, compoundmapper, AtomSel::firstsel, DrawMolecule::force_recalc, fpbc_exec_recenter, fpbc_exec_recenter_cpu, AtomSel::lastsel, BaseMolecule::mass, measure_error, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::moleculeList, AtomSel::molid, NULL, DrawMolecule::numframes, AtomSel::on, AtomSel::selected, strupncmp, tcl_commands_get_sel, and tcl_get_weights. Referenced by obj_fastpbc. |
|
**Unwrap the molecule coordinates such that there are no jumps in the trajectory**. ## User Usage
unwrap <atom selection> [first <first frame ID>] [last <last frame ID>]
### User Options | Keyword | Type | Value | -------------------- |:------: | --------------------------------------------------------------| | <**atom selection**> | object | An atom selection object created VMD **atomselect** command. | | **first** | int | The staring frame ID | | **last** | int | The last frame ID | | **compound** | string | Either "residue" or "fragment".
Definition at line 326 of file TclFastPBC.C. References check_timesteps, AtomSel::firstsel, DrawMolecule::force_recalc, fpbc_exec_unwrap, fpbc_exec_unwrap_cpu, AtomSel::lastsel, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::moleculeList, AtomSel::molid, NULL, DrawMolecule::numframes, AtomSel::on, AtomSel::selected, strupncmp, and tcl_commands_get_sel. Referenced by obj_fastpbc. |
|
**Wrap all the molecule within the unit cell**. ## User Usage
fpbc wrap <atom selection> [first <first frame ID>] [last <last frame ID>] [center [list x y z]] [centersel <atom selection>] [compound "residue"/"fragment"]
### User Options | Keyword | Type | Value | -------------------- |:------: | --------------------------------------------------------------| | <**atom selection**> | object | An atom selection object created VMD **atomselect** command. | | **first** | int | The staring frame ID | | **last** | int | The last frame ID | | **center** | list of float| The 3D coordinate of the point around which everything is wrapped.| | **centersel** | object | An atom selection object created VMD **atomselect** command.
Definition at line 152 of file TclFastPBC.C. References check_timesteps, compoundmapper, AtomSel::firstsel, DrawMolecule::force_recalc, fpbc_exec_wrapatomic, fpbc_exec_wrapatomic_cpu, fpbc_exec_wrapcompound, fpbc_exec_wrapcompound_cpu, AtomSel::lastsel, BaseMolecule::mass, measure_error, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::moleculeList, AtomSel::molid, NULL, DrawMolecule::numframes, AtomSel::on, AtomSel::selected, strupncmp, tcl_commands_get_sel, and tcl_get_weights. Referenced by obj_fastpbc. |
|
The interface between user and Fast PBC module (works as a controller) Function obj_fastpbc() trys to find the content of the first user argument given to fpbc (i.e. objv[0]) and decide which sub-function to call e.g. "wrap", "unwrap", "join". ## Implementation Call VMD's function **strupncmp()** (case-insensitive string comparison) to find which sub-function the user want to call. Definition at line 614 of file TclFastPBC.C. References fpbc_join, fpbc_recenter, fpbc_unwrap, fpbc_wrap, NULL, and strupncmp. |