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

TclVoltool.C File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include "Inform.h"
#include "utilities.h"
#include "AtomSel.h"
#include "VMDApp.h"
#include "MoleculeList.h"
#include "VolumetricData.h"
#include "VolMapCreate.h"
#include "PluginMgr.h"
#include "MolFilePlugin.h"
#include "CUDAMDFF.h"
#include "MDFF.h"
#include "TclMDFF.h"
#include <math.h>
#include <tcl.h>
#include "TclCommands.h"
#include "Measure.h"
#include "Voltool.h"
#include <iostream>
#include <string>
#include <sstream>

Go to the source code of this file.

Functions

void moveby (AtomSel *sel, float *vect, MoleculeList *mlist, float *framepos)
void move (AtomSel *sel, Matrix4 mat, MoleculeList *mlist, float *framepos)
double density_calc_cc (VolumetricData *volmapA, VolumetricData *volmapB, double thresholddensity)
double calc_cc (AtomSel *sel, VolumetricData *volmapA, float resolution, MoleculeList *mlist, float *framepos)
void do_rotate (int stride, float *com, AtomSel *sel, int amt, float *axis, MoleculeList *mlist, float *framepos)
void do_density_rotate (int stride, int amt, float *axis, VolumetricData *synthvol)
void rotate (int stride, int max_rot, float *com, float *returncc, float *bestpos, AtomSel *sel, MoleculeList *mlist, VolumetricData *volmapA, float resolution, float *origin, float *framepos)
void density_rotate (int stride, int max_rot, float *com, float *returncc, int *bestrot, VolumetricData *volmapA, VolumetricData *synthvol, float resolution, double *origin, double *dx, double *dy, double *dz)
void reset_density (int stride, int *bestrot, VolumetricData *synthvol, float *synthcom, float *framepos, float *com, AtomSel *sel, MoleculeList *mlist)
void reset_origin (float *origin, float *newpos, AtomSel *sel)
int density_com (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_move (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_moveto (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int fit (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int mask (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_trim (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_crop (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_clamp (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_smult (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_smooth (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_sadd (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_range (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_downsample (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_supersample (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_sigma (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_mdff_potential (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_histogram (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_info (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_binmask (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_add (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_subtract (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_multiply (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_average (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_correlate (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int density_save (VMDApp *app, int argc, Tcl_Obj *const objv[], Tcl_Interp *interp)
int obj_voltool (ClientData cd, Tcl_Interp *interp, int argc, Tcl_Obj *const objv[])


Function Documentation

double calc_cc AtomSel   sel,
VolumetricData   volmapA,
float    resolution,
MoleculeList   mlist,
float *    framepos
 

Definition at line 73 of file TclVoltool.C.

References QuickSurf::calc_density_map, cc, cc_threaded, MoleculeList::mol_from_id, AtomSel::molid, NULL, BaseMolecule::radius, vmd_cuda_compare_sel_refmap, volmap, and volmapA.

Referenced by gaussdensity_cc, and rotate.

int density_add VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 2667 of file TclVoltool.C.

References add, VMDApp::guess_filetype, init_new_volume, init_new_volume_molecule, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, newvol, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_average VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 3196 of file TclVoltool.C.

References average, VMDApp::guess_filetype, init_new_volume, init_new_volume_molecule, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, newvol, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_binmask VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 2555 of file TclVoltool.C.

References VolumetricData::binmask, DrawMolecule::force_recalc, VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, threshold, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

double density_calc_cc VolumetricData   volmapA,
VolumetricData   volmapB,
double    thresholddensity
 

Definition at line 66 of file TclVoltool.C.

References cc, cc_threaded, and volmapA.

Referenced by density_rotate.

int density_clamp VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 1284 of file TclVoltool.C.

References VolumetricData::clamp, DrawMolecule::force_recalc, VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_com VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 320 of file TclVoltool.C.

References VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, NULL, vol_com, volmapA, FileSpec::WAIT_BACK, and FileSpec::waitfor.

Referenced by obj_voltool.

int density_correlate VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 3372 of file TclVoltool.C.

References cc_threaded, VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, FileSpec::WAIT_BACK, and FileSpec::waitfor.

Referenced by obj_voltool.

int density_crop VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 1163 of file TclVoltool.C.

References VolumetricData::crop, DrawMolecule::force_recalc, VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_downsample VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 1851 of file TclVoltool.C.

References VolumetricData::downsample, DrawMolecule::force_recalc, VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_histogram VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 2254 of file TclVoltool.C.

References VMDApp::guess_filetype, histogram, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, FileSpec::WAIT_BACK, and FileSpec::waitfor.

Referenced by obj_voltool.

int density_info VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 2359 of file TclVoltool.C.

References VolumetricData::cell_axes, VolumetricData::cell_volume, VolumetricData::datarange, VMDApp::guess_filetype, VolumetricData::integral, VolumetricData::mean, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, VolumetricData::origin, VolumetricData::sigma, FileSpec::WAIT_BACK, FileSpec::waitfor, VolumetricData::xsize, VolumetricData::ysize, and VolumetricData::zsize.

Referenced by obj_voltool.

int density_mdff_potential VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 2145 of file TclVoltool.C.

References DrawMolecule::force_recalc, VMDApp::guess_filetype, VolumetricData::mdff_potential, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, threshold, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_move VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 407 of file TclVoltool.C.

References DrawMolecule::force_recalc, VMDApp::guess_filetype, mat, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, tcl_get_matrix, vol_move, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_moveto VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 517 of file TclVoltool.C.

References DrawMolecule::force_recalc, VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, vol_com, vol_moveto, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_multiply VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 3020 of file TclVoltool.C.

References VMDApp::guess_filetype, init_new_volume, init_new_volume_molecule, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, multiply, newvol, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_range VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 1729 of file TclVoltool.C.

References DrawMolecule::force_recalc, VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, VolumetricData::rescale_voxel_value_range, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

void density_rotate int    stride,
int    max_rot,
float *    com,
float *    returncc,
int *    bestrot,
VolumetricData   volmapA,
VolumetricData   synthvol,
float    resolution,
double *    origin,
double *    dx,
double *    dy,
double *    dz
 

Definition at line 202 of file TclVoltool.C.

References cc, density_calc_cc, do_density_rotate, num, VolumetricData::origin, vol_com, vol_moveto, volmapA, VolumetricData::xaxis, VolumetricData::yaxis, z, and VolumetricData::zaxis.

int density_sadd VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 1621 of file TclVoltool.C.

References DrawMolecule::force_recalc, VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, VolumetricData::scalar_add, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_save VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 3530 of file TclVoltool.C.

References VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_sigma VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 2047 of file TclVoltool.C.

References DrawMolecule::force_recalc, VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, VolumetricData::sigma_scale, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_smooth VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 1513 of file TclVoltool.C.

References DrawMolecule::force_recalc, VolumetricData::gaussian_blur, VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_smult VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 1405 of file TclVoltool.C.

References DrawMolecule::force_recalc, VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, VolumetricData::scale_by, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_subtract VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 2843 of file TclVoltool.C.

References VMDApp::guess_filetype, init_new_volume, init_new_volume_molecule, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, newvol, subtract, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_supersample VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 1949 of file TclVoltool.C.

References DrawMolecule::force_recalc, VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, VolumetricData::supersample, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

int density_trim VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 1042 of file TclVoltool.C.

References DrawMolecule::force_recalc, VMDApp::guess_filetype, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::moleculeList, VolumetricData::pad, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by obj_voltool.

void do_density_rotate int    stride,
int    amt,
float *    axis,
VolumetricData   synthvol
 

Definition at line 138 of file TclVoltool.C.

References DEGTORAD, Matrix4::mat, mat, Matrix4::rotate_axis, and vol_move.

Referenced by density_rotate, and reset_density.

void do_rotate int    stride,
float *    com,
AtomSel   sel,
int    amt,
float *    axis,
MoleculeList   mlist,
float *    framepos
 

Definition at line 131 of file TclVoltool.C.

References DEGTORAD, mat, move, and Matrix4::rotate_axis.

Referenced by reset_density, and rotate.

int fit VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 639 of file TclVoltool.C.

References cc, AtomSel::coordinates, DrawMolecule::force_recalc, VMDApp::guess_filetype, BaseMolecule::mass, measure_center, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, DrawMolItem::MOL_REGEN, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::molecule_valid_id, VMDApp::moleculeList, AtomSel::molid, moveby, AtomSel::num_atoms, reset_origin, rotate, AtomSel::selected, tcl_commands_get_sel, vec_sub, vol_com, FileSpec::WAIT_BACK, and FileSpec::waitfor.

Referenced by obj_voltool.

int mask VMDApp   app,
int    argc,
Tcl_Obj *const    objv[],
Tcl_Interp *    interp
 

Definition at line 895 of file TclVoltool.C.

References VolMapCreate::COMBINE_AVG, VolMapCreate::compute_all, VMDApp::guess_filetype, init_new_volume, init_new_volume_molecule, mask, BaseMolecule::modify_volume_data, MoleculeList::mol_from_id, VMDApp::molecule_load, VMDApp::molecule_new, VMDApp::molecule_valid_id, VMDApp::moleculeList, AtomSel::molid, multiply, newvol, AtomSel::selected, tcl_commands_get_sel, VolMapCreate::volmap, FileSpec::WAIT_BACK, FileSpec::waitfor, and write_file.

Referenced by SaveTrajectoryFltkMenu::do_save, gaussdensity_cc, VolumeTexture::generateColorScaleTexture, glwin_create, mask, minmax_selected_3fv_aligned, obj_voltool, text_cmd_parallel, and VolMapCreateILS::VolMapCreateILS.

void move AtomSel   sel,
Matrix4    mat,
MoleculeList   mlist,
float *    framepos
 

Definition at line 61 of file TclVoltool.C.

References mat, and measure_move.

Referenced by do_rotate.

void moveby AtomSel   sel,
float *    vect,
MoleculeList   mlist,
float *    framepos
 

Definition at line 52 of file TclVoltool.C.

References AtomSel::firstsel, AtomSel::lastsel, AtomSel::on, and vec_add.

Referenced by fit, reset_density, and rotate.

int obj_voltool ClientData    cd,
Tcl_Interp *    interp,
int    argc,
Tcl_Obj *const    objv[]
 

Definition at line 3626 of file TclVoltool.C.

References density_add, density_average, density_binmask, density_clamp, density_com, density_correlate, density_crop, density_downsample, density_histogram, density_info, density_mdff_potential, density_move, density_moveto, density_multiply, density_range, density_sadd, density_save, density_sigma, density_smooth, density_smult, density_subtract, density_supersample, density_trim, fit, mask, mdff_cc, mdff_sim, and strupncmp.

void reset_density int    stride,
int *    bestrot,
VolumetricData   synthvol,
float *    synthcom,
float *    framepos,
float *    com,
AtomSel   sel,
MoleculeList   mlist
 

Definition at line 281 of file TclVoltool.C.

References do_density_rotate, do_rotate, moveby, vec_scale, vol_com, and vol_moveto.

void reset_origin float *    origin,
float *    newpos,
AtomSel   sel
 

Definition at line 314 of file TclVoltool.C.

References AtomSel::num_atoms.

Referenced by fit.

void rotate int    stride,
int    max_rot,
float *    com,
float *    returncc,
float *    bestpos,
AtomSel   sel,
MoleculeList   mlist,
VolumetricData   volmapA,
float    resolution,
float *    origin,
float *    framepos
 

Definition at line 151 of file TclVoltool.C.

References calc_cc, cc, do_rotate, moveby, AtomSel::selected, vec_scale, volmapA, and z.

Referenced by fit, and colvarmodule::quaternion::rotate.


Generated on Fri Mar 29 02:46:53 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002