From 87f0b4190e3cb517b66d443c8cf8f36f3f18d532 Mon Sep 17 00:00:00 2001 From: David van der Spoel Date: Fri, 20 Nov 2015 19:19:36 +0100 Subject: [PATCH] Merged genborn.h from legacyheaders/types into mdlib/genborn.h Part of #1415. Change-Id: I2c9dcb827219649791183d016bf07d056a9ca049 --- src/gromacs/legacyheaders/types/forcerec.h | 4 +- src/gromacs/legacyheaders/types/genborn.h | 119 ----------------------------- src/gromacs/legacyheaders/types/qmmmrec.h | 1 + src/gromacs/mdlib/genborn.h | 67 ++++++++++++++++ 4 files changed, 70 insertions(+), 121 deletions(-) delete mode 100644 src/gromacs/legacyheaders/types/genborn.h diff --git a/src/gromacs/legacyheaders/types/forcerec.h b/src/gromacs/legacyheaders/types/forcerec.h index 8e847d9f7e..a03d1c92bb 100644 --- a/src/gromacs/legacyheaders/types/forcerec.h +++ b/src/gromacs/legacyheaders/types/forcerec.h @@ -38,7 +38,6 @@ #ifndef GMX_LEGACYHEADERS_TYPES_FORCEREC_H #define GMX_LEGACYHEADERS_TYPES_FORCEREC_H -#include "gromacs/legacyheaders/types/genborn.h" #include "gromacs/legacyheaders/types/hw_info.h" #include "gromacs/legacyheaders/types/interaction_const.h" #include "gromacs/legacyheaders/types/qmmmrec.h" @@ -56,6 +55,7 @@ extern "C" { #endif /* Abstract type for PME that is defined only in the routine that use them. */ +struct gmx_genborn_t; struct gmx_ns_t; struct gmx_pme_t; struct nonbonded_verlet_t; @@ -365,7 +365,7 @@ typedef struct t_forcerec { /* Implicit solvent - overlap for HCT model */ real *atype_S_hct; /* Generalized born interaction data */ - gmx_genborn_t *born; + struct gmx_genborn_t *born; /* Table scale for GB */ real gbtabscale; diff --git a/src/gromacs/legacyheaders/types/genborn.h b/src/gromacs/legacyheaders/types/genborn.h deleted file mode 100644 index 21c3c83783..0000000000 --- a/src/gromacs/legacyheaders/types/genborn.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * This file is part of the GROMACS molecular simulation package. - * - * Copyright (c) 1991-2000, University of Groningen, The Netherlands. - * Copyright (c) 2001-2008, The GROMACS development team. - * Copyright (c) 2010,2014,2015, by the GROMACS development team, led by - * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, - * and including many others, as listed in the AUTHORS file in the - * top-level source directory and at http://www.gromacs.org. - * - * GROMACS is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * GROMACS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with GROMACS; if not, see - * http://www.gnu.org/licenses, or write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * If you want to redistribute modifications to GROMACS, please - * consider that scientific software is very special. Version - * control is crucial - bugs must be traceable. We will be happy to - * consider code for inclusion in the official distribution, but - * derived work must not be called official GROMACS. Details are found - * in the README & COPYING files - if they are missing, get the - * official version at http://www.gromacs.org. - * - * To help us fund GROMACS development, we humbly ask that you cite - * the research papers on the package. Check out http://www.gromacs.org. - */ - -#ifndef GMX_LEGACYHEADERS_TYPES_GENBORN_H -#define GMX_LEGACYHEADERS_TYPES_GENBORN_H - -#include "gromacs/math/vectypes.h" -#include "gromacs/utility/real.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct -{ - int nbonds; - int bond[10]; - real length[10]; -} genborn_bonds_t; - -typedef struct gbtmpnbls *gbtmpnbls_t; - -/* Struct to hold all the information for GB */ -typedef struct gmx_genborn_t -{ - int nr; /* number of atoms, length of arrays below */ - int n12; /* number of 1-2 (bond) interactions */ - int n13; /* number of 1-3 (angle) terms */ - int n14; /* number of 1-4 (torsion) terms */ - int nalloc; /* Allocation of local arrays (with DD) */ - - - /* Arrays below that end with _globalindex are used for setting up initial values of - * all gb parameters and values. They all have length natoms, which for DD is the - * global atom number. - * Values are then taken from these arrays to local copies, that have names without - * _globalindex, in the routine make_local_gb(), which is called once for single - * node runs, and for DD at every call to dd_partition_system - */ - - real *gpol; /* Atomic polarisation energies */ - real *gpol_globalindex; /* */ - real *gpol_still_work; /* Work array for Still model */ - real *gpol_hct_work; /* Work array for HCT/OBC models */ - real *bRad; /* Atomic Born radii */ - real *vsolv; /* Atomic solvation volumes */ - real *vsolv_globalindex; /* */ - real *gb_radius; /* Radius info, copied from atomtypes */ - real *gb_radius_globalindex; - - int *use; /* Array that till if this atom does GB */ - int *use_globalindex; /* Global array for parallelization */ - - real es; /* Solvation energy and derivatives */ - real *asurf; /* Atomic surface area */ - rvec *dasurf; /* Surface area derivatives */ - real as; /* Total surface area */ - - real *drobc; /* Parameters for OBC chain rule calculation */ - real *param; /* Precomputed factor rai*atype->S_hct for HCT/OBC */ - real *param_globalindex; /* */ - - real *log_table; /* Table for logarithm lookup */ - - real obc_alpha; /* OBC parameters */ - real obc_beta; /* OBC parameters */ - real obc_gamma; /* OBC parameters */ - real gb_doffset; /* Dielectric offset for Still/HCT/OBC */ - real gb_epsilon_solvent; /* */ - real epsilon_r; /* Used for inner dielectric */ - - real sa_surface_tension; /* Surface tension for non-polar solvation */ - - real *work; /* Used for parallel summation and in the chain rule, length natoms */ - real *buf; /* Used for parallel summation and in the chain rule, length natoms */ - int *count; /* Used for setting up the special gb nblist, length natoms */ - gbtmpnbls_t nblist_work; /* Used for setting up the special gb nblist, dim natoms*nblist_work_nalloc */ - int nblist_work_nalloc; /* Length of second dimension of nblist_work */ -} -gmx_genborn_t; - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/gromacs/legacyheaders/types/qmmmrec.h b/src/gromacs/legacyheaders/types/qmmmrec.h index 73796d55df..77797606d7 100644 --- a/src/gromacs/legacyheaders/types/qmmmrec.h +++ b/src/gromacs/legacyheaders/types/qmmmrec.h @@ -38,6 +38,7 @@ #ifndef GMX_LEGACYHEADERS_TYPES_QMMMREC_H #define GMX_LEGACYHEADERS_TYPES_QMMMREC_H +#include "gromacs/math/vectypes.h" #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/real.h" diff --git a/src/gromacs/mdlib/genborn.h b/src/gromacs/mdlib/genborn.h index 153f7c923b..b68f0db515 100644 --- a/src/gromacs/mdlib/genborn.h +++ b/src/gromacs/mdlib/genborn.h @@ -53,6 +53,73 @@ struct t_nblist; struct t_nrnb; struct t_pbc; +typedef struct +{ + int nbonds; + int bond[10]; + real length[10]; +} genborn_bonds_t; + +typedef struct gbtmpnbls *gbtmpnbls_t; + +/* Struct to hold all the information for GB */ +typedef struct gmx_genborn_t +{ + int nr; /* number of atoms, length of arrays below */ + int n12; /* number of 1-2 (bond) interactions */ + int n13; /* number of 1-3 (angle) terms */ + int n14; /* number of 1-4 (torsion) terms */ + int nalloc; /* Allocation of local arrays (with DD) */ + + + /* Arrays below that end with _globalindex are used for setting up initial values of + * all gb parameters and values. They all have length natoms, which for DD is the + * global atom number. + * Values are then taken from these arrays to local copies, that have names without + * _globalindex, in the routine make_local_gb(), which is called once for single + * node runs, and for DD at every call to dd_partition_system + */ + + real *gpol; /* Atomic polarisation energies */ + real *gpol_globalindex; /* */ + real *gpol_still_work; /* Work array for Still model */ + real *gpol_hct_work; /* Work array for HCT/OBC models */ + real *bRad; /* Atomic Born radii */ + real *vsolv; /* Atomic solvation volumes */ + real *vsolv_globalindex; /* */ + real *gb_radius; /* Radius info, copied from atomtypes */ + real *gb_radius_globalindex; + + int *use; /* Array that till if this atom does GB */ + int *use_globalindex; /* Global array for parallelization */ + + real es; /* Solvation energy and derivatives */ + real *asurf; /* Atomic surface area */ + rvec *dasurf; /* Surface area derivatives */ + real as; /* Total surface area */ + + real *drobc; /* Parameters for OBC chain rule calculation */ + real *param; /* Precomputed factor rai*atype->S_hct for HCT/OBC */ + real *param_globalindex; /* */ + + real *log_table; /* Table for logarithm lookup */ + + real obc_alpha; /* OBC parameters */ + real obc_beta; /* OBC parameters */ + real obc_gamma; /* OBC parameters */ + real gb_doffset; /* Dielectric offset for Still/HCT/OBC */ + real gb_epsilon_solvent; /* */ + real epsilon_r; /* Used for inner dielectric */ + + real sa_surface_tension; /* Surface tension for non-polar solvation */ + + real *work; /* Used for parallel summation and in the chain rule, length natoms */ + real *buf; /* Used for parallel summation and in the chain rule, length natoms */ + int *count; /* Used for setting up the special gb nblist, length natoms */ + gbtmpnbls_t nblist_work; /* Used for setting up the special gb nblist, dim natoms*nblist_work_nalloc */ + int nblist_work_nalloc; /* Length of second dimension of nblist_work */ +} +gmx_genborn_t; /* Still parameters - make sure to edit in genborn_sse.c too if you change these! */ #define STILL_P1 0.073*0.1 /* length */ #define STILL_P2 0.921*0.1*CAL2JOULE /* energy*length */ -- 2.11.4.GIT