#include <Output.h>
Public Member Functions | |
| Output () | |
| ~Output () | |
| void | energy (int, BigReal *) |
| void | coordinate (int, int, Vector *, FloatVector *, Lattice &) |
| void | velocity (int, int, Vector *) |
Static Public Member Functions | |
| int | coordinateNeeded (int) |
| int | velocityNeeded (int) |
|
|
Definition at line 47 of file Output.C. 00047 { }
|
|
|
Definition at line 57 of file Output.C. 00057 { }
|
|
||||||||||||||||||||||||
|
Definition at line 194 of file Output.C. References SimParameters::dcdFrequency, SimParameters::dcdUnitCell, END_OF_RUN, FILE_OUTPUT, SimParameters::firstTimestep, IMDOutput::gather_coordinates(), Node::getScript(), Node::imd, SimParameters::IMDfreq, SimParameters::IMDon, iout, ScriptTcl::measure(), SimParameters::N, Node::Object(), SimParameters::restartFrequency, Node::simParameters, simParams, and wrap_coor(). Referenced by CollectionMaster::disposePositions(). 00196 {
00197 SimParameters *simParams = Node::Object()->simParameters;
00198 double coor_wrapped = 0;
00199 float fcoor_wrapped = 0;
00200
00201 if ( timestep >= 0 ) {
00202
00203 // Output a DCD trajectory
00204 if ( simParams->dcdFrequency &&
00205 ((timestep % simParams->dcdFrequency) == 0) )
00206 {
00207 wrap_coor(fcoor,lattice,&fcoor_wrapped);
00208 output_dcdfile(timestep, n, fcoor,
00209 simParams->dcdUnitCell ? &lattice : NULL);
00210 }
00211
00212 // Output a restart file
00213 if ( simParams->restartFrequency &&
00214 ((timestep % simParams->restartFrequency) == 0) )
00215 {
00216 iout << "WRITING COORDINATES TO RESTART FILE AT STEP "
00217 << timestep << "\n" << endi;
00218 wrap_coor(coor,lattice,&coor_wrapped);
00219 output_restart_coordinates(coor, n, timestep);
00220 iout << "FINISHED WRITING RESTART COORDINATES\n" <<endi;
00221 fflush(stdout);
00222 }
00223
00224 // Interactive MD
00225 if ( simParams->IMDon &&
00226 ( ((timestep % simParams->IMDfreq) == 0) ||
00227 (timestep == simParams->firstTimestep) ) )
00228 {
00229 IMDOutput *imd = Node::Object()->imd;
00230 wrap_coor(fcoor,lattice,&fcoor_wrapped);
00231 if (imd != NULL) imd->gather_coordinates(timestep, n, fcoor);
00232 }
00233
00234 }
00235
00236 if (timestep == EVAL_MEASURE)
00237 {
00238 #ifdef NAMD_TCL
00239 wrap_coor(coor,lattice,&coor_wrapped);
00240 Node::Object()->getScript()->measure(coor);
00241 #endif
00242 }
00243
00244 // Output final coordinates
00245 if (timestep == FILE_OUTPUT || timestep == END_OF_RUN)
00246 {
00247 iout << "WRITING COORDINATES TO OUTPUT FILE AT STEP "
00248 << simParams->N << "\n" << endi;
00249 fflush(stdout);
00250 wrap_coor(coor,lattice,&coor_wrapped);
00251 output_final_coordinates(coor, n, simParams->N);
00252 }
00253
00254 // Close trajectory files
00255 if (timestep == END_OF_RUN)
00256 {
00257 if (simParams->dcdFrequency) output_dcdfile(END_OF_RUN,0,0,
00258 simParams->dcdUnitCell ? &lattice : NULL);
00259 }
00260
00261 }
|
|
|
Definition at line 77 of file Output.C. References SimParameters::dcdFrequency, END_OF_RUN, FILE_OUTPUT, SimParameters::firstTimestep, SimParameters::IMDfreq, SimParameters::IMDon, Node::Object(), SimParameters::restartFrequency, Node::simParameters, and simParams. Referenced by Controller::enqueueCollections(), and Sequencer::submitCollections(). 00078 {
00079 SimParameters *simParams = Node::Object()->simParameters;
00080
00081 int positionsNeeded = 0;
00082
00083 if ( timestep >= 0 ) {
00084
00085 // Output a DCD trajectory
00086 if ( simParams->dcdFrequency &&
00087 ((timestep % simParams->dcdFrequency) == 0) )
00088 { positionsNeeded |= 1; }
00089
00090 // Output a restart file
00091 if ( simParams->restartFrequency &&
00092 ((timestep % simParams->restartFrequency) == 0) )
00093 { positionsNeeded |= 2; }
00094
00095 // Iteractive MD
00096 if ( simParams->IMDon &&
00097 ( ((timestep % simParams->IMDfreq) == 0) ||
00098 (timestep == simParams->firstTimestep) ) )
00099 { positionsNeeded |= 1; }
00100
00101 }
00102
00103 // Output final coordinates
00104 if (timestep == FILE_OUTPUT || timestep == END_OF_RUN ||
00105 timestep == EVAL_MEASURE)
00106 {
00107 positionsNeeded |= 2;
00108 }
00109
00110 return positionsNeeded;
00111 }
|
|
||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 309 of file Output.C. References END_OF_RUN, FILE_OUTPUT, iout, SimParameters::N, Node::Object(), SimParameters::restartFrequency, Node::simParameters, simParams, and SimParameters::velDcdFrequency. Referenced by CollectionMaster::disposeVelocities(). 00310 {
00311 SimParameters *simParams = Node::Object()->simParameters;
00312
00313 if ( timestep >= 0 ) {
00314
00315 // Output velocity DCD trajectory
00316 if ( simParams->velDcdFrequency &&
00317 ((timestep % simParams->velDcdFrequency) == 0) )
00318 {
00319 output_veldcdfile(timestep, n, vel);
00320 }
00321
00322 // Output restart file
00323 if ( simParams->restartFrequency &&
00324 ((timestep % simParams->restartFrequency) == 0) )
00325 {
00326 iout << "WRITING VELOCITIES TO RESTART FILE AT STEP "
00327 << timestep << "\n" << endi;
00328 output_restart_velocities(timestep, n, vel);
00329 iout << "FINISHED WRITING RESTART VELOCITIES\n" <<endi;
00330 fflush(stdout);
00331 }
00332
00333 }
00334
00335 // Output final velocities
00336 if (timestep == FILE_OUTPUT || timestep == END_OF_RUN)
00337 {
00338 iout << "WRITING VELOCITIES TO OUTPUT FILE AT STEP "
00339 << simParams->N << "\n" << endi;
00340 fflush(stdout);
00341 output_final_velocities(simParams->N, n, vel);
00342 }
00343
00344 // Close trajectory files
00345 if (timestep == END_OF_RUN)
00346 {
00347 if (simParams->velDcdFrequency) output_veldcdfile(END_OF_RUN,0,0);
00348 }
00349
00350 }
|
|
|
Definition at line 280 of file Output.C. References FILE_OUTPUT, Node::Object(), SimParameters::restartFrequency, Node::simParameters, simParams, and SimParameters::velDcdFrequency. Referenced by Controller::enqueueCollections(), and Sequencer::submitCollections(). 00281 {
00282 SimParameters *simParams = Node::Object()->simParameters;
00283
00284 int velocitiesNeeded = 0;
00285
00286 if ( timestep >= 0 ) {
00287
00288 // Output a velocity DCD trajectory
00289 if ( simParams->velDcdFrequency &&
00290 ((timestep % simParams->velDcdFrequency) == 0) )
00291 { velocitiesNeeded |= 1; }
00292
00293 // Output a restart file
00294 if ( simParams->restartFrequency &&
00295 ((timestep % simParams->restartFrequency) == 0) )
00296 { velocitiesNeeded |= 2; }
00297
00298 }
00299
00300 // Output final velocities
00301 if (timestep == FILE_OUTPUT || timestep == END_OF_RUN)
00302 {
00303 velocitiesNeeded |= 2;
00304 }
00305
00306 return velocitiesNeeded;
00307 }
|
1.3.9.1