Make AWH bias sharing more flexible
[alexxy/gromacs.git] / src / gromacs / applied_forces / awh / bias.h
index 39eeb991b46966899116ec08c881417e5f57b596..7b9545db61312ab50fcfac230e3c54462ec4b64d 100644 (file)
@@ -65,7 +65,6 @@
 #include "biaswriter.h"
 #include "dimparams.h"
 
-struct gmx_multisim_t;
 struct t_commrec;
 struct t_enxsubblock;
 
@@ -79,6 +78,7 @@ class AwhParams;
 struct AwhPointStateHistory;
 class CorrelationGrid;
 class BiasGrid;
+class BiasSharing;
 class GridAxis;
 class PointState;
 
@@ -157,7 +157,7 @@ public:
      * \param[in] dimParams              Bias dimension parameters.
      * \param[in] beta                   1/(k_B T).
      * \param[in] mdTimeStep             The MD time step.
-     * \param[in] numSharingSimulations  The number of simulations to share the bias across.
+     * \param[in] biasSharing            Pointer to object for sharing bias over simulations, can be nullptr
      * \param[in] biasInitFilename       Name of file to read PMF and target from.
      * \param[in] thisRankWillDoIO       Tells whether this MPI rank will do I/O (checkpointing, AWH output),
      * normally (only) the master rank does I/O.
@@ -169,7 +169,7 @@ public:
          ArrayRef<const DimParams>      dimParams,
          double                         beta,
          double                         mdTimeStep,
-         int                            numSharingSimulations,
+         const BiasSharing*             biasSharing,
          const std::string&             biasInitFilename,
          ThisRankWillDoIO               thisRankWillDoIO,
          BiasParams::DisableUpdateSkips disableUpdateSkips = BiasParams::DisableUpdateSkips::no);
@@ -207,8 +207,6 @@ public:
      * energy lambda state dimensions this can be empty.
      * \param[out]    awhPotential   Bias potential.
      * \param[out]    potentialJump  Change in bias potential for this bias.
-     * \param[in]     commRecord     Struct for intra-simulation communication.
-     * \param[in]     ms             Struct for multi-simulation communication.
      * \param[in]     t              Time.
      * \param[in]     step           Time step.
      * \param[in]     seed           Random seed.
@@ -220,8 +218,6 @@ public:
                                                        ArrayRef<const double> neighborLambdaDhdl,
                                                        double*                awhPotential,
                                                        double*                potentialJump,
-                                                       const t_commrec*       commRecord,
-                                                       const gmx_multisim_t*  ms,
                                                        double                 t,
                                                        int64_t                step,
                                                        int64_t                seed,