Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / mdlib / qmmm.h
index ffa98d352ba2ea70fd9fe811bc23290ab9dda782..8172e9766007e9b1f51e3c48f455e8dbc4a0facd 100644 (file)
@@ -60,71 +60,71 @@ namespace gmx
 class ForceWithShiftForces;
 }
 
-typedef struct {
-    int                nrQMatoms;      /* total nr of QM atoms              */
-    rvec              *xQM;            /* shifted to center of box          */
-    int               *indexQM;        /* atom i = atom indexQM[i] in mdrun */
-    int               *atomicnumberQM; /* atomic numbers of QM atoms        */
-    real              *QMcharges;      /* atomic charges of QM atoms(ONIOM) */
-    int               *shiftQM;
-    int                QMcharge;       /* charge of the QM system           */
-    int                multiplicity;   /* multipicity (no of unpaired eln)  */
-    int                QMmethod;       /* see enums.h for all methods       */
-    int                QMbasis;        /* see enums.h for all bases         */
-    int                nelectrons;     /* total number of elecs in QM region*/
+typedef struct
+{
+    int   nrQMatoms;      /* total nr of QM atoms              */
+    rvec* xQM;            /* shifted to center of box          */
+    int*  indexQM;        /* atom i = atom indexQM[i] in mdrun */
+    int*  atomicnumberQM; /* atomic numbers of QM atoms        */
+    real* QMcharges;      /* atomic charges of QM atoms(ONIOM) */
+    int*  shiftQM;
+    int   QMcharge;     /* charge of the QM system           */
+    int   multiplicity; /* multipicity (no of unpaired eln)  */
+    int   QMmethod;     /* see enums.h for all methods       */
+    int   QMbasis;      /* see enums.h for all bases         */
+    int   nelectrons;   /* total number of elecs in QM region*/
     /* Gaussian specific stuff */
-    int                nQMcpus;        /* no. of CPUs used for the QM calc. */
-    int                QMmem;          /* memory for the gaussian calc.     */
-    int                accuracy;       /* convergence criterium (E(-x))     */
-    gmx_bool           cpmcscf;        /* using cpmcscf(l1003)*/
-    char              *gauss_dir;
-    char              *gauss_exe;
-    char              *devel_dir;
-    char              *orca_basename; /* basename for I/O with orca        */
-    char              *orca_dir;      /* directory for ORCA                */
+    int      nQMcpus;  /* no. of CPUs used for the QM calc. */
+    int      QMmem;    /* memory for the gaussian calc.     */
+    int      accuracy; /* convergence criterium (E(-x))     */
+    gmx_bool cpmcscf;  /* using cpmcscf(l1003)*/
+    char*    gauss_dir;
+    char*    gauss_exe;
+    char*    devel_dir;
+    char*    orca_basename; /* basename for I/O with orca        */
+    char*    orca_dir;      /* directory for ORCA                */
     /* Surface hopping stuff */
-    gmx_bool           bSH;           /* surface hopping (diabatic only)   */
-    real               SAon;          /* at which energy gap the SA starts */
-    real               SAoff;         /* at which energy gap the SA stops  */
-    int                SAsteps;       /* stepwise switchinng on the SA     */
-    int                SAstep;        /* current state of SA               */
-    int                CIdim;
-    real              *CIvec1;
-    real              *CIvec2;
-    real              *CIvec1old;
-    real              *CIvec2old;
-    ivec               SHbasis;
-    int                CASelectrons;
-    int                CASorbitals;
+    gmx_bool bSH;     /* surface hopping (diabatic only)   */
+    real     SAon;    /* at which energy gap the SA starts */
+    real     SAoff;   /* at which energy gap the SA stops  */
+    int      SAsteps; /* stepwise switchinng on the SA     */
+    int      SAstep;  /* current state of SA               */
+    int      CIdim;
+    real*    CIvec1;
+    real*    CIvec2;
+    real*    CIvec1old;
+    real*    CIvec2old;
+    ivec     SHbasis;
+    int      CASelectrons;
+    int      CASorbitals;
 } t_QMrec;
 
-typedef struct {
-    int            nrMMatoms;   /* nr of MM atoms, updated every step*/
-    rvec          *xMM;         /* shifted to center of box          */
-    int           *indexMM;     /* atom i = atom indexMM[I] in mdrun */
-    real          *MMcharges;   /* MM point charges in std QMMM calc.*/
-    int           *shiftMM;
-    int           *MMatomtype;  /* only important for semi-emp.      */
-    real           scalefactor;
+typedef struct
+{
+    int   nrMMatoms; /* nr of MM atoms, updated every step*/
+    rvec* xMM;       /* shifted to center of box          */
+    int*  indexMM;   /* atom i = atom indexMM[I] in mdrun */
+    real* MMcharges; /* MM point charges in std QMMM calc.*/
+    int*  shiftMM;
+    int*  MMatomtype; /* only important for semi-emp.      */
+    real  scalefactor;
 } t_MMrec;
 
 
-typedef struct t_QMMMrec {
-    int             QMMMscheme; /* ONIOM (multi-layer) or normal          */
-    int             nrQMlayers; /* number of QM layers (total layers +1 (MM)) */
-    t_QMrec       **qm;         /* atoms and run params for each QM group */
-    t_MMrec        *mm;         /* there can only be one MM subsystem !   */
+typedef struct t_QMMMrec
+{
+    int       QMMMscheme; /* ONIOM (multi-layer) or normal          */
+    int       nrQMlayers; /* number of QM layers (total layers +1 (MM)) */
+    t_QMrec** qm;         /* atoms and run params for each QM group */
+    t_MMrec*  mm;         /* there can only be one MM subsystem !   */
 } t_QMMMrec;
 
-void atomic_number(int nr, char ***atomtype, int *nucnum);
+void atomic_number(int nr, char*** atomtype, int* nucnum);
 
-t_QMMMrec *mk_QMMMrec();
+t_QMMMrecmk_QMMMrec();
 /* allocates memory for QMMMrec */
 
-void init_QMMMrec(const t_commrec  *cr,
-                  const gmx_mtop_t *mtop,
-                  const t_inputrec *ir,
-                  const t_forcerec *fr);
+void init_QMMMrec(const t_commrec* cr, const gmx_mtop_t* mtop, const t_inputrec* ir, const t_forcerec* fr);
 
 /* init_QMMMrec initializes the QMMM record. From
  * topology->atoms.atomname and topology->atoms.atomtype the atom
@@ -132,20 +132,14 @@ void init_QMMMrec(const t_commrec  *cr,
  * resp. inputrec->QMmult the nelecs and multiplicity are determined
  * and md->cQMMM gives numbers of the MM and QM atoms
  */
-void update_QMMMrec(const t_commrec  *cr,
-                    const t_forcerec *fr,
-                    const rvec       *x,
-                    const t_mdatoms  *md,
-                    const matrix      box);
+void update_QMMMrec(const t_commrec* cr, const t_forcerec* fr, const rvec* x, const t_mdatoms* md, const matrix box);
 
 /* update_QMMMrec fills the MM stuff in QMMMrec. The MM atoms are
  * taken froom the neighbourlists of the QM atoms. In a QMMM run this
  * routine should be called at every step, since it updates the MM
  * elements of the t_QMMMrec struct.
  */
-real calculate_QMMM(const t_commrec           *cr,
-                    gmx::ForceWithShiftForces *forceWithShiftForces,
-                    const t_forcerec          *fr);
+real calculate_QMMM(const t_commrec* cr, gmx::ForceWithShiftForces* forceWithShiftForces, const t_forcerec* fr);
 
 /* QMMM computes the QM forces. This routine makes either function
  * calls to gmx QM routines (derived from MOPAC7 (semi-emp.) and MPQC
@@ -161,7 +155,7 @@ real calculate_QMMM(const t_commrec           *cr,
  * \param[in] ir   Inputrec used in simulation.
  * \returns Vector of atoms.
  */
-std::vector<int> qmmmAtomIndices(const t_inputrec &ir, const gmx_mtop_t &mtop);
+std::vector<int> qmmmAtomIndices(const t_inputrec& ir, const gmx_mtop_t& mtop);
 
 /*! \brief
  * Remove charges from QMMM atoms.
@@ -169,6 +163,6 @@ std::vector<int> qmmmAtomIndices(const t_inputrec &ir, const gmx_mtop_t &mtop);
  * \param[in] mtop Topology used for removing atoms.
  * \param[in] qmmmAtoms ArrayRef to vector conatining qmmm atom indices.
  */
-void removeQmmmAtomCharges(gmx_mtop_t *mtop, gmx::ArrayRef<const int> qmmmAtoms);
+void removeQmmmAtomCharges(gmx_mtop_tmtop, gmx::ArrayRef<const int> qmmmAtoms);
 
 #endif