1 /* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*-
4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
11 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
12 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
13 * Copyright (c) 2001-2004, The GROMACS development team,
14 * check out http://www.gromacs.org for more information.
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
21 * If you want to redistribute modifications, please consider that
22 * scientific software is very special. Version control is crucial -
23 * bugs must be traceable. We will be happy to consider code for
24 * inclusion in the official distribution, but derived work must not
25 * be called official GROMACS. Details are found in the README & COPYING
26 * files - if they are missing, get the official version at www.gromacs.org.
28 * To help us fund GROMACS development, we humbly ask that you cite
29 * the papers on the package - you can find them in the top README file.
31 * For more info, check our website at http://www.gromacs.org
34 * GROwing Monsters And Cloning Shrimps
49 #include "nonbonded.h"
65 #include "mpelogging.h"
80 gmx_grppairener_t
*grppener
,
89 GMX_MPE_LOG(ev_ns_start
);
90 if (!fr
->ns
.nblist_initialized
)
92 init_neighbor_list(fp
, fr
, md
->homenr
);
98 /* no FEP possibilities? Should this be noted in grompp? check. MRS */
99 nsearch
= search_neighbours(fp
,fr
,x
,box
,top
,groups
,cr
,nrnb
,md
,
100 lambda
,dvdl
,grppener
,
101 bFillGrid
,bDoLongRange
,
104 fprintf(debug
,"nsearch = %d\n",nsearch
);
106 /* Check whether we have to do dynamic load balancing */
107 /*if ((nsb->nstDlb > 0) && (mod(step,nsb->nstDlb) == 0))
108 count_nb(cr,nsb,&(top->blocks[ebCGS]),nns,fr->nlr,
109 &(top->idef),opts->ngener);
111 if (fr
->ns
.dump_nl
> 0)
112 dump_nblist(fp
,cr
,fr
,fr
->ns
.dump_nl
);
114 GMX_MPE_LOG(ev_ns_finish
);
117 void do_force_lowlevel(FILE *fplog
, gmx_large_int_t step
,
118 t_forcerec
*fr
, t_inputrec
*ir
,
119 t_idef
*idef
, t_commrec
*cr
,
120 t_nrnb
*nrnb
, gmx_wallcycle_t wcycle
,
123 rvec x
[], history_t
*hist
,
125 gmx_enerdata_t
*enerd
,
143 bool bDoEpot
,bSepDVDL
,bSB
;
147 real Vsr
,Vlr
,Vcorr
=0,vdip
,vcharge
;
151 gmx_enerdata_t ed_lam
;
152 double clam_i
,vlam_i
;
153 real dvdl_dum
[efptNR
], dvdl
[efptNR
], lambda_dum
[efptNR
];
157 double t0
=0.0,t1
,t2
,t3
; /* time measurement for coarse load balancing */
160 #define PRINT_SEPDVDL(s,v,dvdl) if (bSepDVDL) fprintf(fplog,sepdvdlformat,s,v,dvdl);
162 GMX_MPE_LOG(ev_force_start
);
164 /* reset free energy components */
165 for (i
=0;i
<efptNR
;i
++)
172 for(i
=0; (i
<DIM
); i
++)
174 box_size
[i
]=box
[i
][i
];
177 bSepDVDL
=(fr
->bSepDVDL
&& do_per_step(step
,ir
->nstlog
));
180 /* do QMMM first if requested */
183 enerd
->term
[F_EQM
] = calculate_QMMM(cr
,x
,f
,fr
,md
);
188 fprintf(fplog
,"Step %s: non-bonded V and dVdl for node %d:\n",
189 gmx_step_str(step
,buf
),cr
->nodeid
);
192 /* Call the short range functions all in one go. */
193 GMX_MPE_LOG(ev_do_fnbf_start
);
196 /*#define TAKETIME ((cr->npmenodes) && (fr->timesteps < 12))*/
197 #define TAKETIME FALSE
200 MPI_Barrier(cr
->mpi_comm_mygroup
);
207 /* add foreign lambda component to walls! */
208 do_walls(ir
,fr
,box
,md
,x
,f
,lambda
[efptVDW
],&dvdl
[efptVDW
],
209 enerd
->grpp
.ener
[egLJSR
],nrnb
);
210 PRINT_SEPDVDL("Walls",0.0,dvdl
[efptVDW
]);
211 enerd
->dvdl_lin
[efptVDW
] += dvdl
[efptVDW
];
214 /* If doing GB, reset dvda and calculate the Born radii */
215 if (ir
->implicit_solvent
)
217 /* wallcycle_start(wcycle,ewcGB); */
219 for(i
=0;i
<born
->nr
;i
++)
226 calc_gb_rad(cr
,fr
,ir
,top
,atype
,x
,&(fr
->gblist
),born
,md
,nrnb
);
229 /* wallcycle_stop(wcycle, ewcGB); */
234 if (flags
& GMX_FORCE_FORCES
)
236 donb_flags
|= GMX_DONB_FORCES
;
238 do_nonbonded(cr
,fr
,x
,f
,md
,excl
,
240 enerd
->grpp
.ener
[egBHAMSR
] :
241 enerd
->grpp
.ener
[egLJSR
],
242 enerd
->grpp
.ener
[egCOULSR
],
243 enerd
->grpp
.ener
[egGB
],box_size
,nrnb
,
244 lambda
,dvdl
,-1,-1,donb_flags
);
245 /* If we do foreign lambda and we have soft-core interactions
246 * we have to recalculate the (non-linear) energies contributions.
248 if (fepvals
->n_lambda
> 0 && (flags
& GMX_FORCE_DHDL
) && fepvals
->sc_alpha
!= 0)
250 init_enerdata(mtop
->groups
.grps
[egcENER
].nr
,fepvals
->n_lambda
,&ed_lam
);
251 for(i
=0; i
<=enerd
->n_lambda
; i
++)
253 for (j
=0;j
<efptNR
;j
++) {
256 lambda_dum
[j
] = lambda
[j
];
260 lambda_dum
[j
] = fepvals
->all_lambda
[j
][i
-1];
263 /* currently, evaluates all energies. Eventually, can eliminate the call to the same lambda */
264 reset_enerdata(&ir
->opts
,fr
,TRUE
,&ed_lam
,FALSE
);
265 do_nonbonded(cr
,fr
,x
,f
,md
,excl
,
267 ed_lam
.grpp
.ener
[egBHAMSR
] :
268 ed_lam
.grpp
.ener
[egLJSR
],
269 ed_lam
.grpp
.ener
[egCOULSR
],
270 enerd
->grpp
.ener
[egGB
], box_size
,nrnb
,
271 lambda_dum
,dvdl_dum
,-1,-1,
272 GMX_DONB_FOREIGNLAMBDA
);
273 sum_epot(&ir
->opts
,&ed_lam
);
274 enerd
->enerpart_lambda
[i
] += ed_lam
.term
[F_EPOT
];
276 destroy_enerdata(&ed_lam
);
280 /* If we are doing GB, calculate bonded forces and apply corrections
281 * to the solvation forces */
282 /* is there any free energy contribution here? */
283 if (ir
->implicit_solvent
) {
284 dvdgb
= calc_gb_forces(cr
,md
,born
,top
,atype
,x
,f
,fr
,idef
,ir
->gb_algorithm
,nrnb
,bBornRadii
);
285 enerd
->term
[F_GB12
]+=dvdgb
;
287 /* Also add the nonbonded GB potential energy (only from one energy group currently) */
288 enerd
->term
[F_GB12
]+=enerd
->grpp
.ener
[egGB
][0];
299 if (fepvals
->sc_alpha
!= 0)
301 enerd
->dvdl_nonlin
[efptVDW
] += dvdl
[efptVDW
];
305 enerd
->dvdl_lin
[efptVDW
] += dvdl
[efptVDW
];
310 for(i
=0; i
<enerd
->grpp
.nener
; i
++)
314 enerd
->grpp
.ener
[egBHAMSR
][i
] :
315 enerd
->grpp
.ener
[egLJSR
][i
])
316 + enerd
->grpp
.ener
[egCOULSR
][i
];
318 dvdlsum
= dvdl
[efptVDW
]+dvdl
[efptCOUL
];
319 PRINT_SEPDVDL("VdW and Coulomb SR particle-p.",Vsr
,dvdlsum
);
324 GMX_MPE_LOG(ev_do_fnbf_finish
);
328 pr_rvecs(debug
,0,"fshift after SR",fr
->fshift
,SHIFTS
);
331 /* Shift the coordinates. Must be done before bonded forces and PPPM,
332 * but is also necessary for SHAKE and update, therefore it can NOT
333 * go when no bonded forces have to be evaluated.
336 /* Here sometimes we would not need to shift with NBFonly,
337 * but we do so anyhow for consistency of the returned coordinates.
341 shift_self(graph
,box
,x
);
344 inc_nrnb(nrnb
,eNR_SHIFTX
,2*graph
->nnodes
);
348 inc_nrnb(nrnb
,eNR_SHIFTX
,graph
->nnodes
);
351 /* Check whether we need to do bondeds or correct for exclusions */
353 ((flags
& GMX_FORCE_BONDED
)
354 || EEL_RF(fr
->eeltype
) || EEL_FULL(fr
->eeltype
)))
356 /* Since all atoms are in the rectangular or triclinic unit-cell,
357 * only single box vector shifts (2 in x) are required.
359 set_pbc_dd(&pbc
,fr
->ePBC
,cr
->dd
,TRUE
,box
);
363 if (flags
& GMX_FORCE_BONDED
)
365 GMX_MPE_LOG(ev_calc_bonds_start
);
366 calc_bonds(fplog
,cr
->ms
,
367 idef
,x
,hist
,f
,fr
,&pbc
,graph
,enerd
,nrnb
,lambda
,md
,fcd
,
368 DOMAINDECOMP(cr
) ? cr
->dd
->gatindex
: NULL
, atype
, born
, &(mtop
->cmap_grid
),
369 fr
->bSepDVDL
&& do_per_step(step
,ir
->nstlog
),step
);
371 /* Check if we have to determine energy differences
372 * at foreign lambda's.
374 if (fepvals
->n_lambda
> 0 && (flags
& GMX_FORCE_DHDL
) &&
375 idef
->ilsort
!= ilsortNO_FE
)
377 if (idef
->ilsort
!= ilsortFE_SORTED
)
379 gmx_incons("The bonded interactions are not sorted for free energy");
381 init_enerdata(mtop
->groups
.grps
[egcENER
].nr
,fepvals
->n_lambda
,&ed_lam
);
383 for(i
=0; i
<=enerd
->n_lambda
; i
++)
385 reset_enerdata(&ir
->opts
,fr
,TRUE
,&ed_lam
,FALSE
);
386 for (j
=0;j
<efptNR
;j
++) {
389 lambda_dum
[j
] = lambda
[j
];
393 lambda_dum
[j
] = fepvals
->all_lambda
[j
][i
-1];
396 calc_bonds_lambda(fplog
,
397 idef
,x
,fr
,&pbc
,graph
,&ed_lam
,nrnb
,lambda_dum
,md
,
398 fcd
,DOMAINDECOMP(cr
) ? cr
->dd
->gatindex
: NULL
);
399 sum_epot(&ir
->opts
,&ed_lam
);
400 enerd
->enerpart_lambda
[i
] += ed_lam
.term
[F_EPOT
];
402 destroy_enerdata(&ed_lam
);
405 GMX_MPE_LOG(ev_calc_bonds_finish
);
411 if (EEL_FULL(fr
->eeltype
))
413 bSB
= (ir
->nwall
== 2);
417 svmul(ir
->wall_ewald_zfac
,boxs
[ZZ
],boxs
[ZZ
]);
418 box_size
[ZZ
] *= ir
->wall_ewald_zfac
;
421 clear_mat(fr
->vir_el_recip
);
428 Vcorr
= ewald_LRcorrection(fplog
,md
->start
,md
->start
+md
->homenr
,
431 md
->nChargePerturbed
? md
->chargeB
: NULL
,
432 excl
,x
,bSB
? boxs
: box
,mu_tot
,
435 lambda
[efptCOUL
],&dvdl
[efptCOUL
],&vdip
,&vcharge
);
436 PRINT_SEPDVDL("Ewald excl./charge/dip. corr.",Vcorr
,dvdl
);
437 enerd
->dvdl_lin
[efptCOUL
] += dvdl
[efptCOUL
];
441 if (ir
->ewald_geometry
!= eewg3D
|| ir
->epsilon_surface
!= 0)
443 gmx_fatal(FARGS
,"TPI with PME currently only works in a 3D geometry with tin-foil boundary conditions");
445 /* The TPI molecule does not have exclusions with the rest
446 * of the system and no intra-molecular PME grid contributions
447 * will be calculated in gmx_pme_calc_energy.
454 Vcorr
= shift_LRcorrection(fplog
,md
->start
,md
->homenr
,cr
,fr
,
455 md
->chargeA
,excl
,x
,TRUE
,box
,
464 status
= gmx_pppm_do(fplog
,fr
->pmedata
,FALSE
,x
,fr
->f_novirsum
,
466 box_size
,fr
->phi
,cr
,md
->start
,md
->homenr
,
467 nrnb
,ir
->pme_order
,&Vlr
);
472 if (cr
->duty
& DUTY_PME
)
474 if (fr
->n_tpi
== 0 || (flags
& GMX_FORCE_STATECHANGED
))
476 pme_flags
= GMX_PME_SPREAD_Q
| GMX_PME_SOLVE
;
477 if (flags
& GMX_FORCE_FORCES
)
479 pme_flags
|= GMX_PME_CALC_F
;
481 wallcycle_start(wcycle
,ewcPMEMESH
);
482 status
= gmx_pme_do(fr
->pmedata
,
483 md
->start
,md
->homenr
- fr
->n_tpi
,
485 md
->chargeA
,md
->chargeB
,
487 DOMAINDECOMP(cr
) ? dd_pme_maxshift0(cr
->dd
) : 0,
488 DOMAINDECOMP(cr
) ? dd_pme_maxshift1(cr
->dd
) : 0,
490 fr
->vir_el_recip
,fr
->ewaldcoeff
,
491 &Vlr
,lambda
[efptCOUL
],&dvdl
[efptCOUL
],
493 *cycles_pme
= wallcycle_stop(wcycle
,ewcPMEMESH
);
495 /* We should try to do as little computation after
496 * this as possible, because parallel PME synchronizes
497 * the nodes, so we want all load imbalance of the rest
498 * of the force calculation to be before the PME call.
499 * DD load balancing is done on the whole time of
500 * the force call (without PME).
505 /* Determine the PME grid energy of the test molecule
506 * with the PME grid potential of the other charges.
508 gmx_pme_calc_energy(fr
->pmedata
,fr
->n_tpi
,
509 x
+ md
->homenr
- fr
->n_tpi
,
510 md
->chargeA
+ md
->homenr
- fr
->n_tpi
,
513 PRINT_SEPDVDL("PME mesh",Vlr
,dvdl
[efptCOUL
]);
517 /* Energies and virial are obtained later from the PME nodes */
518 /* but values have to be zeroed out here */
523 Vlr
= do_ewald(fplog
,FALSE
,ir
,x
,fr
->f_novirsum
,
524 md
->chargeA
,md
->chargeB
,
525 box_size
,cr
,md
->homenr
,
526 fr
->vir_el_recip
,fr
->ewaldcoeff
,
527 lambda
[efptCOUL
],&dvdl
[efptCOUL
],fr
->ewald_table
);
528 PRINT_SEPDVDL("Ewald long-range",Vlr
,dvdl
[efptCOUL
]);
532 gmx_fatal(FARGS
,"No such electrostatics method implemented %s",
533 eel_names
[fr
->eeltype
]);
537 gmx_fatal(FARGS
,"Error %d in long range electrostatics routine %s",
538 status
,EELTYPE(fr
->eeltype
));
540 enerd
->dvdl_lin
[efptCOUL
] += dvdl
[efptCOUL
];
541 enerd
->term
[F_COUL_RECIP
] = Vlr
+ Vcorr
;
544 fprintf(debug
,"Vlr = %g, Vcorr = %g, Vlr_corr = %g\n",
545 Vlr
,Vcorr
,enerd
->term
[F_COUL_RECIP
]);
546 pr_rvecs(debug
,0,"vir_el_recip after corr",fr
->vir_el_recip
,DIM
);
547 pr_rvecs(debug
,0,"fshift after LR Corrections",fr
->fshift
,SHIFTS
);
552 if (EEL_RF(fr
->eeltype
))
556 if (fr
->eeltype
!= eelRF_NEC
)
558 enerd
->term
[F_RF_EXCL
] =
559 RF_excl_correction(fplog
,fr
,graph
,md
,excl
,x
,f
,
560 fr
->fshift
,&pbc
,lambda
[efptCOUL
],&dvdl
[efptCOUL
]);
563 enerd
->dvdl_lin
[efptCOUL
] += dvdl
[efptCOUL
];
564 PRINT_SEPDVDL("RF exclusion correction",
565 enerd
->term
[F_RF_EXCL
],dvdl
[efptCOUL
]);
573 print_nrnb(debug
,nrnb
);
581 MPI_Barrier(cr
->mpi_comm_mygroup
);
584 if (fr
->timesteps
== 11)
586 fprintf(stderr
,"* PP load balancing info: node %d, step %s, rel wait time=%3.0f%% , load string value: %7.2f\n",
587 cr
->nodeid
, gmx_step_str(fr
->timesteps
,buf
),
588 100*fr
->t_wait
/(fr
->t_wait
+fr
->t_fnbf
),
589 (fr
->t_fnbf
+fr
->t_wait
)/fr
->t_fnbf
);
597 pr_rvecs(debug
,0,"fshift after bondeds",fr
->fshift
,SHIFTS
);
600 GMX_MPE_LOG(ev_force_finish
);
604 void init_enerdata(int ngener
,int n_lambda
,gmx_enerdata_t
*enerd
)
608 for(i
=0; i
<F_NRE
; i
++)
616 fprintf(debug
,"Creating %d sized group matrix for energies\n",n2
);
618 enerd
->grpp
.nener
= n2
;
619 for(i
=0; (i
<egNR
); i
++)
621 snew(enerd
->grpp
.ener
[i
],n2
);
626 enerd
->n_lambda
= 1 + n_lambda
;
627 snew(enerd
->enerpart_lambda
,enerd
->n_lambda
);
635 void destroy_enerdata(gmx_enerdata_t
*enerd
)
639 for(i
=0; (i
<egNR
); i
++)
641 sfree(enerd
->grpp
.ener
[i
]);
646 sfree(enerd
->enerpart_lambda
);
650 static real
sum_v(int n
,real v
[])
662 void sum_epot(t_grpopts
*opts
,gmx_enerdata_t
*enerd
)
664 gmx_grppairener_t
*grpp
;
671 /* Accumulate energies */
672 epot
[F_COUL_SR
] = sum_v(grpp
->nener
,grpp
->ener
[egCOULSR
]);
673 epot
[F_LJ
] = sum_v(grpp
->nener
,grpp
->ener
[egLJSR
]);
674 epot
[F_LJ14
] = sum_v(grpp
->nener
,grpp
->ener
[egLJ14
]);
675 epot
[F_COUL14
] = sum_v(grpp
->nener
,grpp
->ener
[egCOUL14
]);
676 epot
[F_COUL_LR
] = sum_v(grpp
->nener
,grpp
->ener
[egCOULLR
]);
677 epot
[F_LJ_LR
] = sum_v(grpp
->nener
,grpp
->ener
[egLJLR
]);
678 /* lattice part of LR doesnt belong to any group
679 * and has been added earlier
681 epot
[F_BHAM
] = sum_v(grpp
->nener
,grpp
->ener
[egBHAMSR
]);
682 epot
[F_BHAM_LR
] = sum_v(grpp
->nener
,grpp
->ener
[egBHAMLR
]);
685 for(i
=0; (i
<F_EPOT
); i
++)
686 if (i
!= F_DISRESVIOL
&& i
!= F_ORIRESDEV
&& i
!= F_DIHRESVIOL
)
687 epot
[F_EPOT
] += epot
[i
];
690 void sum_dhdl(gmx_enerdata_t
*enerd
, double *lambda
, t_lambda
*fepvals
)
695 enerd
->term
[F_DVDL_REMAIN
] = 0.0;
696 for (i
=0;i
<efptNR
;i
++)
698 if (fepvals
->separate_dvdl
[i
])
700 /* could this be done more readably/compactly? */
709 index
= F_DVDL_BONDED
;
711 case (efptRESTRAINT
):
712 index
= F_DVDL_RESTRAINT
;
718 index
= F_DVDL_REMAIN
;
721 enerd
->term
[index
] = enerd
->dvdl_lin
[i
] + enerd
->dvdl_nonlin
[i
];
724 fprintf(debug
,"dvdl-%s[%2d]: %f: non-linear %f + linear %f\n",
725 i
,efpt_names
[i
],enerd
->term
[index
],enerd
->dvdl_nonlin
[i
],enerd
->dvdl_lin
[i
]);
730 enerd
->term
[F_DVDL_REMAIN
] += enerd
->dvdl_lin
[i
] + enerd
->dvdl_nonlin
[i
];
733 fprintf(debug
,"dvd-%sl[%2d]: %f: non-linear %f + linear %f\n",
734 i
,efpt_names
[0],enerd
->term
[F_DVDL_REMAIN
],enerd
->dvdl_nonlin
[i
],enerd
->dvdl_lin
[i
]);
739 /* Notes on the foreign lambda free energy difference evaluation:
740 * Adding the potential and ekin terms that depend linearly on lambda
741 * as delta lam * dvdl to the energy differences is exact.
742 * For the constraint dvdl this is not exact, but we have no other option
743 * (try to remedy this - MRS)
744 * For the non-bonded LR term we assume that the soft-core (if present)
745 * no longer affects the energy beyond the short-range cut-off,
746 * which is a very good approximation (except for exotic settings).
747 * (investigate how to overcome this - MRS)
750 for(i
=1; i
<=enerd
->n_lambda
; i
++)
753 /* we don't need to worry about dvdl contributions to the currenta lambda, because
754 it's automatically zero */
756 /* first kinetic energy term */
757 dlam
= (fepvals
->all_lambda
[efptMASS
][i
-1] - lambda
[efptMASS
]);
759 /* make sure constraint terms are added on correctly here or elsewhere! MRS */
760 enerd
->enerpart_lambda
[i
] += enerd
->term
[F_DKDL
]*dlam
;
762 for (j
=0;j
<efptNR
;j
++)
764 dlam
= (fepvals
->all_lambda
[j
][i
-1]-lambda
[j
]);
765 enerd
->enerpart_lambda
[i
] += dlam
*enerd
->dvdl_lin
[j
];
768 fprintf(debug
,"enerdiff lam %g: (%15s), non-linear %f linear %f*%f\n",
769 fepvals
->all_lambda
[j
][i
-1],efpt_names
[j
],
770 enerd
->enerpart_lambda
[i
] - enerd
->enerpart_lambda
[0],
771 dlam
,enerd
->dvdl_lin
[j
]);
777 void reset_enerdata(t_grpopts
*opts
,
778 t_forcerec
*fr
,bool bNS
,
779 gmx_enerdata_t
*enerd
,
785 /* First reset all energy components, except for the long range terms
786 * on the master at non neighbor search steps, since the long range
787 * terms have already been summed at the last neighbor search step.
789 bKeepLR
= (fr
->bTwinRange
&& !bNS
);
790 for(i
=0; (i
<egNR
); i
++) {
791 if (!(bKeepLR
&& bMaster
&& (i
== egCOULLR
|| i
== egLJLR
))) {
792 for(j
=0; (j
<enerd
->grpp
.nener
); j
++)
793 enerd
->grpp
.ener
[i
][j
] = 0.0;
796 for (i
=0;i
<efptNR
;i
++) {
797 enerd
->dvdl_lin
[i
] = 0.0;
798 enerd
->dvdl_nonlin
[i
] = 0.0;
800 /* Normal potential energy components */
801 for(i
=0; (i
<=F_EPOT
); i
++) {
802 enerd
->term
[i
] = 0.0;
804 /* Initialize the dvdl term with the long range contribution */
805 enerd
->term
[F_DVDL_COUL
] = 0.0;
806 enerd
->term
[F_DVDL_VDW
] = 0.0;
807 enerd
->term
[F_DVDL_BONDED
] = 0.0;
808 enerd
->term
[F_DVDL_RESTRAINT
] = 0.0;
809 enerd
->term
[F_DVDL_REMAIN
] = 0.0;
810 enerd
->term
[F_DKDL
] = 0.0;
811 if (enerd
->n_lambda
> 0)
813 for(i
=0; i
<enerd
->n_lambda
; i
++)
815 enerd
->enerpart_lambda
[i
] = 0.0;