NAMD
Public Member Functions | List of all members
IMDOutput Class Reference

#include <IMDOutput.h>

Public Member Functions

 IMDOutput ()
 
 ~IMDOutput ()
 
void use_imd (GlobalMasterIMD *)
 
void get_imd_packet ()
 
void gather_time (IMDTime *time)
 
void gather_box (int timestep, IMDBox *box)
 
void gather_energies (IMDEnergies *energies)
 
void gather_coordinates (int timestep, int N, FloatVector *coords)
 
void gather_velocities (int timestep, int N, FloatVector *velocities)
 
void gather_forces (int timestep, int N, FloatVector *forces)
 
void set_transrate (int newrate)
 
const GlobalMasterIMDgetIMD ()
 

Detailed Description

Definition at line 20 of file IMDOutput.h.

Constructor & Destructor Documentation

◆ IMDOutput()

IMDOutput::IMDOutput ( )

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 10 of file IMDOutput.C.

10  {
11  imd = NULL;
12  transrate = 1;
13  ignore = 0;
14 }

◆ ~IMDOutput()

IMDOutput::~IMDOutput ( )
Note
In case of (g->IMDignore || g->IMDignoreForces), imd is directly created by "new GlobalMasterIMD();" in ComputeMgr.C, and IMDOutput is the only owner of the GlobalMasterIMD object, so it should be deleted here.

Definition at line 16 of file IMDOutput.C.

16  {
23  if (ignore) {
24  if (imd) delete imd;
25  }
26 }

Member Function Documentation

◆ gather_box()

void IMDOutput::gather_box ( int  timestep,
IMDBox box 
)

Definition at line 71 of file IMDOutput.C.

References GlobalMasterIMD::send_box().

Referenced by Output::coordinate().

71  {
72  if (!imd || timestep % transrate) return;
73  imd->send_box(box);
74 }
void send_box(IMDBox *)

◆ gather_coordinates()

void IMDOutput::gather_coordinates ( int  timestep,
int  N,
FloatVector coords 
)

Definition at line 44 of file IMDOutput.C.

References GlobalMasterIMD::calculate(), coords, GlobalMasterIMD::send_fcoords(), and GlobalMaster::step.

Referenced by Output::coordinate().

44  {
45  if ( ignore ) {
46  imd->step = timestep;
47  imd->calculate();
48  }
49  if (!imd || timestep % transrate) return;
50  imd->send_fcoords(N, coords);
51 }
virtual void calculate()
static float * coords
Definition: ScriptTcl.C:67
void send_fcoords(int, FloatVector *)

◆ gather_energies()

void IMDOutput::gather_energies ( IMDEnergies energies)

Definition at line 39 of file IMDOutput.C.

References GlobalMasterIMD::send_energies(), and IMDEnergies::tstep.

Referenced by Controller::printEnergies().

39  {
40  if (!imd || energies->tstep % transrate) return;
41  imd->send_energies(energies);
42 }
int32 tstep
Definition: imd.h:37
void send_energies(IMDEnergies *)

◆ gather_forces()

void IMDOutput::gather_forces ( int  timestep,
int  N,
FloatVector forces 
)

Definition at line 62 of file IMDOutput.C.

References GlobalMasterIMD::calculate(), GlobalMasterIMD::send_forces(), and GlobalMaster::step.

Referenced by Output::force().

62  {
63  if ( ignore ) {
64  imd->step = timestep;
65  imd->calculate();
66  }
67  if (!imd || timestep % transrate) return;
68  imd->send_forces(N, forces);
69 }
virtual void calculate()
void send_forces(int, FloatVector *)

◆ gather_time()

void IMDOutput::gather_time ( IMDTime time)

Definition at line 76 of file IMDOutput.C.

References GlobalMasterIMD::send_time(), and IMDTime::tstep.

Referenced by Controller::printEnergies().

76  {
77  if (!imd || time->tstep % transrate) return;
78  imd->send_time(time);
79 }
void send_time(IMDTime *)
long int tstep
Definition: imd.h:52

◆ gather_velocities()

void IMDOutput::gather_velocities ( int  timestep,
int  N,
FloatVector velocities 
)

Definition at line 53 of file IMDOutput.C.

References GlobalMasterIMD::calculate(), GlobalMasterIMD::send_velocities(), and GlobalMaster::step.

Referenced by Output::velocity().

53  {
54  if ( ignore ) {
55  imd->step = timestep;
56  imd->calculate();
57  }
58  if (!imd || timestep % transrate) return;
59  imd->send_velocities(N, velocities);
60 }
void send_velocities(int, FloatVector *)
virtual void calculate()

◆ get_imd_packet()

void IMDOutput::get_imd_packet ( )

Definition at line 33 of file IMDOutput.C.

References GlobalMasterIMD::get_vmd_forces(), and GlobalMasterIMD::imd_connection().

Referenced by Output::coordinateNeeded(), and Controller::printEnergies().

33  {
34  if ( !imd ) return;
35  imd->imd_connection();
36  imd->get_vmd_forces();
37 }

◆ getIMD()

const GlobalMasterIMD* IMDOutput::getIMD ( )
inline

Definition at line 43 of file IMDOutput.h.

43 {return imd;};

◆ set_transrate()

void IMDOutput::set_transrate ( int  newrate)
inline

Definition at line 42 of file IMDOutput.h.

Referenced by GlobalMasterIMD::get_vmd_forces().

42 {transrate = newrate; }

◆ use_imd()

void IMDOutput::use_imd ( GlobalMasterIMD g)

Definition at line 28 of file IMDOutput.C.

References GlobalMasterIMD::IMDignore, and GlobalMasterIMD::IMDignoreForces.

Referenced by GlobalMasterIMD::GlobalMasterIMD().

28  {
29  imd = g;
30  ignore = g->IMDignore || g->IMDignoreForces;
31 }

The documentation for this class was generated from the following files: