IMDOutput.C

Go to the documentation of this file.
00001 
00007 #include "IMDOutput.h"
00008 #include "GlobalMasterIMD.h"
00009 
00010 IMDOutput::IMDOutput() {
00011   imd = NULL;
00012   transrate = 1;
00013   ignore = 0;
00014 }
00015 
00016 IMDOutput::~IMDOutput() {
00017 }
00018 
00019 void IMDOutput::use_imd(GlobalMasterIMD *g) {
00020   imd = g;
00021   ignore = g->IMDignore || g->IMDignoreForces;
00022 }
00023 
00024 void IMDOutput::gather_energies(IMDEnergies *energies) { 
00025   if (!imd || energies->tstep % transrate) return;
00026   imd->send_energies(energies);
00027 }
00028 
00029 void IMDOutput::gather_coordinates(int timestep, int N, FloatVector *coords) {
00030   if ( ignore ) {
00031     imd->step = timestep;
00032     imd->calculate();
00033   }
00034   if (!imd || timestep % transrate) return;
00035   imd->send_fcoords(N, coords);
00036 }
00037 

Generated on Sat Sep 23 01:17:14 2017 for NAMD by  doxygen 1.4.7