2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team.
5 * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
6 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
7 * and including many others, as listed in the AUTHORS file in the
8 * top-level source directory and at http://www.gromacs.org.
10 * GROMACS is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public License
12 * as published by the Free Software Foundation; either version 2.1
13 * of the License, or (at your option) any later version.
15 * GROMACS is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with GROMACS; if not, see
22 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
23 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 * If you want to redistribute modifications to GROMACS, please
26 * consider that scientific software is very special. Version
27 * control is crucial - bugs must be traceable. We will be happy to
28 * consider code for inclusion in the official distribution, but
29 * derived work must not be called official GROMACS. Details are found
30 * in the README & COPYING files - if they are missing, get the
31 * official version at http://www.gromacs.org.
33 * To help us fund GROMACS development, we humbly ask that you cite
34 * the research papers on the package. Check out http://www.gromacs.org.
37 /*! \libinternal \file
40 * Declares functions needed for reading, initializing and setting the AWH parameter data types.
42 * \author Viveca Lindahl
47 #ifndef GMX_AWH_READPARAMS_H
48 #define GMX_AWH_READPARAMS_H
50 #include "gromacs/fileio/readinp.h"
51 #include "gromacs/math/vectypes.h"
58 enum class PbcType : int;
64 /*! \brief Allocate and initialize the AWH parameters with values from the input file.
66 * \param[in,out] inp Input file entries.
67 * \param[in,out] wi Struct for bookeeping warnings.
68 * \returns AWH parameters.
70 AwhParams* readAwhParams(std::vector<t_inpfile>* inp, warninp_t wi);
72 /*! \brief Check the AWH parameters.
74 * \param[in,out] awhParams The AWH parameters.
75 * \param[in] inputrec Input parameter struct.
76 * \param[in,out] wi Struct for bookeeping warnings.
78 void checkAwhParams(const AwhParams* awhParams, const t_inputrec* inputrec, warninp_t wi);
82 * Sets AWH parameters that need state parameters such as the box vectors.
84 * \param[in,out] awhParams AWH parameters.
85 * \param[in] pull_params Pull parameters.
86 * \param[in,out] pull_work Pull working struct to register AWH bias in.
87 * \param[in] box Box vectors.
88 * \param[in] pbcType Periodic boundary conditions enum.
89 * \param[in] compressibility Compressibility matrix for pressure coupling, pass all 0 without pressure coupling
90 * \param[in] inputrecGroupOptions Parameters for atom groups.
91 * \param[in] initLambda The starting lambda, to allow using free energy lambda as reaction coordinate
92 * provider in any dimension.
93 * \param[in] mtop The system topology.
94 * \param[in,out] wi Struct for bookeeping warnings.
96 * \note This function currently relies on the function set_pull_init to have been called.
98 void setStateDependentAwhParams(AwhParams* awhParams,
99 const pull_params_t& pull_params,
103 const tensor& compressibility,
104 const t_grpopts* inputrecGroupOptions,
106 const gmx_mtop_t& mtop,
111 #endif /* GMX_AWH_READPARAMS_H */