Gromacs
5.1.5
|
#include "config.h"
#include <stdio.h>
#include "gromacs/fft/parallel_3dfft.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/typedefs.h"
#include "gromacs/math/gmxcomplex.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/timing/walltime_accounting.h"
#include "gromacs/utility/gmxmpi.h"
This file contains function declarations necessary for computing energies and forces for the PME long-ranged part (Coulomb and LJ).
Macros | |
#define | PME_ORDER_MAX 12 |
We only define a maximum to be able to use local arrays without allocation. An order larger than 12 should never be needed, even for test cases. If needed it can be changed here. | |
#define | PME_GRID_QA 0 |
Grid indices for A state for charge and Lennard-Jones C6. | |
#define | PME_GRID_C6A 2 |
#define | DO_Q 2 /* Electrostatic grids have index q<2 */ |
Flags that indicate the number of PME grids in use. | |
#define | DO_Q_AND_LJ 4 /* non-LB LJ grids have index 2 <= q < 4 */ |
#define | DO_Q_AND_LJ_LB 9 /* With LB rules we need a total of 2+7 grids */ |
Typedefs | |
typedef struct gmx_pme_pp * | gmx_pme_pp_t |
Abstract type for PME <-> PP communication. | |
Enumerations | |
enum | { pmerecvqxX, pmerecvqxFINISH, pmerecvqxSWITCHGRID, pmerecvqxRESETCOUNTERS } |
Return values for gmx_pme_recv_q_x. | |
Functions | |
int | gmx_pme_reinit (struct gmx_pme_t **pmedata, t_commrec *cr, struct gmx_pme_t *pme_src, const t_inputrec *ir, ivec grid_size) |
As gmx_pme_init, but takes most settings, except the grid, from pme_src. | |
void | gmx_pme_check_restrictions (int pme_order, int nkx, int nky, int nkz, int nnodes_major, int nnodes_minor, gmx_bool bUseThreads, gmx_bool bFatal, gmx_bool *bValidSettings) |
Check restrictions on pme_order and the PME grid nkx,nky,nkz. More... | |
gmx_pme_pp_t | gmx_pme_pp_init (t_commrec *cr) |
Initialize the PME-only side of the PME <-> PP communication. | |
void | gmx_pme_send_switchgrid (t_commrec *cr, ivec grid_size, real ewaldcoeff_q, real ewaldcoeff_lj) |
Tell our PME-only node to switch to a new grid size. | |
int | gmx_pme_recv_coeffs_coords (struct gmx_pme_pp *pme_pp, int *natoms, real **chargeA, real **chargeB, real **sqrt_c6A, real **sqrt_c6B, real **sigmaA, real **sigmaB, matrix box, rvec **x, rvec **f, int *maxshift_x, int *maxshift_y, gmx_bool *bFreeEnergy_q, gmx_bool *bFreeEnergy_lj, real *lambda_q, real *lambda_lj, gmx_bool *bEnerVir, int *pme_flags, gmx_int64_t *step, ivec grid_size, real *ewaldcoeff_q, real *ewaldcoeff_lj) |
Called by PME-only ranks to receive coefficients and coordinates. More... | |
void | gmx_pme_send_force_vir_ener (struct gmx_pme_pp *pme_pp, rvec *f, matrix vir_q, real energy_q, matrix vir_lj, real energy_lj, real dvdlambda_q, real dvdlambda_lj, float cycles) |
Send the PME mesh force, virial and energy to the PP-only nodes. | |
Variables | |
static const real | lb_scale_factor [] |
Pascal triangle coefficients scaled with (1/2)^6 for LJ-PME with LB-rules. More... | |
static const real | lb_scale_factor_symm [] = { 2.0/64, 12.0/64, 30.0/64, 20.0/64 } |
Pascal triangle coefficients used in solve_pme_lj_yzx, only need to do 4 calculations due to symmetry. | |
void gmx_pme_check_restrictions | ( | int | pme_order, |
int | nkx, | ||
int | nky, | ||
int | nkz, | ||
int | nnodes_major, | ||
int | nnodes_minor, | ||
gmx_bool | bUseThreads, | ||
gmx_bool | bFatal, | ||
gmx_bool * | bValidSettings | ||
) |
Check restrictions on pme_order and the PME grid nkx,nky,nkz.
With bFatal=TRUE, a fatal error is generated on violation, bValidSettings=NULL can be passed. With bFatal=FALSE, *bValidSettings reports the validity of the settings. bUseThreads tells if any MPI rank doing PME uses more than 1 threads. If at calling you bUseThreads is unknown, pass TRUE for conservative checking.
int gmx_pme_recv_coeffs_coords | ( | struct gmx_pme_pp * | pme_pp, |
int * | natoms, | ||
real ** | chargeA, | ||
real ** | chargeB, | ||
real ** | sqrt_c6A, | ||
real ** | sqrt_c6B, | ||
real ** | sigmaA, | ||
real ** | sigmaB, | ||
matrix | box, | ||
rvec ** | x, | ||
rvec ** | f, | ||
int * | maxshift_x, | ||
int * | maxshift_y, | ||
gmx_bool * | bFreeEnergy_q, | ||
gmx_bool * | bFreeEnergy_lj, | ||
real * | lambda_q, | ||
real * | lambda_lj, | ||
gmx_bool * | bEnerVir, | ||
int * | pme_flags, | ||
gmx_int64_t * | step, | ||
ivec | grid_size, | ||
real * | ewaldcoeff_q, | ||
real * | ewaldcoeff_lj | ||
) |
Called by PME-only ranks to receive coefficients and coordinates.
The return value is used to control further processing, with meanings: pmerecvqxX: all parameters set, chargeA and chargeB can be NULL pmerecvqxFINISH: no parameters set pmerecvqxSWITCHGRID: only grid_size and *ewaldcoeff are set pmerecvqxRESETCOUNTERS: *step is set
|
static |
Pascal triangle coefficients scaled with (1/2)^6 for LJ-PME with LB-rules.