From d13fc4831999af27c4ccd6fb8b969663e5d40cbd Mon Sep 17 00:00:00 2001 From: Carsten Kutzner Date: Thu, 14 Mar 2013 11:37:36 +0100 Subject: [PATCH] Evaluate enforced rotation potenial with Verlet, fixes #1155 Change-Id: I6231a9a6cd9cd4004d53b721922e5d9298af76a2 --- src/mdlib/sim_util.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/mdlib/sim_util.c b/src/mdlib/sim_util.c index 72251d78bb..e0797cdc00 100644 --- a/src/mdlib/sim_util.c +++ b/src/mdlib/sim_util.c @@ -1115,6 +1115,16 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr, } } + if (inputrec->bRot) + { + /* Enforced rotation has its own cycle counter that starts after the collective + * coordinates have been communicated. It is added to ddCyclF to allow + * for proper load-balancing */ + wallcycle_start(wcycle, ewcROT); + do_rotation(cr, inputrec, box, x, t, step, wcycle, bNS); + wallcycle_stop(wcycle, ewcROT); + } + /* Start the force cycle counter. * This counter is stopped in do_forcelow_level. * No parallel communication should occur while this counter is running, @@ -1423,6 +1433,14 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr, f, vir_force, mdatoms, enerd, lambda, t); } + /* Add the forces from enforced rotation potentials (if any) */ + if (inputrec->bRot) + { + wallcycle_start(wcycle, ewcROTadd); + enerd->term[F_COM_PULL] += add_rot_forces(inputrec->rot, f, cr, step, t); + wallcycle_stop(wcycle, ewcROTadd); + } + if (PAR(cr) && !(cr->duty & DUTY_PME)) { /* In case of node-splitting, the PP nodes receive the long-range -- 2.22.0