########################################################################
SET(SHARED_LIBS_DEFAULT ON)
IF( WIN32 AND NOT CYGWIN)
- option(GMX_PREFER_STATIC_LIBS "When finding libraries prefer static system libraries (MT instead of MD)!" ON)
- mark_as_advanced(GMX_PREFER_STATIC_LIBS)
- SET(SHARED_LIBS_DEFAULT OFF) #is currently not working on Windows
+ if (NOT BUILD_SHARED_LIBS)
+ option(GMX_PREFER_STATIC_LIBS "When finding libraries prefer static system libraries (MT instead of MD)!" ON)
+ mark_as_advanced(GMX_PREFER_STATIC_LIBS)
+ SET(SHARED_LIBS_DEFAULT OFF)
+ else()
+ add_definitions(-DUSE_VISIBILITY -DTMPI_USE_VISIBILITY)
+ endif()
IF (GMX_PREFER_STATIC_LIBS)
#Only setting Debug and Release flags. Others configurations current not used.
#ifndef _3dview_h
#define _3dview_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
mat4 RotM[DIM];
} t_3dview;
+GMX_LIBGMX_EXPORT
extern void print_m4(FILE *fp,const char *s,mat4 A);
extern void print_v4(FILE *fp,char *s,int dim,real *a);
+GMX_LIBGMX_EXPORT
extern void m4_op(mat4 m,rvec x,vec4 v);
extern void unity_m4(mat4 m);
+GMX_LIBGMX_EXPORT
extern void mult_matrix(mat4 A, mat4 B, mat4 C);
+GMX_LIBGMX_EXPORT
extern void rotate(int axis, real angle, mat4 A);
+GMX_LIBGMX_EXPORT
extern void translate(real tx, real ty, real tz, mat4 A);
+GMX_LIBGMX_EXPORT
extern void m4_op(mat4 m,rvec x,vec4 v);
extern void calculate_view(t_3dview *view);
#ifndef _atomprop_h
#define _atomprop_h
-
+#include "visibility.h"
#ifdef __cplusplus
extern "C" {
#endif
enum { epropMass, epropVDW, epropDGsol, epropElectroneg, epropElement,
epropNR };
+GMX_LIBGMX_EXPORT
gmx_atomprop_t gmx_atomprop_init(void);
/* Initializes and returns the atom properties struct */
+GMX_LIBGMX_EXPORT
void gmx_atomprop_destroy(gmx_atomprop_t aps);
/* Get rid of memory after use */
int gmx_atomprop_atomnumber(gmx_atomprop_t aps,const char *element);
+GMX_LIBGMX_EXPORT
gmx_bool gmx_atomprop_query(gmx_atomprop_t aps,
int eprop,const char *resnm,const char *atomnm,
real *value);
#include <stdio.h>
+#include "visibility.h"
#include "typedefs.h"
#include "nrnb.h"
#include "pbc.h"
* When global_atom_index=NULL returns i+1.
*/
+GMX_LIBGMX_EXPORT
void calc_bonds(FILE *fplog,const gmx_multisim_t *ms,
const t_idef *idef,
rvec x[],history_t *hist,
* the total potential energy (sum over epot).
*/
+GMX_LIBGMX_EXPORT
void calc_bonds_lambda(FILE *fplog,
const t_idef *idef,
rvec x[],
* The shift forces in fr are not affected.
*/
+GMX_LIBGMX_EXPORT
real posres(int nbonds,
const t_iatom forceatoms[],const t_iparams forceparams[],
const rvec x[],rvec f[],rvec vir_diag,
int refcoord_scaling,int ePBC,rvec comA,rvec comB);
/* Position restraints require a different pbc treatment from other bondeds */
+GMX_LIBGMX_EXPORT
real bond_angle(const rvec xi,const rvec xj,const rvec xk,
const t_pbc *pbc,
rvec r_ij,rvec r_kj,real *costh,
int *t1,int *t2); /* out */
/* Calculate bond-angle. No PBC is taken into account (use mol-shift) */
+GMX_LIBGMX_EXPORT
real dih_angle(const rvec xi,const rvec xj,const rvec xk,const rvec xl,
const t_pbc *pbc,
rvec r_ij,rvec r_kj,rvec r_kl,rvec m,rvec n, /* out */
* over threads. This should be called each time the bonded setup
* changes; i.e. at start-up without domain decomposition and at DD.
*/
+GMX_LIBGMX_EXPORT
void init_bonded_thread_force_reduction(t_forcerec *fr,
const t_idef *idef);
* And Hey:
* Gromacs Runs On Most of All Computer Systems
*/
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
real calc_grid(FILE *fp,
matrix box,real gr_sp,
int *nx,int *ny,int *nz);
#ifndef _calch_h
#define _calch_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
void calc_h_pos(int nht, rvec xa[], rvec xh[], int *l);
/*
* w.f. van gunsteren, groningen, july 1981
#ifndef _chargegroup_h
#define _chargegroup_h
-
+#include "visibility.h"
#include "sysstuff.h"
#include "typedefs.h"
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
void calc_chargegroup_radii(const gmx_mtop_t *mtop,rvec *x,
real *rvdw1,real *rvdw2,
real *rcoul1,real *rcoul2);
* separately for VdW and Coulomb interactions.
*/
+GMX_LIBGMX_EXPORT
void calc_cgcm(FILE *log,int cg0,int cg1,t_block *cgs,
rvec pos[],rvec cg_cm[]);
/* Routine to compute centers of geometry of charge groups. No periodicity
* is used.
*/
+GMX_LIBGMX_EXPORT
void put_charge_groups_in_box (FILE *log,int cg0,int cg1,
int ePBC,matrix box,t_block *cgs,
rvec pos[],
#ifndef _checkpoint_h
#define _checkpoint_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "gmxfio.h"
* Appends the _step<step>.cpt with bNumberAndKeep,
* otherwise moves the previous <fn>.cpt to <fn>_prev.cpt
*/
+GMX_LIBGMX_EXPORT
void write_checkpoint(const char *fn,gmx_bool bNumberAndKeep,
FILE *fplog,t_commrec *cr,
int eIntegrator, int simulation_part,
* With bAppend and bForceAppend: truncate anyhow if the system does not
* support file locking.
*/
+GMX_LIBGMX_EXPORT
void load_checkpoint(const char *fn,FILE **fplog,
t_commrec *cr,gmx_bool bPartDecomp,ivec dd_nc,
t_inputrec *ir,t_state *state,gmx_bool *bReadRNG,
* If bReadRNG=TRUE a RNG state compatible with the current
* number of nodes was read.
*/
+GMX_LIBGMX_EXPORT
void read_checkpoint_state(const char *fn,int *simulation_part,
gmx_large_int_t *step,double *t,t_state *state);
void read_checkpoint_trxframe(t_fileio *fp,t_trxframe *fr);
/* Print the complete contents of checkpoint file fn to out */
+GMX_LIBGMX_EXPORT
void list_checkpoint(const char *fn,FILE *out);
/* Read just the simulation 'generation' and with bAppendReq check files.
* When TRUE is returned, bAddPart will tell whether the simulation part
* needs to be added to the output file name.
*/
+GMX_LIBGMX_EXPORT
gmx_bool read_checkpoint_simulation_part(const char *filename,int *simulation_part,
gmx_large_int_t *step,t_commrec *cr,
gmx_bool bAppendReq,
#ifndef _confio_h
#define _confio_h
-
+#include "visibility.h"
#include "typedefs.h"
/* For reading coordinate files it is assumed that enough memory
* title, atoms, x, v can all be NULL, in which case they won't be read *
* line holds the previous line for trajectory reading */
+GMX_LIBGMX_EXPORT
void write_g96_conf(FILE *out,t_trxframe *fr,int nindex,atom_id *index);
/* write a Gromos96 coordinate file or trajectory frame *
* index can be NULL */
int nx,atom_id index[],int ndec,
rvec *x,rvec *v,matrix box);
+GMX_LIBGMX_EXPORT
void write_hconf_p(FILE *out,const char *title,t_atoms *atoms, int ndec,
rvec *x,rvec *v,matrix box);
/* Write a Gromos file with precision ndec: number of decimal places in x,
* v has one place more. */
+GMX_LIBGMX_EXPORT
void write_sto_conf_indexed(const char *outfile,const char *title,
t_atoms *atoms,
rvec x[],rvec *v,int ePBC,matrix box,
atom_id nindex,atom_id index[]);
/* like write_sto_conf, but indexed */
+GMX_LIBGMX_EXPORT
void write_sto_conf(const char *outfile,const char *title,
t_atoms *atoms,
rvec x[],rvec *v,int ePBC,matrix box);
/* write atoms, x, v (if .gro and not NULL) and box (if not NULL)
* to an STO (.gro or .pdb) file */
+GMX_LIBGMX_EXPORT
void write_sto_conf_mtop(const char *outfile,const char *title,
gmx_mtop_t *mtop,
rvec x[],rvec *v,int ePBC,matrix box);
/* As write_sto_conf, but uses a gmx_mtop_t struct */
+GMX_LIBGMX_EXPORT
void get_stx_coordnum (const char *infile,int *natoms);
/* read the number of atoms from an STX file */
+GMX_LIBGMX_EXPORT
void read_stx_conf(const char *infile,char *title,
t_atoms *atoms,
rvec x[],rvec *v,int *ePBC,matrix box);
#ifndef _constr_h
#define _constr_h
+#include "visibility.h"
#include "typedefs.h"
#include "types/commrec.h"
econqForceDispl /* Constrain forces (mass-weighted 1/0 for freeze) */
};
+GMX_LIBMD_EXPORT
int n_flexible_constraints(struct gmx_constr *constr);
/* Returns the total number of flexible constraints in the system */
*
*/
+GMX_LIBMD_EXPORT
gmx_constr_t init_constraints(FILE *log,
gmx_mtop_t *mtop,t_inputrec *ir,
gmx_edsam_t ed,t_state *state,
t_commrec *cr);
/* Initialize constraints stuff */
+GMX_LIBMD_EXPORT
void set_constraints(gmx_constr_t constr,
gmx_localtop_t *top,
t_inputrec *ir,
* Returns NULL when LINCS is not used.
*/
+GMX_LIBMD_EXPORT
real constr_rmsd(gmx_constr_t constr,gmx_bool bSD2);
/* Return the RMSD of the constraint, bSD2 selects the second SD step */
#ifndef _copyrite_h
#define _copyrite_h
-
+#include "visibility.h"
#include <stdio.h>
#include "types/simple.h"
#endif
/* Has to be a function, so we can get version number from autoconf */
+GMX_LIBGMX_EXPORT
const char *GromacsVersion(void);
void
void
pr_difftime(FILE *out,double dt);
+GMX_LIBGMX_EXPORT
void
CopyRight(FILE *out,const char *szProgram);
* is necessary to make the routines threadsafe and avoid allocating
* a new string each time. The retstring pointer will be the return value.
*/
+GMX_LIBGMX_EXPORT
void
bromacs(char *retstring, int retsize);
/* For cool_quote, the number of the quote used will be returned in cqnum
* if it is non-NULL.
*/
+GMX_LIBGMX_EXPORT
void
cool_quote(char *retstring, int retsize, int *cqnum);
be_cool(void);
/* Return TRUE when the user is COOL, FALSE otherwise */
+GMX_LIBGMX_EXPORT
void
thanx(FILE *fp);
enum { eCITEGMX, eCITEBATH, eCITESHAKE, eCITESETTLE, eCITESOR,
eCITEDISRE, eCITERF, eCITELINCS, eCITENR };
+GMX_LIBGMX_EXPORT
void
please_cite(FILE *fp, const char *key);
/* Print a message asking to cite something... */
#ifndef _coulomb_h
#define _coulomb_h
-
+#include "visibility.h"
#include <stdio.h>
#include "typedefs.h"
#include "types/commrec.h"
FILE *fp);
/* initialize the ewald table (as found in the t_forcerec) */
+GMX_LIBGMX_EXPORT
real
calc_ewaldcoeff(real rc,real dtol);
/* Determines the Ewald parameter, both for Ewald and PME */
ewald_tab_t et);
/* Do an Ewald calculation for the long range electrostatics. */
+GMX_LIBGMX_EXPORT
real
ewald_LRcorrection(FILE *fp,
int start,int end,
* due to excluded pairs and/or surface dipole terms.
*/
+GMX_LIBGMX_EXPORT
real
ewald_charge_correction(t_commrec *cr,t_forcerec *fr,real lambda,matrix box,
real *dvdlambda,tensor vir);
/* Routines to set global constants for speeding up the calculation
* of potentials and forces.
*/
+GMX_LIBGMX_EXPORT
void
set_shift_consts(FILE *log,real r1,real rc,rvec box,
t_forcerec *fr);
#ifndef _disre_h
#define _disre_h
-
+#include "visibility.h"
#include "sysstuff.h"
#include "typedefs.h"
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
void init_disres(FILE *fplog,const gmx_mtop_t *mtop,
t_inputrec *ir,const t_commrec *cr,gmx_bool bPartDecomp,
t_fcdata *fcd,t_state *state);
* unless it was read before from a checkpoint file.
*/
+GMX_LIBGMX_EXPORT
void calc_disres_R_6(const gmx_multisim_t *ms,
int nfa,const t_iatom *fa,const t_iparams ip[],
const rvec *x,const t_pbc *pbc,
t_ifunc ta_disres;
/* Calculate the distance restraint forces, return the potential */
+GMX_LIBGMX_EXPORT
void update_disres_history(t_fcdata *fcd,history_t *hist);
/* Copy the new time averages that have been calculated in calc_disres_R_6 */
#ifndef _do_fit_h
#define _do_fit_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
real calc_similar_ind(gmx_bool bRho,int nind,atom_id *index,real mass[],
rvec x[],rvec xp[]);
/* Returns RMSD or Rho (depending on bRho) over all atoms in index */
+GMX_LIBGMX_EXPORT
real rmsdev_ind(int nind,atom_id index[],real mass[],
rvec x[],rvec xp[]);
/* Returns the RMS Deviation betweem x and xp over all atoms in index */
+GMX_LIBGMX_EXPORT
real rmsdev(int natoms,real mass[],rvec x[],rvec xp[]);
/* Returns the RMS Deviation betweem x and xp over all atoms */
* Maiorov & Crippen, PROTEINS 22, 273 (1995).
*/
+GMX_LIBGMX_EXPORT
void calc_fit_R(int ndim,int natoms,real *w_rls,rvec *xp,rvec *x,
matrix R);
/* Calculates the rotation matrix R for which
* x_rotated[i] = sum R[i][j]*x[j]
*/
+GMX_LIBGMX_EXPORT
void do_fit_ndim(int ndim,int natoms,real *w_rls,rvec *xp,rvec *x);
/* Do a least squares fit of x to xp. Atoms which have zero mass
* (w_rls[i]) are not taken into account in fitting.
* therefore both xp and x should be centered round the origin.
*/
+GMX_LIBGMX_EXPORT
void do_fit(int natoms,real *w_rls,rvec *xp,rvec *x);
/* Calls do_fit with ndim=3, thus fitting in 3D */
+GMX_LIBGMX_EXPORT
void reset_x_ndim(int ndim,int ncm,const atom_id *ind_cm,
int nreset,const atom_id *ind_reset,
rvec x[],const real mass[]);
* When ind_reset==NULL the coordinates up to nreset are reset.
*/
+GMX_LIBGMX_EXPORT
void reset_x(int ncm,const atom_id *ind_cm,
int nreset,const atom_id *ind_reset,
rvec x[],const real mass[]);
#ifndef _domdec_h
#define _domdec_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "types/commrec.h"
#include "vsite.h"
int dd_pme_maxshift_y(gmx_domdec_t *dd);
/* Returns the maximum shift for coordinate communication in PME, dim y */
+GMX_LIBMD_EXPORT
void make_dd_communicators(FILE *fplog,t_commrec *cr,int dd_node_order);
+GMX_LIBMD_EXPORT
gmx_domdec_t *
init_domain_decomposition(FILE *fplog,
t_commrec *cr,
gmx_ddbox_t *ddbox,
int *npme_x, int *npme_y);
+GMX_LIBMD_EXPORT
void dd_init_bondeds(FILE *fplog,
gmx_domdec_t *dd,gmx_mtop_t *mtop,
gmx_vsite_t *vsite,gmx_constr_t constr,
gmx_bool dd_bonded_molpbc(gmx_domdec_t *dd,int ePBC);
/* Returns if we need to do pbc for calculating bonded interactions */
+GMX_LIBMD_EXPORT
void set_dd_parameters(FILE *fplog,gmx_domdec_t *dd,real dlb_scale,
t_inputrec *ir,t_forcerec *fr,
gmx_ddbox_t *ddbox);
* should be called after calling dd_init_bondeds.
*/
+GMX_LIBMD_EXPORT
gmx_bool change_dd_cutoff(t_commrec *cr,t_state *state,t_inputrec *ir,
real cutoff_req );
/* Change the DD non-bonded communication cut-off.
* then FALSE will be returned and the cut-off is not modified.
*/
+GMX_LIBMD_EXPORT
void setup_dd_grid(FILE *fplog,gmx_domdec_t *dd);
void dd_collect_vec(gmx_domdec_t *dd,
t_state *state_local,rvec *lv,rvec *v);
+GMX_LIBMD_EXPORT
void dd_collect_state(gmx_domdec_t *dd,
t_state *state_local,t_state *state);
enum { ddCyclStep, ddCyclPPduringPME, ddCyclF, ddCyclPME, ddCyclNr };
+GMX_LIBMD_EXPORT
void dd_cycles_add(gmx_domdec_t *dd,float cycles,int ddCycl);
/* Add the wallcycle count to the DD counter */
void dd_force_flop_stop(gmx_domdec_t *dd,t_nrnb *nrnb);
/* Stop the force flop count */
+GMX_LIBMD_EXPORT
float dd_pme_f_ratio(gmx_domdec_t *dd);
/* Return the PME/PP force load ratio, or -1 if nothing was measured.
* Should only be called on the DD master node.
void dd_atom_sum_real(gmx_domdec_t *dd,real v[]);
/* Sum the contributions to a real for each atom over the neighboring cells. */
+GMX_LIBMD_EXPORT
void dd_partition_system(FILE *fplog,
gmx_large_int_t step,
t_commrec *cr,
* When f!=NULL, *f will be reallocated to the size of state_local.
*/
+GMX_LIBMD_EXPORT
void reset_dd_statistics_counters(gmx_domdec_t *dd);
/* Reset all the statistics and counters for total run counting */
gmx_localtop_t *ltop);
/* Sort ltop->ilist when we are doing free energy. */
+GMX_LIBMD_EXPORT
gmx_localtop_t *dd_init_local_top(gmx_mtop_t *top_global);
+GMX_LIBMD_EXPORT
void dd_init_local_state(gmx_domdec_t *dd,
t_state *state_global,t_state *local_state);
#ifndef _domdec_network_h
#define _domdec_network_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "types/commrec.h"
* The DD master node is the master for these operations.
*/
+GMX_LIBMD_EXPORT
void
dd_bcast(gmx_domdec_t *dd,int nbytes,void *data);
#ifndef _edsam_h
#define _edsam_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
t_commrec *cr,rvec xs[],rvec v[],matrix box,gmx_edsam_t ed);
/* Essential dynamics constraints, called from constrain() */
+GMX_LIBMD_EXPORT
gmx_edsam_t ed_open(int nfile,const t_filenm fnm[],unsigned long Flags,t_commrec *cr);
/* Sets the ED input/output filenames, opens output (.edo) file */
#ifndef _enxio_h
#define _enxio_h
-
+#include "visibility.h"
#include "sysstuff.h"
#include "typedefs.h"
#include "pbc.h"
};
/* names for the above enum */
+GMX_LIBGMX_EXPORT
extern const char *enx_block_id_name[];
/* initialize a pre-allocated frame */
+GMX_LIBGMX_EXPORT
void init_enxframe(t_enxframe *ef);
/* delete a frame's memory (except the ef itself) */
+GMX_LIBGMX_EXPORT
void free_enxframe(t_enxframe *ef);
+GMX_LIBGMX_EXPORT
ener_file_t open_enx(const char *fn,const char *mode);
+GMX_LIBGMX_EXPORT
t_fileio *enx_file_pointer(const ener_file_t ef);
+GMX_LIBGMX_EXPORT
void close_enx(ener_file_t ef);
+GMX_LIBGMX_EXPORT
void do_enxnms(ener_file_t ef,int *nre,gmx_enxnm_t **enms);
+GMX_LIBGMX_EXPORT
void free_enxnms(int n,gmx_enxnm_t *nms);
/* Frees nms and all strings in it */
+GMX_LIBGMX_EXPORT
gmx_bool do_enx(ener_file_t ef,t_enxframe *fr);
/* Reads enx_frames, memory in fr is (re)allocated if necessary */
+GMX_LIBGMX_EXPORT
void get_enx_state(const char *fn, real t,
gmx_groups_t *groups, t_inputrec *ir,
t_state *state);
/* block funtions */
/* allocate n blocks to a frame (if neccesary). Don't touch existing blocks */
+GMX_LIBGMX_EXPORT
void add_blocks_enxframe(t_enxframe *ef, int n);
/* find a block by id number; if prev!=NULL, it searches from
that block's next block.
Returns NULL if no block is found with the given id. */
+GMX_LIBGMX_EXPORT
t_enxblock *find_block_id_enxframe(t_enxframe *ef, int id, t_enxblock *prev);
/* allocate n subblocks to a block (if neccesary). Don't touch existing
subbblocks. */
+GMX_LIBGMX_EXPORT
void add_subblocks_enxblock(t_enxblock *eb, int n);
#ifndef _filenm_h
#define _filenm_h
-
+#include "visibility.h"
#include "futil.h"
#ifdef __cplusplus
void set_default_file_name(const char *name);
/* Set the default file name for all file types to name */
+GMX_LIBGMX_EXPORT
const char *ftp2ext(int ftp);
/* Return extension for filetype */
/* Return extension for filetype, and a generic name for generic types
(e.g. trx)*/
+GMX_LIBGMX_EXPORT
const char *ftp2desc(int ftp);
/* Return description for file type */
/* Parse command line for file names. When bKeep is set args are
* not removed from argv. */
+GMX_LIBGMX_EXPORT
const char *opt2fn(const char *opt,int nfile, const t_filenm fnm[]);
/* Return the filename belonging to cmd-line option opt, or NULL when
* no such option. */
+GMX_LIBGMX_EXPORT
const char *opt2fn_master(const char *opt, int nfile,
const t_filenm fnm[], t_commrec *cr);
/* Return the filename belonging to cmd-line option opt, or NULL when
* no such option or not running on master */
+GMX_LIBGMX_EXPORT
int opt2fns(char **fns[], const char *opt,int nfile,
const t_filenm fnm[]);
/* Return the filenames belonging to cmd-line option opt, or NULL when
#define opt2FILE(opt,nfile,fnm,mode) ffopen(opt2fn(opt,nfile,fnm),mode)
/* Return a file pointer from the filename (see above) */
+GMX_LIBGMX_EXPORT
int fn2ftp(const char *fn);
/* Return the filetype corrsponding to filename */
+GMX_LIBGMX_EXPORT
const char *ftp2fn(int ftp,int nfile,const t_filenm fnm[]);
/* Return the first file name with type ftp, or NULL when none found. */
#define ftp2FILE(ftp,nfile,fnm,mode) ffopen(ftp2fn(ftp,nfile,fnm),mode)
/* Return a file pointer from the filename (see above) */
+GMX_LIBGMX_EXPORT
gmx_bool ftp2bSet(int ftp,int nfile,const t_filenm fnm[]);
/* Return TRUE when this file type has been found on the cmd-line */
+GMX_LIBGMX_EXPORT
gmx_bool opt2bSet(const char *opt,int nfile,const t_filenm fnm[]);
/* Return TRUE when this option has been found on the cmd-line */
+GMX_LIBGMX_EXPORT
const char *opt2fn_null(const char *opt,int nfile,const t_filenm fnm[]);
/* Return the filenm belonging top cmd-line option opt, or NULL when
* no such option.
* Also return NULL when opt is optional and option is not set.
*/
+GMX_LIBGMX_EXPORT
const char *ftp2fn_null(int ftp,int nfile,const t_filenm fnm[]);
/* Return the first file name with type ftp, or NULL when none found.
* Also return NULL when ftp is optional and option is not set.
*/
+GMX_LIBGMX_EXPORT
gmx_bool is_optional(const t_filenm *fnm);
/* Return whether or not this filenm is optional */
+GMX_LIBGMX_EXPORT
gmx_bool is_output(const t_filenm *fnm);
/* Return whether or not this filenm is output */
/* When we do checkpointing, this routine is called to check for previous
* output files and append a '.partNNNN' suffix before the (output) file extensions.
*/
+GMX_LIBGMX_EXPORT
int add_suffix_to_output_names(t_filenm *fnm, int nfile, const char *suffix);
/* duplicate the filename list (to make a private copy for each thread,
for example) */
+GMX_LIBGMX_EXPORT
t_filenm *dup_tfn(int nf, const t_filenm tfn[]);
/* Free memory allocated for file names by parse_file_args(). */
#ifndef _force_h
#define _force_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "types/force_flags.h"
#include "pbc.h"
real do_walls(t_inputrec *ir,t_forcerec *fr,matrix box,t_mdatoms *md,
rvec x[],rvec f[],real lambda,real Vlj[],t_nrnb *nrnb);
+GMX_LIBMD_EXPORT
t_forcerec *mk_forcerec(void);
#define GMX_MAKETABLES_FORCEUSER (1<<0)
const char *fn,
matrix box);
+GMX_LIBMD_EXPORT
void pr_forcerec(FILE *fplog,t_forcerec *fr,t_commrec *cr);
void
int natoms_force_constr,int natoms_f_novirsum);
/* Set the number of cg's and atoms for the force calculation */
+GMX_LIBMD_EXPORT
gmx_bool can_use_allvsall(const t_inputrec *ir, const gmx_mtop_t *mtop,
gmx_bool bPrintNote,t_commrec *cr,FILE *fp);
/* Returns if we can use all-vs-all loops.
* and fp (if !=NULL) on the master node.
*/
+GMX_LIBMD_EXPORT
gmx_bool uses_simple_tables(int cutoff_scheme,
nonbonded_verlet_t *nbv,
int group);
* with the type of kernel indicated.
*/
+GMX_LIBMD_EXPORT
void init_interaction_const_tables(FILE *fp,
interaction_const_t *ic,
gmx_bool bSimpleTable,
* uses forcerec as input.
*/
+GMX_LIBMD_EXPORT
void init_forcerec(FILE *fplog,
const output_env_t oenv,
t_forcerec *fr,
* print_force >= 0: print forces for atoms with force >= print_force
*/
+GMX_LIBMD_EXPORT
void forcerec_set_excl_load(t_forcerec *fr,
const gmx_localtop_t *top,const t_commrec *cr);
/* Set the exclusion load for the local exclusions and possibly threads */
+GMX_LIBMD_EXPORT
void init_enerdata(int ngener,int n_lambda,gmx_enerdata_t *enerd);
/* Intializes the energy storage struct */
void sum_epot(t_grpopts *opts,gmx_enerdata_t *enerd);
/* Locally sum the non-bonded potential energy terms */
+GMX_LIBMD_EXPORT
void sum_dhdl(gmx_enerdata_t *enerd,real *lambda,t_lambda *fepvals);
/* Sum the free energy contributions */
void set_avcsixtwelve(FILE *fplog,t_forcerec *fr,
const gmx_mtop_t *mtop);
+GMX_LIBMD_EXPORT
extern void do_force(FILE *log,t_commrec *cr,
t_inputrec *inputrec,
gmx_large_int_t step,t_nrnb *nrnb,gmx_wallcycle_t wcycle,
* f is always required.
*/
+GMX_LIBMD_EXPORT
void ns(FILE *fplog,
t_forcerec *fr,
rvec x[],
#ifndef _futil_h
#define _futil_h
-
+#include "visibility.h"
#include <stdio.h>
#include "typedefs.h"
#include "types/commrec.h"
void no_buffers(void);
/* Turn off buffering of files (which is default) for debugging purposes */
+GMX_LIBGMX_EXPORT
gmx_bool gmx_fexist(const char *fname);
/* Return TRUE when fname exists, FALSE otherwise */
+GMX_LIBGMX_EXPORT
gmx_bool gmx_fexist_master(const char *fname, t_commrec *cr);
/* Return TRUE when fname exists, FALSE otherwise, bcast from master to others */
/* Make a backup of file if necessary.
Return false if there was a problem.
*/
+GMX_LIBGMX_EXPORT
gmx_bool make_backup(const char * file);
+GMX_LIBGMX_EXPORT
FILE *ffopen(const char *file, const char *mode);
/* Return a valid file pointer when successful, exits otherwise
* If the file is in compressed format, open a pipe which uncompresses
* the file! Therefore, files must be closed with ffclose (see below)
*/
+GMX_LIBGMX_EXPORT
int ffclose(FILE *fp);
/* Close files or pipes */
#define rewind frewind
+GMX_LIBGMX_EXPORT
int gmx_fseek(FILE *stream, gmx_off_t offset, int whence);
/* OS-independent fseek. 64-bit when available */
+GMX_LIBGMX_EXPORT
gmx_off_t gmx_ftell(FILE *stream);
/* OS-independent fseek. 64-bit when available. */
gmx_bool is_pipe(FILE *fp);
+GMX_LIBGMX_EXPORT
char *gmxlibfn(const char *file);
/* allocates and returns a string with the full file name for a library file */
+GMX_LIBGMX_EXPORT
FILE *libopen(const char *file);
/* Open a library file for reading. This looks in the current directory
* first, and then in the library directory. If the file is not found,
/* Open a directory for reading. The first argument should be a pointer
* to a declared gmx_directory_t variable. Returns 0 on success.
*/
+GMX_LIBGMX_EXPORT
int
gmx_directory_open(gmx_directory_t *p_gmxdir,const char *dirname);
* number of characters that will be written. Just as strncpy, the
* string will NOT be terminated it it is longer than maxlength_name.
*/
+GMX_LIBGMX_EXPORT
int
gmx_directory_nextfile(gmx_directory_t gmxdir,char *name,int maxlength_name);
/* Release all data for a directory structure */
+GMX_LIBGMX_EXPORT
int
gmx_directory_close(gmx_directory_t gmxdir);
+GMX_LIBGMX_EXPORT
gmx_bool get_libdir(char *libdir);
+GMX_LIBGMX_EXPORT
char *low_gmxlibfn(const char *file,gmx_bool bAddCWD,gmx_bool bFatal);
FILE *low_libopen(const char *file,gmx_bool bFatal);
/* Create unique name for temp file (wrapper around mkstemp).
* Buf should be at least 7 bytes long
*/
+GMX_LIBGMX_EXPORT
void gmx_tmpnam(char *buf);
/* truncte the file to the specified length */
* And Hey:
* Gromacs Runs On Most of All Computer Systems
*/
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
void rotate_conf(int natom,rvec *x,rvec *v,real alfa, real beta,real gamma);
/*rotate() rotates a configuration alfa degrees around the x_axis and beta degrees around the y_axis, *v can be NULL */
*the y-axis. Finally the third longest distance is placed along the x-axis
*/
+GMX_LIBGMX_EXPORT
void genconf(t_atoms *atoms,rvec *x,rvec *v,real *r,matrix box,ivec n_box);
/*genconf() generates a new configuration by adding boxes*/
+GMX_LIBGMX_EXPORT
void gen_box(int NTB,int natoms,rvec *x, matrix box,rvec box_space,
gmx_bool bCenter);
/* gen_box() generates a box around a configuration, box_space is optional
#ifndef _gen_ad_h
#define _gen_ad_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "toputil.h"
#include "gpp_nextnb.h"
void generate_excls(t_nextnb *nnb, int nrexcl, t_excls excls[]);
void clean_excls(t_nextnb *nnb, int nrexcl, t_excls excls[]);
+GMX_LIBGMXPREPROCESS_EXPORT
void gen_pad(t_nextnb *nnb, t_atoms *atoms, t_restp rtp[],
t_params plist[], t_excls excls[], t_hackblock hb[],
gmx_bool bAllowMissing);
#ifndef _gmx_ana_h
#define _gmx_ana_h
+#include "visibility.h"
#ifdef __cplusplus
extern "C" {
#endif
+GMX_LIBGMXANA_EXPORT
int
gmx_anadock(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_analyze(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_anaeig(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_g_angle(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_bar(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_bond(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_bundle(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_chi(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_cluster(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_confrms(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_covar(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_current(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_density(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_densmap(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_densorder(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_dielectric(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_dih(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_dipoles(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_disre(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_dist(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_do_dssp(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_dos(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_dyecoupl(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_dyndom(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_editconf(int argc, char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_eneconv(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_enemat(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_energy(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_lie(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_filter(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_genbox(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_genconf(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_genion(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_genpr(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_gyrate(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_h2order(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_hbond(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_helix(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_helixorient(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_hydorder(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_kinetics(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_make_edi(int argc,char *argv[]);
-int
+GMX_LIBGMXANA_EXPORT
+int
gmx_make_ndx(int argc,char *argv[]);
-int
+GMX_LIBGMXANA_EXPORT
+int
gmx_mindist(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_mk_angndx(int argc,char *argv[]);
-int
+GMX_LIBGMXANA_EXPORT
+int
gmx_msd(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_morph(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_nmeig(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_nmens(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_nmtraj(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_order(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_polystat(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_potential(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_principal(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_rama(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_rdf(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_rotmat(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_rms(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_rmsdist(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_rmsf(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_rotacf(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_saltbr(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_sas(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_sdf(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_select(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_sgangle(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_sham(int argc,char *argv[]);
-int
+GMX_LIBGMXANA_EXPORT
+int
gmx_sigeps(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_sorient(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_spol(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_spatial(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_tcaf(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_traj(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_trjcat(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_trjconv(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_trjorder(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_tune_pme(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_velacc(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_clustsize(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_mdmat(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_vanhove(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_wham(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_wheel(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_xpm2ps(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_membed(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_pme_error(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_options(int argc,char *argv[]);
+GMX_LIBGMXANA_EXPORT
int
gmx_sans(int argc,char *argv[]);
#ifndef _GMX_ARPACK_H
#define _GMX_ARPACK_H
-
+#include "visibility.h"
#ifdef __cplusplus
extern "C" {
#endif
* and 3 that no shifts could be applied. Negative numbers
* correspond to errors in the arguments provided.
*/
+GMX_LIBGMX_EXPORT
void
F77_FUNC(ssaupd,SSAUPD)(int * ido,
const char * bmat,
* \param lworkl Provide the same argument as you did to ssaupd()
* \param info Provide the same argument as you did to ssaupd()
*/
+GMX_LIBGMX_EXPORT
void
F77_FUNC(sseupd,SSEUPD)(int * rvec,
const char * howmny,
*/
#ifndef GMX_CPUID_H_
#define GMX_CPUID_H_
-
+#include "visibility.h"
#ifdef __cplusplus
extern "C" {
#endif
};
/* Text strings corresponding to CPU vendors */
+GMX_LIBGMX_EXPORT
extern const char *
gmx_cpuid_vendor_string[GMX_CPUID_NVENDORS];
/* Return the vendor id as enumerated type. Use gmx_cpuid_vendor_string[]
* to get the corresponding text string.
*/
+GMX_LIBGMX_EXPORT
enum gmx_cpuid_vendor
gmx_cpuid_vendor (gmx_cpuid_t cpuid);
/* Return processor family version. For a chip of version 1.2.3, this is 1 */
+GMX_LIBGMX_EXPORT
int
gmx_cpuid_family (gmx_cpuid_t cpuid);
/* Return processor model version, For a chip of version 1.2.3, this is 2. */
+GMX_LIBGMX_EXPORT
int
gmx_cpuid_model (gmx_cpuid_t cpuid);
* Returns 0 if flag "feature" is not set, 1 if the flag is set. We cannot use
* gmx_bool here since this file must be possible to compile without simple.h.
*/
+GMX_LIBGMX_EXPORT
int
gmx_cpuid_feature (gmx_cpuid_t cpuid,
enum gmx_cpuid_feature feature);
* even tested the performance on other SMT implementations, so it is not
* obvious we shouldn't use SMT there.
*/
+GMX_LIBGMX_EXPORT
enum gmx_cpuid_x86_smt
gmx_cpuid_x86_smt(gmx_cpuid_t cpuid);
#ifndef GMX_HARDWARE_DETECT_H
#define GMX_HARDWARE_DETECT_H
-
+#include "visibility.h"
#include "types/hw_info.h"
#ifdef __cplusplus
} /* fixes auto-indentation problems */
#endif
+GMX_LIBGMX_EXPORT
void gmx_detect_hardware(FILE *fplog, gmx_hw_info_t *hwinfo,
const t_commrec *cr,
gmx_bool bForceUseGPU, gmx_bool bTryUseGPU,
const char *gpu_id);
+GMX_LIBGMX_EXPORT
void gmx_hardware_info_free(gmx_hw_info_t *hwinfo);
+GMX_LIBGMX_EXPORT
void gmx_check_hw_runconf_consistency(FILE *fplog, gmx_hw_info_t *hwinfo,
const t_commrec *cr, int ntmpi_requsted,
gmx_bool bUseGPU);
#ifndef _fatal_h
#define _fatal_h
+#include "visibility.h"
#include <stdio.h>
#include <stdarg.h>
#endif
#endif
+GMX_LIBGMX_EXPORT
void
_where(const char *file,int line);
#define where() _where(__FILE__,__LINE__)
#define unset_fatal_tmp_file(fn) _unset_fatal_tmp_file(fn,__FILE__,__LINE__)
/* unsets filename to be removed */
+GMX_LIBGMX_EXPORT
void
gmx_fatal(int fatal_errno,const char *file,int line,const char *fmt,...) GMX_ATTRIBUTE_NORETURN;
#define FARGS 0,__FILE__,__LINE__
gmx_fatal_set_log_file(FILE *fp);
/* Set the log file for printing error messages */
+GMX_LIBGMX_EXPORT
void
_invalid_case(const char *fn,int line);
#define invalid_case() _invalid_case(__FILE__,__LINE__)
* the file is not NULL:
* if (debug) fprintf(debug,"%s","Hallo");
*/
+GMX_LIBGMX_EXPORT
extern FILE *debug;
+GMX_LIBGMX_EXPORT
extern gmx_bool gmx_debug_at;
void init_debug (const int dbglevel,const char *dbgfile);
+GMX_LIBGMX_EXPORT
gmx_bool bDebugMode(void);
/* Return TRUE when the program was started in debug mode */
/* warn_str is allowed to be NULL.
*/
+GMX_LIBGMX_EXPORT
void _range_check(int n,int n_min,int n_max,const char *warn_str,
const char *var,
const char *file,int line);
* The messages are stored in src/gmxlib/fatal.c
*/
+GMX_LIBGMX_EXPORT
void _gmx_error(const char *key,const char *msg,const char *file,int line) GMX_ATTRIBUTE_NORETURN;
#define gmx_error(key,msg) _gmx_error(key,msg,__FILE__,__LINE__)
/* Error msg of type key is generated and the program is
* The string may be a multi-line string.
*/
+GMX_LIBGMX_EXPORT
void gmx_warning(const char *fmt,...);
/* Print a warning message to stderr.
* The format of fmt is that like printf etc, only %d, %x, %c, %f, %g and %s
#ifndef _fatal_collective_h
#define _fatal_collective_h
-
+#include "visibility.h"
#include "types/simple.h"
#include "types/commrec.h"
#endif
+GMX_LIBGMX_EXPORT
void
gmx_fatal_collective(int f_errno,const char *file,int line,
const t_commrec *cr,gmx_domdec_t *dd,
*/
#include <stdio.h>
-
+#include "visibility.h"
#include "types/simple.h"
#include "gmxcomplex.h"
* handles this datatype should only be used for one thread at a time,
* i.e. you should create one copy per thread when executing in parallel.
*/
+GMX_LIBMD_EXPORT
int
gmx_fft_init_1d_real (gmx_fft_t * fft,
int nx,
* handles this datatype should only be used for one thread at a time,
* i.e. you should create one copy per thread when executing in parallel.
*/
+GMX_LIBMD_EXPORT
int
gmx_fft_init_2d_real (gmx_fft_t * fft,
int nx,
* \note Data pointers are declared as void, to avoid casting pointers
* depending on transform direction.
*/
+GMX_LIBMD_EXPORT
int
gmx_fft_1d_real (gmx_fft_t setup,
enum gmx_fft_direction dir,
* \note Data pointers are declared as void, to avoid casting pointers
* depending on transform direction.
*/
+GMX_LIBMD_EXPORT
int
gmx_fft_2d_real (gmx_fft_t setup,
enum gmx_fft_direction dir,
* of the other initializers.
*
*/
+GMX_LIBMD_EXPORT
void
gmx_fft_destroy (gmx_fft_t setup);
/* Detect native (i.e. non-Cygwin) Windows */
#cmakedefine GMX_NATIVE_WINDOWS
-
-
#ifndef _GMX_LAPACK_H_
#define _GMX_LAPACK_H_
-
+#include "visibility.h"
/** @file
*
* @brief Header definitions for the standard LAPACK library.
F77_FUNC(ssytrd,SSYTRD)(const char *uplo, int *n, float * a, int *lda, float *d,
float *e, float *tau, float *work, int *lwork, int *info);
+GMX_LIBGMX_EXPORT
void
F77_FUNC(ssyevr,SSYEVR)(const char *jobz, const char *range, const char *uplo, int *n,
float *a, int *lda, float *vl, float *vu, int *
#define _gmx_matrix_h
#include <stdio.h>
+#include "visibility.h"
double **alloc_matrix(int n,int m);
+GMX_LIBGMX_EXPORT
void free_matrix(double **a,int n);
void matrix_multiply(FILE *fp,int n,int m,double **x,double **y,double **z);
/* Return 0 if OK or row number where inversion failed otherwise. */
int matrix_invert(FILE *fp,int n,double **a);
+GMX_LIBGMX_EXPORT
double multi_regression(FILE *fp,int ny,double *y,
int nx,double **xx,double *a0);
/* Perform a regression analysis to fit
#ifndef GMX_OMP_H
#define GMX_OMP_H
-
+#include "visibility.h"
#include "types/commrec.h"
#include "mdrun.h"
/*! Returns an integer equal to or greater than the number of threads
* that would be available if a parallel region without num_threads were
* defined at that point in the code. Acts as a wrapper for omp_set_num_threads(void). */
+GMX_LIBGMX_EXPORT
int gmx_omp_get_max_threads(void);
/*! Returns the number of processors available when the function is called.
/*! Returns the thread number of the thread executing within its thread team.
* Acts as a wrapper for omp_get_thread_num(void). */
+GMX_LIBGMX_EXPORT
int gmx_omp_get_thread_num(void);
/*! Sets the number of threads in subsequent parallel regions, unless overridden
* by a num_threads clause. Acts as a wrapper for omp_get_max_threads(void). */
+GMX_LIBGMX_EXPORT
void gmx_omp_set_num_threads(int num_threads);
/*! Check for externally set thread affinity to avoid conflicts with GROMACS internal setting. */
+GMX_LIBGMX_EXPORT
void gmx_omp_check_thread_affinity(FILE *fplog, const t_commrec *cr,
gmx_hw_opt_t *hw_opt);
#ifndef GMX_OMP_NTHREADS
#define GMX_OMP_NTHREADS
-
+#include "visibility.h"
#include "types/commrec.h"
/*! Initializes the per-module thread count. It is compatible with tMPI,
* thread-safety is ensured (for the features available with tMPI).
* This function should caled only once during the initialization of mdrun. */
+GMX_LIBGMX_EXPORT
void gmx_omp_nthreads_init(FILE *fplog, t_commrec *cr,
int nthreads_hw_avail,
int omp_nthreads_req,
gmx_bool bFullOmpSupport);
/*! Returns the number of threads to be used in the given module m. */
+GMX_LIBGMX_EXPORT
int gmx_omp_nthreads_get(int mod);
/*! Read the OMP_NUM_THREADS env. var. and check against the value set on the command line. */
+GMX_LIBGMX_EXPORT
void gmx_omp_nthreads_read_env(int *nthreads_omp);
#endif /* GMX_OMP_NTHREADS */
#ifndef _GMX_RANDOM_H_
#define _GMX_RANDOM_H_
-
+#include "visibility.h"
#include <stdio.h>
#include "types/simple.h"
* Returns the size of the RNG integer data structure.
* \threadsafe Yes.
*/
+GMX_LIBGMX_EXPORT
int
gmx_rng_n(void);
*
* \threadsafe Yes.
*/
+GMX_LIBGMX_EXPORT
gmx_rng_t
gmx_rng_init(unsigned int seed);
*
* \threadsafe Yes.
*/
+GMX_LIBGMX_EXPORT
unsigned int
gmx_rng_make_seed(void);
* \threadsafe Function itself is threadsafe, but you should only destroy a
* certain RNG once (i.e. from one thread).
*/
+GMX_LIBGMX_EXPORT
void
gmx_rng_destroy(gmx_rng_t rng);
* \param rng Handle to random number generator previously returned by
* gmx_rng_init() or gmx_rng_init_array().
*/
+GMX_LIBGMX_EXPORT
void
gmx_rng_get_state(gmx_rng_t rng, unsigned int *mt,int *mti);
* \param rng Handle to random number generator previously returned by
* gmx_rng_init() or gmx_rng_init_array().
*/
+GMX_LIBGMX_EXPORT
void
gmx_rng_set_state(gmx_rng_t rng, unsigned int *mt,int mti);
* solutions: either use a mutex and lock it before calling
* the function, or use a separate RNG handle for each thread.
*/
-unsigned int
+GMX_LIBGMX_EXPORT
+unsigned int
gmx_rng_uniform_uint32(gmx_rng_t rng);
* solutions: either use a mutex and lock it before calling
* the function, or use a separate RNG handle for each thread.
*/
+GMX_LIBGMX_EXPORT
real
gmx_rng_uniform_real(gmx_rng_t rng);
* numbers it is probably better to use separate random number generator
* structures.
*/
+GMX_LIBGMX_EXPORT
real
gmx_rng_gaussian_real(gmx_rng_t rng);
*
* threadsafe: yes
*/
+GMX_LIBGMX_EXPORT
real
gmx_rng_gaussian_table(gmx_rng_t rng);
#ifndef _GMX_SORT_H_
#define _GMX_SORT_H_
+#include "visibility.h"
+
/** @file gmx_sort.h
*
* @brief Portable implementation of thread-safe sort routines.
* first argument is considered to be respectively less than,
* equal to, or greater than the second.
*/
+GMX_LIBGMX_EXPORT
void
gmx_qsort(void * base,
size_t nmemb,
#ifndef _GMX_STATS_H
#define _GMX_STATS_H
+#include "visibility.h"
#ifdef __cplusplus
extern "C" {
enum { ehistoX, ehistoY, ehistoNR };
+GMX_LIBGMX_EXPORT
gmx_stats_t gmx_stats_init();
+GMX_LIBGMX_EXPORT
int gmx_stats_done(gmx_stats_t stats);
/* Remove outliers from a straight line, where level in units of
sigma. Level needs to be larger than one obviously. */
int gmx_stats_remove_outliers(gmx_stats_t stats,double level);
+GMX_LIBGMX_EXPORT
int gmx_stats_add_point(gmx_stats_t stats,double x,double y,
double dx,double dy);
been returned. Should be used in a while loop. Variables for either
pointer may be NULL, in which case the routine can be used as an
expensive point counter. */
+GMX_LIBGMX_EXPORT
int gmx_stats_get_point(gmx_stats_t stats,real *x,real *y,
real *dx,real *dy);
sigmas in *da and *db respectively. Returns normalized *quality of
fit in *chi2 and correlation of fit with data in Rfit. chi2, Rfit,
da and db may be NULL. */
+GMX_LIBGMX_EXPORT
int gmx_stats_get_ab(gmx_stats_t stats,int weight,
real *a,real *b,
real *da,real *db,real *chi2,real *Rfit);
/* Returns the root mean square deviation between x and y values. */
int gmx_stats_get_rmsd(gmx_stats_t gstats,real *rmsd);
+GMX_LIBGMX_EXPORT
int gmx_stats_get_npoints(gmx_stats_t stats,int *N);
+GMX_LIBGMX_EXPORT
int gmx_stats_get_average(gmx_stats_t stats,real *aver);
int gmx_stats_get_sigma(gmx_stats_t stats,real *sigma);
/* Get all three of the above. Pointers may be null, in which case no
assignment will be done. */
+GMX_LIBGMX_EXPORT
int gmx_stats_get_ase(gmx_stats_t gstats,real *aver,real *sigma,real *error);
/* Dump the x, y, dx, dy data to a text file */
int normalized,real **x,real **y);
/* Return message belonging to error code */
+GMX_LIBGMX_EXPORT
const char *gmx_stats_message(int estats);
/****************************************************
/* Fit a straight line y=ax thru the n data points x, y, return the
slope in *a. Return value can be estatsOK, or something else. */
+GMX_LIBGMX_EXPORT
int lsq_y_ax_b(int n, real x[], real y[], real *a, real *b,real *r,
real *chi2);
/* Fit a straight line y=ax+b thru the n data points x,y.
/* As lsq_y_ax_b, but with x in double precision.
*/
+GMX_LIBGMX_EXPORT
int lsq_y_ax_b_error(int n, real x[], real y[], real dy[],
real *a, real *b, real *da, real *db,
real *r,real *chi2);
#define _gmx_wallcycle_h
#include <stdio.h>
+#include "visibility.h"
#include "typedefs.h"
#include "types/commrec.h"
gmx_bool wallcycle_have_counter(void);
/* Returns if cycle counting is supported */
+GMX_LIBMD_EXPORT
gmx_wallcycle_t wallcycle_init(FILE *fplog, int resetstep, t_commrec *cr,
int nthreads_pp, int nthreads_pme);
/* Returns the wall cycle structure.
* Returns NULL when cycle counting is not supported.
*/
+GMX_LIBMD_EXPORT
void wallcycle_start(gmx_wallcycle_t wc, int ewc);
/* Starts the cycle counter (and increases the call count) */
void wallcycle_start_nocount(gmx_wallcycle_t wc, int ewc);
/* Starts the cycle counter without increasing the call count */
+GMX_LIBMD_EXPORT
double wallcycle_stop(gmx_wallcycle_t wc, int ewc);
/* Stop the cycle count for ewc, returns the last cycle count */
+GMX_LIBMD_EXPORT
void wallcycle_reset_all(gmx_wallcycle_t wc);
/* Resets all cycle counters to zero */
gmx_wallcycle_t wc, wallclock_gpu_t *gpu_t);
/* Print the cycle and time accounting */
+GMX_LIBMD_EXPORT
gmx_large_int_t wcycle_get_reset_counters(gmx_wallcycle_t wc);
/* Return reset_counters from wc struct */
+GMX_LIBMD_EXPORT
void wcycle_set_reset_counters(gmx_wallcycle_t wc, gmx_large_int_t reset_counters);
/* Set reset_counters */
#ifndef _gmxcpp_h
#define _gmxcpp_h
+#include "visibility.h"
typedef struct gmx_cpp *gmx_cpp_t;
/* The possible return codes for these functions */
NOT THREAD SAFE
*/
+GMX_LIBGMX_EXPORT
int cpp_open_file(const char *filenm,gmx_cpp_t *handlep, char **cppopts);
/* Return one whole line from the file into buf which holds at most n
NOT THREAD SAFE
*/
+GMX_LIBGMX_EXPORT
int cpp_read_line(gmx_cpp_t *handlep,int n,char buf[]);
/* Return the file currently being read.
NOT THREAD SAFE
*/
+GMX_LIBGMX_EXPORT
char *cpp_cur_file(const gmx_cpp_t *handlep);
/* Return the current line number.
NOT THREAD SAFE
*/
+GMX_LIBGMX_EXPORT
int cpp_cur_linenr(const gmx_cpp_t *handlep);
/* Close the file! Return integer status.
NOT THREAD SAFE
*/
+GMX_LIBGMX_EXPORT
int cpp_close_file(gmx_cpp_t *handlep);
/* Return a string containing the error message coresponding to status
NOT THREAD SAFE
*/
+GMX_LIBGMX_EXPORT
char *cpp_error(gmx_cpp_t *handlep,int status);
#endif
#define _gmxfio_h
#include <stdio.h>
+#include "visibility.h"
#include "sysstuff.h"
#include "typedefs.h"
#include "xdrf.h"
/* Open a file, return a stream, record the entry in internal FIO object */
+GMX_LIBGMX_EXPORT
FILE* gmx_fio_fopen(const char *fn,const char *mode);
/* Close a file previously opened with gmx_fio_fopen.
* Do not mix these calls with standard fopen/fclose ones!
* Returns 0 on success. */
+GMX_LIBGMX_EXPORT
int gmx_fio_fclose(FILE *fp);
char *gmx_fio_getname(t_fileio *fio);
/* Return the filename corresponding to the fio index */
+GMX_LIBGMX_EXPORT
int gmx_fio_getftp(t_fileio *fio);
/* Return the filetype corresponding to the fio index.
There is as of now no corresponding setftp function because the file
was opened as a specific file type and changing that midway is most
likely an evil hack. */
+GMX_LIBGMX_EXPORT
void gmx_fio_setdebug(t_fileio *fio,gmx_bool bDebug);
/* Set the debug mode */
void gmx_fio_rewind(t_fileio *fio);
/* Rewind the tpa file in fio */
+GMX_LIBGMX_EXPORT
int gmx_fio_flush(t_fileio *fio);
/* Flush the fio, returns 0 on success */
can cause dramatically slowed down IO performance. Some OSes (Linux,
for example), may implement fsync as a full sync() point. */
+GMX_LIBGMX_EXPORT
gmx_off_t gmx_fio_ftell(t_fileio *fio);
/* Return file position if possible */
+GMX_LIBGMX_EXPORT
int gmx_fio_seek(t_fileio *fio,gmx_off_t fpos);
/* Set file position if possible, quit otherwise */
+GMX_LIBGMX_EXPORT
FILE *gmx_fio_getfp(t_fileio *fio);
/* Return the file pointer itself */
+GMX_LIBGMX_EXPORT
XDR *gmx_fio_getxdr(t_fileio *fio);
/* Return the file pointer itself */
gmx_file_position_t;
+GMX_LIBGMX_EXPORT
int gmx_fio_check_file_position(t_fileio *fio);
/* Check if the file position is out of the range of off_t.
* The result is stored along with the other file data of fio.
int xtc_seek_frame(t_fileio *fio, int frame, int natoms);
+GMX_LIBGMX_EXPORT
int xtc_seek_time(t_fileio *fio, real time, int natoms,gmx_bool bSeekForwardOnly);
#define _gpp_atomtype_h
#include <stdio.h>
+#include "visibility.h"
#include "typedefs.h"
#include "macros.h"
#include "grompp.h"
typedef struct gpp_atomtype *gpp_atomtype_t;
+GMX_LIBGMXPREPROCESS_EXPORT
int get_atomtype_type(const char *str,gpp_atomtype_t at);
/* Return atomtype corresponding to case-insensitive str
or NOTSET if not found */
+GMX_LIBGMXPREPROCESS_EXPORT
int get_atomtype_ntypes(gpp_atomtype_t at);
/* Return number of atomtypes */
+GMX_LIBGMXPREPROCESS_EXPORT
char *get_atomtype_name(int nt,gpp_atomtype_t at);
/* Return name corresponding to atomtype nt, or NULL if not found */
real get_atomtype_massB(int nt,gpp_atomtype_t at);
real get_atomtype_qA(int nt,gpp_atomtype_t at);
real get_atomtype_qB(int nt,gpp_atomtype_t at);
+GMX_LIBGMXPREPROCESS_EXPORT
real get_atomtype_radius(int nt,gpp_atomtype_t at);
+GMX_LIBGMXPREPROCESS_EXPORT
real get_atomtype_vol(int nt,gpp_atomtype_t at);
+GMX_LIBGMXPREPROCESS_EXPORT
real get_atomtype_surftens(int nt,gpp_atomtype_t at);
+GMX_LIBGMXPREPROCESS_EXPORT
real get_atomtype_gb_radius(int nt,gpp_atomtype_t at);
+GMX_LIBGMXPREPROCESS_EXPORT
real get_atomtype_S_hct(int nt,gpp_atomtype_t at);
int get_atomtype_ptype(int nt,gpp_atomtype_t at);
int get_atomtype_batype(int nt,gpp_atomtype_t at);
+GMX_LIBGMXPREPROCESS_EXPORT
int get_atomtype_atomnumber(int nt,gpp_atomtype_t at);
/* Return the above variable for atomtype nt, or NOTSET if not found */
real get_atomtype_nbparam(int nt,int param,gpp_atomtype_t at);
/* Similar to the previous but returns the paramth parameter or NOTSET */
+GMX_LIBGMXPREPROCESS_EXPORT
gpp_atomtype_t init_atomtype(void);
/* Return a new atomtype structure */
void print_at (FILE * out, gpp_atomtype_t at);
/* Print an atomtype record to a text file */
+GMX_LIBGMXPREPROCESS_EXPORT
void renum_atype(t_params plist[],gmx_mtop_t *mtop,
int *wall_atomtype,
gpp_atomtype_t at,gmx_bool bVerbose);
+GMX_LIBGMXPREPROCESS_EXPORT
void copy_atomtype_atomtypes(gpp_atomtype_t atype,t_atomtypes *atypes);
/* Copy from one structure to another */
#ifndef _gpp_nextnb_h
#define _gpp_nextnb_h
-
+#include "visibility.h"
#include "grompp.h"
#ifdef __cplusplus
int ***a; /* like this: a[i][nre][nrx] */
} t_nextnb;
+GMX_LIBGMXPREPROCESS_EXPORT
void init_nnb(t_nextnb *nnb, int nr, int nrex);
/* Initiate the arrays for nnb (see above) */
+GMX_LIBGMXPREPROCESS_EXPORT
void done_nnb(t_nextnb *nnb);
/* Cleanup the nnb struct */
#define print_nnb(nnb, s)
#endif
+GMX_LIBGMXPREPROCESS_EXPORT
void gen_nnb(t_nextnb *nnb,t_params plist[]);
/* Generate a t_nextnb structure from bond information.
* With the structure you can either generate exclusions
#define _grompp_h
#include <stdio.h>
+#include "visibility.h"
#include "typedefs.h"
#include "macros.h"
int nr;
} t_mols;
+GMX_LIBGMXPREPROCESS_EXPORT
gmx_bool is_int(double x);
/* Returns TRUE when x is integer */
#ifndef _hackblock_h
#define _hackblock_h
+#include "visibility.h"
#include "typedefs.h"
#include "pdbio.h"
#include "grompp.h"
void dump_hb(FILE *out, int nres, t_hackblock hb[]);
/* print out whole datastructure */
+GMX_LIBGMXPREPROCESS_EXPORT
void init_t_protonate(t_protonate *protonate);
/* initialize t_protein struct */
#ifndef _index_h
#define _index_h
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
void check_index(char *gname,int n,atom_id index[],
char *traj,int natoms);
/* Checks if any index is smaller than zero or larger than natoms,
* and traj (if traj=NULL, "the trajectory" is used).
*/
+GMX_LIBGMX_EXPORT
t_blocka *init_index(const char *gfile, char ***grpname);
/* Lower level routine than the next */
+GMX_LIBGMX_EXPORT
void rd_index(const char *statfile,int ngrps,int isize[],
atom_id *index[],char *grpnames[]);
/* Assume the group file is generated, so the
atom_id *index[],char *grpnames[],int grpnr[]);
/* the same but also reads the number of the selected group*/
+GMX_LIBGMX_EXPORT
void get_index(t_atoms *atoms, const char *fnm, int ngrps,
int isize[], atom_id *index[],char *grpnames[]);
/* Does the same as rd_index, but if the fnm pointer is NULL it
atom_id *inv_clust;
} t_cluster_ndx;
+GMX_LIBGMX_EXPORT
t_cluster_ndx *cluster_index(FILE *fplog,const char *ndx);
typedef struct {
typedef struct gmx_residuetype *
gmx_residuetype_t;
+GMX_LIBGMX_EXPORT
int
gmx_residuetype_init(gmx_residuetype_t *rt);
+GMX_LIBGMX_EXPORT
int
gmx_residuetype_destroy(gmx_residuetype_t rt);
+GMX_LIBGMX_EXPORT
int
gmx_residuetype_get_type(gmx_residuetype_t rt,const char * resname, const char ** p_restype);
+GMX_LIBGMX_EXPORT
int
gmx_residuetype_add(gmx_residuetype_t rt,const char *newresname, const char *newrestype);
const char *** p_typenames,
int * ntypes);
+GMX_LIBGMX_EXPORT
gmx_bool
gmx_residuetype_is_protein(gmx_residuetype_t rt, const char *resnm);
+GMX_LIBGMX_EXPORT
gmx_bool
gmx_residuetype_is_dna(gmx_residuetype_t rt, const char *resnm);
+GMX_LIBGMX_EXPORT
gmx_bool
gmx_residuetype_is_rna(gmx_residuetype_t rt, const char *resnm);
+GMX_LIBGMX_EXPORT
int
gmx_residuetype_get_size(gmx_residuetype_t rt);
+GMX_LIBGMX_EXPORT
int
gmx_residuetype_get_index(gmx_residuetype_t rt, const char *resnm);
+GMX_LIBGMX_EXPORT
const char *
gmx_residuetype_get_name(gmx_residuetype_t rt, int index);
+GMX_LIBGMX_EXPORT
t_blocka *new_blocka(void);
/* allocate new block */
+GMX_LIBGMX_EXPORT
void write_index(const char *outf, t_blocka *b,char **gnames);
/* Writes index blocks to outf (writes an indexfile) */
+GMX_LIBGMX_EXPORT
void add_grp(t_blocka *b,char ***gnames,int nra,atom_id a[],const char *name);
/* Ads group a with name name to block b and namelist gnames */
+GMX_LIBGMX_EXPORT
void analyse(t_atoms *atoms,t_blocka *gb,char ***gn,
gmx_bool bASK,gmx_bool bVerb);
/* Makes index groups gb with names gn for atoms in atoms.
* bASK=FALSE gives default groups.
*/
+GMX_LIBGMX_EXPORT
int find_group(char s[], int ngrps, char **grpname);
*/
#ifndef INDEXUTIL_H
#define INDEXUTIL_H
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
void
gmx_ana_indexmap_reserve(gmx_ana_indexmap_t *m, int nr, int isize);
/** Initializes an index group mapping. */
+GMX_LIBGMX_EXPORT
void
gmx_ana_indexmap_init(gmx_ana_indexmap_t *m, gmx_ana_index_t *g,
t_topology *top, e_index_t type);
void
gmx_ana_indexmap_copy(gmx_ana_indexmap_t *dest, gmx_ana_indexmap_t *src, gmx_bool bFirst);
/** Updates an index group mapping. */
+GMX_LIBGMX_EXPORT
void
gmx_ana_indexmap_update(gmx_ana_indexmap_t *m, gmx_ana_index_t *g, gmx_bool bMaskOnly);
/*@}*/
*/
#include <stdlib.h>
-
+#include "visibility.h"
#include "types/inputrec.h"
#ifdef __cplusplus
+GMX_LIBGMX_EXPORT
int ir_optimal_nstcalcenergy(const t_inputrec *ir);
+GMX_LIBGMX_EXPORT
int tcouple_min_integration_steps(int etc);
+GMX_LIBGMX_EXPORT
int ir_optimal_nsttcouple(const t_inputrec *ir);
+GMX_LIBGMX_EXPORT
int pcouple_min_integration_steps(int epc);
+GMX_LIBGMX_EXPORT
int ir_optimal_nstpcouple(const t_inputrec *ir);
#ifdef __cplusplus
#ifndef _invblock_h
#define _invblock_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
* array, and therefore the dimension of the returned array
*/
+GMX_LIBGMX_EXPORT
atom_id *make_invblocka(const t_blocka *block,int nr);
/* Inverse the block structure. nr is the maximum entry in the inversed
* array, and therefore the dimension of the returned array
#include <stdio.h>
+#include "visibility.h"
#include "network.h"
#ifdef __cplusplus
* Returns name.
*/
+GMX_LIBGMX_EXPORT
void gmx_log_open(const char *fn,const t_commrec *cr,
gmx_bool bMasterOnly, gmx_bool bAppendFiles, FILE**);
/* Open the log file, if necessary (nprocs > 1) the logfile name is
* communicated around the ring.
*/
+GMX_LIBGMX_EXPORT
void gmx_log_close(FILE *fp);
/* Close the log file */
+GMX_LIBGMX_EXPORT
void check_multi_int(FILE *log,const gmx_multisim_t *ms,
int val,const char *name);
+GMX_LIBGMX_EXPORT
void check_multi_large_int(FILE *log,const gmx_multisim_t *ms,
gmx_large_int_t val,const char *name);
/* Check if val is the same on all processors for a mdrun -multi run
* If bParFn is set, the nodeid is appended to the tpx and each output file.
*/
+GMX_LIBGMX_EXPORT
t_commrec *init_par(int *argc,char ***argv_ptr);
/* Initiate the parallel computer. Return the communication record
* (see network.h). The command line arguments are communicated so that they can be
* array of argument strings. Both are allowed to be NULL.
*/
+GMX_LIBGMX_EXPORT
t_commrec *init_par_threads(const t_commrec *cro);
/* Initialize communication records for thread-parallel simulations.
Must be called on all threads before any communication takes place by
#define _maths_h
#include <math.h>
+#include "visibility.h"
#include "types/simple.h"
#include "typedefs.h"
{0.2967324292201065,0.2967324292201065,-0.186929716880426,0.2967324292201065,0.2967324292201065}
};*/
+GMX_LIBGMX_EXPORT
int gmx_nint(real a);
real sign(real x,real y);
real cuberoot (real a);
+GMX_LIBGMX_EXPORT
double gmx_erfd(double x);
double gmx_erfcd(double x);
+GMX_LIBGMX_EXPORT
float gmx_erff(float x);
+GMX_LIBGMX_EXPORT
float gmx_erfcf(float x);
#ifdef GMX_DOUBLE
#define gmx_erf(x) gmx_erfd(x)
#define gmx_erfc(x) gmx_erfcf(x)
#endif
+GMX_LIBGMX_EXPORT
gmx_bool gmx_isfinite(real x);
/*! \brief Check if two numbers are within a tolerance
*
* Returns true when overflow did not occur.
*/
+GMX_LIBGMX_EXPORT
gmx_bool
check_int_multiply_for_overflow(gmx_large_int_t a,
gmx_large_int_t b,
#ifndef _matio_h
#define _matio_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
gmx_bool matelmt_cmp(t_xpmelmt e1, t_xpmelmt e2);
+GMX_LIBGMX_EXPORT
t_matelmt searchcmap(int n,t_mapping map[],t_xpmelmt c);
/* Seach in the map for code 'c' and return entry number.
* return -1 if not found
*/
+GMX_LIBGMX_EXPORT
int getcmap(FILE *in,const char *fn,t_mapping **map);
/* Read the mapping table from in, return number of entries */
void writecmap(const char *fn,int n,t_mapping map[]);
/* print mapping table to fn */
+GMX_LIBGMX_EXPORT
int read_xpm_matrix(const char *fnm, t_matrix **matrix);
/* Reads a number of matrices from .xpm file fnm and returns this number */
+GMX_LIBGMX_EXPORT
real **matrix2real(t_matrix *matrix,real **mat);
/* Converts an matrix in a t_matrix struct to a matrix of reals
* When mat==NULL memory will be allocated
* Returns NULL when something went wrong
*/
+GMX_LIBGMX_EXPORT
void write_xpm_m(FILE *out, t_matrix m);
/* Writes a t_matrix struct to .xpm file */
+GMX_LIBGMX_EXPORT
void write_xpm3(FILE *out,unsigned int flags,
const char *title,const char *legend,
const char *label_x,const char *label_y,
/* See write_xpm.
* Writes a colormap varying as rlo -> rmid -> rhi.
*/
+GMX_LIBGMX_EXPORT
void write_xpm_split(FILE *out,unsigned int flags,
const char *title,const char *legend,
const char *label_x,const char *label_y,
* which is white.
*/
+GMX_LIBGMX_EXPORT
void write_xpm(FILE *out,unsigned int flags,
const char *title,const char *legend,
const char *label_x,const char *label_y,
* nlevels number of color levels for the output
*/
+GMX_LIBGMX_EXPORT
real **mk_matrix(int nx, int ny, gmx_bool b1D);
+GMX_LIBGMX_EXPORT
void done_matrix(int nx, real ***m);
void clear_matrix(int nx, int ny, real **m);
#ifndef _md_logging_h
#define _md_logging_h
+#include "visibility.h"
#include "types/commrec.h"
#ifdef __cplusplus
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
void md_print_info(const t_commrec *cr, FILE *fplog,
const char *fmt, ...);
/* Print an general information message to stderr on the master node
* the arguments after that contain the values to be printed, as in printf.
*/
+GMX_LIBGMX_EXPORT
void md_print_warn(const t_commrec *cr, FILE *fplog,
const char *fmt, ...);
/* As md_print_info above, but for important notices or warnings.
#ifndef _md_support_h
#define _md_support_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "types/globsig.h"
#include "sim_util.h"
/* return the number of steps between global communcations */
+GMX_LIBMD_EXPORT
int check_nstglobalcomm(FILE *fplog,t_commrec *cr,
int nstglobalcomm,t_inputrec *ir);
/* check whether an 'nst'-style parameter p is a multiple of nst, and
set it to be one if not, with a warning. */
+GMX_LIBMD_EXPORT
void check_nst_param(FILE *fplog,t_commrec *cr,
const char *desc_nst,int nst,
const char *desc_p,int *p);
/* check which of the multisim simulations has the shortest number of
steps and return that number of nsteps */
+GMX_LIBMD_EXPORT
gmx_large_int_t get_multisim_nsteps(const t_commrec *cr,
gmx_large_int_t nsteps);
+GMX_LIBMD_EXPORT
void rerun_parallel_comm(t_commrec *cr,t_trxframe *fr,
gmx_bool *bNotLastFrame);
/* get the conserved energy associated with the ensemble type*/
+GMX_LIBMD_EXPORT
real compute_conserved_from_auxiliary(t_inputrec *ir, t_state *state,
t_extmass *MassQ);
/* set the lambda values at each step of mdrun when they change */
+GMX_LIBMD_EXPORT
void set_current_lambdas(gmx_large_int_t step, t_lambda *fepvals, gmx_bool bRerunMD,
t_trxframe *rerun_fr, t_state *state_global, t_state *state, double lam0[]);
const t_inputrec *ir,int repl_ex_nst);
/* Determine the interval for inter-simulation communication */
+GMX_LIBMD_EXPORT
void init_global_signals(globsig_t *gs,const t_commrec *cr,
const t_inputrec *ir,int repl_ex_nst);
/* Constructor for globsig_t */
+GMX_LIBMD_EXPORT
void copy_coupling_state(t_state *statea,t_state *stateb,
gmx_ekindata_t *ekinda,gmx_ekindata_t *ekindb, t_grpopts* opts);
/* Copy stuff from state A to state B */
+GMX_LIBMD_EXPORT
void compute_globals(FILE *fplog, gmx_global_stat_t gstat, t_commrec *cr, t_inputrec *ir,
t_forcerec *fr, gmx_ekindata_t *ekind,
t_state *state, t_state *state_global, t_mdatoms *mdatoms,
#ifndef _mdatoms_h
#define _mdatoms_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
+GMX_LIBMD_EXPORT
t_mdatoms *init_mdatoms(FILE *fp,gmx_mtop_t *mtop,gmx_bool bFreeEnergy);
+GMX_LIBMD_EXPORT
void atoms2md(gmx_mtop_t *mtop,t_inputrec *ir,
int nindex,int *index,
int start,int homenr,
* If index!=NULL only the indexed atoms are copied.
*/
+GMX_LIBMD_EXPORT
void update_mdatoms(t_mdatoms *md,real lambda);
/* (Re)set all the mass parameters */
#ifndef _mdebin_h
#define _mdebin_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "sysstuff.h"
#include "ebin.h"
FILE *fp_dhdl);
/* Initiate MD energy bin and write header to energy file. */
+GMX_LIBMD_EXPORT
FILE *open_dhdl(const char *filename,const t_inputrec *ir,
const output_env_t oenv);
/* Open the dhdl file for output */
/* update the averaging structures. Called every time
the energies are evaluated. */
+GMX_LIBMD_EXPORT
void upd_mdebin(t_mdebin *md,
gmx_bool bDoDHDL,
gmx_bool bSum,
rvec mu_tot,
gmx_constr_t constr);
+GMX_LIBMD_EXPORT
void upd_mdebin_step(t_mdebin *md);
/* Updates only the step count in md */
+GMX_LIBMD_EXPORT
void print_ebin_header(FILE *log,gmx_large_int_t steps,double time,real lamb);
+GMX_LIBMD_EXPORT
void print_ebin(ener_file_t fp_ene,gmx_bool bEne,gmx_bool bDR,gmx_bool bOR,
FILE *log,
gmx_large_int_t step,double time,
that is written to checkpoints in checkpoint.c */
/* Set the energyhistory_t data structure from a mdebin structure */
+GMX_LIBMD_EXPORT
void update_energyhistory(energyhistory_t * enerhist,t_mdebin * mdebin);
/* Read the energyhistory_t data structure to a mdebin structure*/
+GMX_LIBMD_EXPORT
void restore_energyhistory_from_state(t_mdebin * mdebin,
energyhistory_t * enerhist);
#include <stdio.h>
#include <time.h>
+#include "visibility.h"
#include "typedefs.h"
#include "network.h"
#include "sim_util.h"
/* ROUTINES from minimize.c */
+GMX_LIBMD_EXPORT
gmx_integrator_t do_steep;
/* Do steepest descents EM */
+GMX_LIBMD_EXPORT
gmx_integrator_t do_cg;
/* Do conjugate gradient EM */
+GMX_LIBMD_EXPORT
gmx_integrator_t do_lbfgs;
/* Do conjugate gradient L-BFGS */
+GMX_LIBMD_EXPORT
gmx_integrator_t do_nm;
/* Do normal mode analysis */
/* ROUTINES from tpi.c */
+GMX_LIBMD_EXPORT
gmx_integrator_t do_tpi;
/* Do test particle insertion */
void init_npt_masses(t_inputrec *ir, t_state *state, t_extmass *MassQ, gmx_bool bInit);
+GMX_LIBMD_EXPORT
int ExpandedEnsembleDynamics(FILE *log,t_inputrec *ir, gmx_enerdata_t *enerd,
t_state *state, t_extmass *MassQ, df_history_t *dfhist,
gmx_large_int_t step, gmx_rng_t mcrng,
rvec *v, t_mdatoms *mdatoms);
+GMX_LIBMD_EXPORT
void PrintFreeEnergyInfoToFile(FILE *outfile, t_lambda *fep, t_expanded *expand, t_simtemp *simtemp, df_history_t *dfhist,
int nlam, int frequency, gmx_large_int_t step);
+GMX_LIBMD_EXPORT
void get_mc_state(gmx_rng_t rng,t_state *state);
+GMX_LIBMD_EXPORT
void set_mc_state(gmx_rng_t rng,t_state *state);
/* check the version */
+GMX_LIBMD_EXPORT
void check_ir_old_tpx_versions(t_commrec *cr,FILE *fplog,
t_inputrec *ir,gmx_mtop_t *mtop);
/* Allocate and initialize node-local state entries. */
+GMX_LIBMD_EXPORT
void set_state_entries(t_state *state,const t_inputrec *ir,int nnodes);
/* Broadcast the data for a simulation, and allocate node-specific settings
such as rng generators. */
+GMX_LIBMD_EXPORT
void init_parallel(FILE *log, t_commrec *cr, t_inputrec *inputrec,
gmx_mtop_t *mtop);
#ifndef _mshift_h
#define _mshift_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
t_graph *mk_graph(FILE *fplog,
t_idef *idef,int at_start,int at_end,
gmx_bool bShakeOnly,gmx_bool bSettle);
* If bSettle && bShakeOnly the settles are used too.
*/
+GMX_LIBGMX_EXPORT
void mk_graph_ilist(FILE *fplog,
t_ilist *ilist,int at_start,int at_end,
gmx_bool bShakeOnly,gmx_bool bSettle,
/* As mk_graph, but takes t_ilist iso t_idef and does not allocate g */
+GMX_LIBGMX_EXPORT
void done_graph(t_graph *g);
/* Free the memory in g */
+GMX_LIBGMX_EXPORT
void p_graph(FILE *log,const char *title,t_graph *g);
/* Print a graph to log */
+GMX_LIBGMX_EXPORT
void mk_mshift(FILE *log,t_graph *g,int ePBC,matrix box,rvec x[]);
/* Calculate the mshift codes, based on the connection graph in g. */
+GMX_LIBGMX_EXPORT
void shift_x(t_graph *g,matrix box,rvec x[],rvec x_s[]);
/* Add the shift vector to x, and store in x_s (may be same array as x) */
+GMX_LIBGMX_EXPORT
void shift_self(t_graph *g,matrix box,rvec x[]);
/* Id. but in place */
+GMX_LIBGMX_EXPORT
void unshift_x(t_graph *g,matrix box,rvec x[],rvec x_s[]);
/* Subtract the shift vector from x_s, and store in x (may be same array) */
+GMX_LIBGMX_EXPORT
void unshift_self(t_graph *g,matrix box,rvec x[]);
/* Id, but in place */
* And Hey:
* Gromacs Runs On Most of All Computer Systems
*/
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
* to set some compute intesive variables to avoid
* N^2 operations later on.
*/
+GMX_LIBGMX_EXPORT
void
gmx_mtop_finalize(gmx_mtop_t *mtop);
/* Returns the total number of charge groups in mtop */
+GMX_LIBGMX_EXPORT
int
ncg_mtop(const gmx_mtop_t *mtop);
/* Removes the charge groups, i.e. makes single atom charge groups, in mtop */
+GMX_LIBGMX_EXPORT
void gmx_mtop_remove_chargegroups(gmx_mtop_t *mtop);
typedef struct gmx_mtop_atomlookup *gmx_mtop_atomlookup_t;
/* Initialize atom lookup by global atom number */
+GMX_LIBGMX_EXPORT
gmx_mtop_atomlookup_t
gmx_mtop_atomlookup_init(const gmx_mtop_t *mtop);
/* As gmx_mtop_atomlookup_init, but optimized for atoms involved in settle */
+GMX_LIBGMX_EXPORT
gmx_mtop_atomlookup_t
gmx_mtop_atomlookup_settle_init(const gmx_mtop_t *mtop);
/* Destroy a gmx_mtop_atomlookup_t data structure */
+GMX_LIBGMX_EXPORT
void
gmx_mtop_atomlookup_destroy(gmx_mtop_atomlookup_t alook);
* This can be an expensive operation, so if possible use
* one of the atom loop constructs below.
*/
+GMX_LIBGMX_EXPORT
void
gmx_mtop_atomnr_to_atom(const gmx_mtop_atomlookup_t alook,
int atnr_global,
/* Returns a pointer to the molecule interaction array ilist_mol[F_NRE]
* and the local atom number in the molecule belonging to atnr_global.
*/
+GMX_LIBGMX_EXPORT
void
gmx_mtop_atomnr_to_ilist(const gmx_mtop_atomlookup_t alook,
int atnr_global,
* and the atom number offset for the atom indices in moltype
* belonging to atnr_global.
*/
+GMX_LIBGMX_EXPORT
void
gmx_mtop_atomnr_to_molblock_ind(const gmx_mtop_atomlookup_t alook,
int atnr_global,
/* Returns atom name, global resnr and residue name of atom atnr_global */
+GMX_LIBGMX_EXPORT
void
gmx_mtop_atominfo_global(const gmx_mtop_t *mtop,int atnr_global,
char **atomname,int *resnr,char **resname);
* i.e. when you use groups which might differ per molecule,
* otherwise use gmx_mtop_atomloop_block.
*/
+GMX_LIBGMX_EXPORT
gmx_mtop_atomloop_all_t
gmx_mtop_atomloop_all_init(const gmx_mtop_t *mtop);
* ...
* }
*/
+GMX_LIBGMX_EXPORT
gmx_bool
gmx_mtop_atomloop_all_next(gmx_mtop_atomloop_all_t aloop,
int *at_global,t_atom **atom);
/* Initialize an atom loop over atoms in all molecule blocks the system.
*/
+GMX_LIBGMX_EXPORT
gmx_mtop_atomloop_block_t
gmx_mtop_atomloop_block_init(const gmx_mtop_t *mtop);
* ...
* }
*/
+GMX_LIBGMX_EXPORT
gmx_bool
gmx_mtop_atomloop_block_next(gmx_mtop_atomloop_block_t aloop,
t_atom **atom,int *nmol);
typedef struct gmx_mtop_ilistloop *gmx_mtop_ilistloop_t;
/* Initialize an ilist loop over all molecule types in the system. */
+GMX_LIBGMX_EXPORT
gmx_mtop_ilistloop_t
gmx_mtop_ilistloop_init(const gmx_mtop_t *mtop);
* writes the number of molecules for this ilist in *nmol.
* When at the end, destroys iloop and returns FALSE.
*/
+GMX_LIBGMX_EXPORT
gmx_bool
gmx_mtop_ilistloop_next(gmx_mtop_ilistloop_t iloop,
t_ilist **ilist_mol,int *nmol);
* i.e. when you use groups which might differ per molecule,
* otherwise use gmx_mtop_ilistloop.
*/
+GMX_LIBGMX_EXPORT
gmx_mtop_ilistloop_all_t
gmx_mtop_ilistloop_all_init(const gmx_mtop_t *mtop);
* writes the atom offset which should be added to iatoms in atnr_offset.
* When at the end, destroys iloop and returns FALSE.
*/
+GMX_LIBGMX_EXPORT
gmx_bool
gmx_mtop_ilistloop_all_next(gmx_mtop_ilistloop_all_t iloop,
t_ilist **ilist_mol,int *atnr_offset);
/* Returns the total number of interactions in the system of type ftype */
+GMX_LIBGMX_EXPORT
int
gmx_mtop_ftype_count(const gmx_mtop_t *mtop,int ftype);
/* Returns a charge group index for the whole system */
+GMX_LIBGMX_EXPORT
t_block
gmx_mtop_global_cgs(const gmx_mtop_t *mtop);
/* Returns a single t_atoms struct for the whole system */
+GMX_LIBGMX_EXPORT
t_atoms
gmx_mtop_global_atoms(const gmx_mtop_t *mtop);
/* Generate a 'local' topology for the whole system.
* When ir!=NULL the free energy interactions will be sorted to the end.
*/
+GMX_LIBGMX_EXPORT
gmx_localtop_t *
gmx_mtop_generate_local_top(const gmx_mtop_t *mtop,const t_inputrec *ir);
/* Converts a gmx_mtop_t struct to t_topology.
* All memory relating only to mtop will be freed.
*/
+GMX_LIBGMX_EXPORT
t_topology
gmx_mtop_t_to_t_topology(gmx_mtop_t *mtop);
#ifndef _MTXIO_H_
#define _MTXIO_H_
-
+#include "visibility.h"
#include "types/simple.h"
#include "sparsematrix.h"
* EITHER a pointer to a full storage matrix or a sparse storage
* matrix. If both pointers are non-NULL a fatal error will occur.
*/
+GMX_LIBGMX_EXPORT
void
gmx_mtxio_write(const char * filename,
int nrow,
* To determine the format you should set *full_matrix and *sparse_matrix to NULL
* before calling this routine, and check which one is non-NULL on return.
*/
+GMX_LIBGMX_EXPORT
void
gmx_mtxio_read (const char * filename,
int * nrow,
#ifndef _mvdata_h
#define _mvdata_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "types/commrec.h"
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
void bcast_ir_mtop(const t_commrec *cr,
t_inputrec *inputrec,gmx_mtop_t *mtop);
/* Broadcasts ir and mtop from the master to all nodes in cr->mpi_comm_mygroup.
*/
+GMX_LIBGMX_EXPORT
void bcast_state_setup(const t_commrec *cr,t_state *state);
/* Broadcasts the state sizes and flags
* from the master to all nodes in cr->mpi_comm_mygroup.
* The arrays are not broadcasted.
*/
+GMX_LIBGMX_EXPORT
void bcast_state(const t_commrec *cr,t_state *state,gmx_bool bAlloc);
/* Broadcasts state from the master to all nodes in cr->mpi_comm_mygroup.
* The arrays in state are allocated when bAlloc is TRUE.
void move_cgcm(FILE *log,const t_commrec *cr,rvec cg_cm[]);
+GMX_LIBMD_EXPORT
void move_rvecs(const t_commrec *cr,gmx_bool bForward,gmx_bool bSum,
int left,int right,rvec vecs[],rvec buf[],
int shift,t_nrnb *nrnb);
#ifndef _names_h
#define _names_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
* extra argument (the +1)
* these should correspond to names.c and include/types/enums.h
*/
+GMX_LIBGMX_EXPORT
extern const char *epbc_names[epbcNR+1];
+GMX_LIBGMX_EXPORT
extern const char *etcoupl_names[etcNR+1];
+GMX_LIBGMX_EXPORT
extern const char *epcoupl_names[epcNR+1];
+GMX_LIBGMX_EXPORT
extern const char *epcoupltype_names[epctNR+1];
+GMX_LIBGMX_EXPORT
extern const char *erefscaling_names[erscNR+1];
+GMX_LIBGMX_EXPORT
extern const char *ecutscheme_names[ecutsNR+1];
+GMX_LIBGMX_EXPORT
extern const char *ens_names[ensNR+1];
+GMX_LIBGMX_EXPORT
extern const char *ei_names[eiNR+1];
+GMX_LIBGMX_EXPORT
extern const char *yesno_names[BOOL_NR+1];
+GMX_LIBGMX_EXPORT
extern const char *bool_names[BOOL_NR+1];
+GMX_LIBGMX_EXPORT
extern const char *eintmod_names[eintmodNR+1];
+GMX_LIBGMX_EXPORT
extern const char *eel_names[eelNR+1];
+GMX_LIBGMX_EXPORT
extern const char *eewg_names[eewgNR+1];
+GMX_LIBGMX_EXPORT
extern const char *evdw_names[evdwNR+1];
+GMX_LIBGMX_EXPORT
extern const char *econstr_names[econtNR+1];
+GMX_LIBGMX_EXPORT
extern const char *ptype_str[eptNR+1];
+GMX_LIBGMX_EXPORT
extern const char *egrp_nm[egNR+1];
+GMX_LIBGMX_EXPORT
extern const char *edisre_names[edrNR+1];
+GMX_LIBGMX_EXPORT
extern const char *edisreweighting_names[edrwNR+1];
+GMX_LIBGMX_EXPORT
extern const char *enbf_names[eNBF_NR+1];
+GMX_LIBGMX_EXPORT
extern const char *ecomb_names[eCOMB_NR+1];
+GMX_LIBGMX_EXPORT
extern const char *gtypes[egcNR+1];
+GMX_LIBGMX_EXPORT
extern const char *esimtemp_names[esimtempNR+1];
+GMX_LIBGMX_EXPORT
extern const char *efep_names[efepNR+1];
+GMX_LIBGMX_EXPORT
extern const char *efpt_names[efptNR+1];
+GMX_LIBGMX_EXPORT
extern const char *elamstats_names[elamstatsNR+1];
+GMX_LIBGMX_EXPORT
extern const char *elmcmove_names[elmcmoveNR+1];
+GMX_LIBGMX_EXPORT
extern const char *elmceq_names[elmceqNR+1];
+GMX_LIBGMX_EXPORT
extern const char *separate_dhdl_file_names[esepdhdlfileNR+1];
+GMX_LIBGMX_EXPORT
extern const char *dhdl_derivatives_names[edhdlderivativesNR+1];
+GMX_LIBGMX_EXPORT
extern const char *esol_names[esolNR+1];
+GMX_LIBGMX_EXPORT
extern const char *edispc_names[edispcNR+1];
+GMX_LIBGMX_EXPORT
extern const char *ecm_names[ecmNR+1];
+GMX_LIBGMX_EXPORT
extern const char *eann_names[eannNR+1];
+GMX_LIBGMX_EXPORT
extern const char *egb_names[egbNR+1];
+GMX_LIBGMX_EXPORT
extern const char *eis_names[eisNR+1];
+GMX_LIBGMX_EXPORT
extern const char *esa_names[esaNR+1];
+GMX_LIBGMX_EXPORT
extern const char *ewt_names[ewtNR+1];
+GMX_LIBGMX_EXPORT
extern const char *epull_names[epullNR+1];
+GMX_LIBGMX_EXPORT
extern const char *epullg_names[epullgNR+1];
+GMX_LIBGMX_EXPORT
extern const char *erotg_names[erotgNR+1];
extern const char *erotg_originnames[erotgNR+1];
+GMX_LIBGMX_EXPORT
extern const char *erotg_fitnames[erotgFitNR+1];
+GMX_LIBGMX_EXPORT
extern const char *eQMmethod_names[eQMmethodNR+1];
+GMX_LIBGMX_EXPORT
extern const char *eQMbasis_names[eQMbasisNR+1];
+GMX_LIBGMX_EXPORT
extern const char *eQMMMscheme_names[eQMMMschemeNR+1];
extern const char *eMultentOpt_names[eMultentOptNR+1];
+GMX_LIBGMX_EXPORT
extern const char *eAdresstype_names[eAdressNR+1];
+GMX_LIBGMX_EXPORT
extern const char *eAdressICtype_names[eAdressICNR+1];
+GMX_LIBGMX_EXPORT
extern const char *eAdressSITEtype_names[eAdressSITENR+1];
+GMX_LIBGMX_EXPORT
extern const char *gmx_nblist_geometry_names[GMX_NBLIST_GEOMETRY_NR+1];
extern const char *gmx_nbkernel_elec_names[GMX_NBKERNEL_ELEC_NR+1];
extern const char *gmx_nbkernel_vdw_names[GMX_NBKERNEL_VDW_NR+1];
*/
#include <stdio.h>
-
+#include "visibility.h"
#include "types/simple.h"
#include "types/commrec.h"
#include "typedefs.h"
int gmx_node_rank(void);
/* return the rank of the node */
+GMX_LIBGMX_EXPORT
int gmx_hostname_num(void);
/* If the first part of the hostname (up to the first dot) ends with a number, returns this number.
If the first part of the hostname does not ends in a number (0-9 characters), returns 0.
*/
+GMX_LIBGMX_EXPORT
void gmx_setup_nodecomm(FILE *fplog,t_commrec *cr);
/* Sets up fast global communication for clusters with multi-core nodes */
+GMX_LIBGMX_EXPORT
void gmx_init_intra_counters(t_commrec *cr);
/* Initializes intra-node process counts and ID. */
void gmx_barrier(const t_commrec *cr);
/* Wait till all processes in cr->mpi_comm_mygroup have reached the barrier */
+GMX_LIBGMX_EXPORT
void gmx_bcast(int nbytes,void *b,const t_commrec *cr);
/* Broadcast nbytes bytes from the master to cr->mpi_comm_mygroup */
+GMX_LIBGMX_EXPORT
void gmx_bcast_sim(int nbytes,void *b,const t_commrec *cr);
/* Broadcast nbytes bytes from the sim master to cr->mpi_comm_mysim */
+GMX_LIBGMX_EXPORT
void gmx_sumi(int nr,int r[],const t_commrec *cr);
/* Calculate the global sum of an array of ints */
void gmx_sumli(int nr,gmx_large_int_t r[],const t_commrec *cr);
/* Calculate the global sum of an array of large ints */
+GMX_LIBGMX_EXPORT
void gmx_sumf(int nr,float r[],const t_commrec *cr);
/* Calculate the global sum of an array of floats */
+GMX_LIBGMX_EXPORT
void gmx_sumd(int nr,double r[],const t_commrec *cr);
/* Calculate the global sum of an array of doubles */
void gmx_sumd_comm(int nr,double r[],MPI_Comm mpi_comm);
/* Calculate the global sum of an array of doubles */
+GMX_LIBGMX_EXPORT
void gmx_sumi_sim(int nr,int r[],const gmx_multisim_t *ms);
/* Calculate the sum over the simulations of an array of ints */
+GMX_LIBGMX_EXPORT
void gmx_sumli_sim(int nr,gmx_large_int_t r[],const gmx_multisim_t *ms);
/* Calculate the sum over the simulations of an array of large ints */
+GMX_LIBGMX_EXPORT
void gmx_sumf_sim(int nr,float r[],const gmx_multisim_t *ms);
/* Calculate the sum over the simulations of an array of floats */
void gmx_abort(int nodeid,int nnodes,int errorno);
/* Abort the parallel run */
+GMX_LIBGMX_EXPORT
void gmx_finalize_par(void);
/* Finish the parallel run in an ordered manner */
#ifndef _nonbonded_h
#define _nonbonded_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "pbc.h"
#include "network.h"
+GMX_LIBGMX_EXPORT
void
gmx_nonbonded_setup(FILE * fplog,
t_forcerec * fr,
+GMX_LIBGMX_EXPORT
void
gmx_nonbonded_set_kernel_pointers(FILE * fplog,
t_nblist * nl);
#define GMX_NONBONDED_DO_POTENTIAL (1<<3)
#define GMX_NONBONDED_DO_SR (1<<4)
+GMX_LIBGMX_EXPORT
void
do_nonbonded(t_commrec *cr,t_forcerec *fr,
rvec x[],rvec f_shortrange[],rvec f_longrange[],t_mdatoms *md,t_blocka *excl,
#ifndef _nrama_h
#define _nrama_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "statutil.h"
#include "mshift.h"
output_env_t oenv;
} t_xrama;
+GMX_LIBGMX_EXPORT
t_topology *init_rama(const output_env_t oenv, const char *infile,
const char *topfile, t_xrama *xr,int mult);
+GMX_LIBGMX_EXPORT
gmx_bool new_data(t_xrama *xr);
#ifdef __cplusplus
#ifndef _nrjac_h
#define _nrjac_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
void jacobi(double **a,int n,double d[],double **v,int *nrot);
/*
* real **omega = input matrix a[0..n-1][0..n-1] must be symmetric
* int *irot = number of jacobi rotations
*/
+GMX_LIBGMX_EXPORT
int m_inv_gen(real **m,int n,real **minv);
/* Produces minv, a generalized inverse of m.
* Inversion is done via diagonalization,
#ifndef _nrnb_h
#define _nrnb_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "types/commrec.h"
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
void init_nrnb(t_nrnb *nrnb);
void cp_nrnb(t_nrnb *dest, t_nrnb *src);
void add_nrnb(t_nrnb *dest, t_nrnb *s1, t_nrnb *s2);
+GMX_LIBGMX_EXPORT
void print_nrnb(FILE *out, t_nrnb *nrnb);
void _inc_nrnb(t_nrnb *nrnb,int enr,int inc,char *file,int line);
#endif
+GMX_LIBGMX_EXPORT
void print_flop(FILE *out,t_nrnb *nrnb,double *nbfs,double *mflop);
/* Calculates the non-bonded forces and flop count.
* When out!=NULL also prints the full count table.
*/
+GMX_LIBGMX_EXPORT
void print_perf(FILE *out,double nodetime,double realtime,int nprocs,
gmx_large_int_t nsteps,real delta_t,
double nbfs,double mflop,
int omp_nth_pp);
/* Prints the performance, nbfs and mflop come from print_flop */
+GMX_LIBGMX_EXPORT
void pr_load(FILE *log,t_commrec *cr,t_nrnb nrnb[]);
/* Print detailed load balancing info */
+GMX_LIBGMX_EXPORT
int cost_nrnb(int enr);
/* Cost in i860 cycles of this component of MD */
+GMX_LIBGMX_EXPORT
const char *nrnb_str(int enr);
/* Name of this component */
#define _ns_h
#include <stdio.h>
+#include "visibility.h"
#include "sysstuff.h"
#include "typedefs.h"
#include "pbc.h"
*
****************************************************/
+GMX_LIBMD_EXPORT
void init_neighbor_list(FILE *log,t_forcerec *fr,int homenr);
/*
* nn is the number of energy terms in the energy matrix
const gmx_mtop_t *mtop,
matrix box);
+GMX_LIBMD_EXPORT
int search_neighbours(FILE *log,t_forcerec *fr,
rvec x[],matrix box,
gmx_localtop_t *top,
/* Debugging routines from wnblist.c */
+GMX_LIBMD_EXPORT
void dump_nblist(FILE *out,t_commrec *cr,t_forcerec *fr,int nDNL);
int read_nblist(FILE *in,FILE *out,int **mat,int natoms,gmx_bool bSymm);
/* Returns total number of neighbors. If bSymm the matrix is symmetrized. */
+GMX_LIBMD_EXPORT
int natoms_beyond_ns_buffer(t_inputrec *ir,t_forcerec *fr,t_block *cgs,
matrix scale_tot,rvec *x);
/* Returns the number of atoms that moved beyond the ns buffer */
* And Hey:
* Gromacs Runs On Most of All Computer Systems
*/
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
* that a charge group moved to another DD domain.
*/
+GMX_LIBMD_EXPORT
t_grid *init_grid(FILE *fplog,t_forcerec *fr);
void done_grid(t_grid *grid);
#ifndef _oenv_h
#define _oenv_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
int output_env_get_debug_level(const output_env_t oenv);
/* return the debug level */
+GMX_LIBGMX_EXPORT
const char *output_env_get_time_unit(const output_env_t oenv);
/* return time unit (e.g. ps or ns) */
+GMX_LIBGMX_EXPORT
const char *output_env_get_time_label(const output_env_t oenv);
/* return time unit label (e.g. "Time (ps)") */
+GMX_LIBGMX_EXPORT
const char *output_env_get_xvgr_tlabel(const output_env_t oenv);
/* retrun x-axis time label for xmgr */
+GMX_LIBGMX_EXPORT
real output_env_get_time_factor(const output_env_t oenv);
/* return time conversion factor from ps (i.e. 1e-3 for ps->ns) */
+GMX_LIBGMX_EXPORT
real output_env_get_time_invfactor(const output_env_t oenv);
/* return inverse time conversion factor from ps (i.e. 1e3 for ps->ns) */
+GMX_LIBGMX_EXPORT
real output_env_conv_time(const output_env_t oenv, real time);
/* return converted time */
+GMX_LIBGMX_EXPORT
void output_env_conv_times(const output_env_t oenv, int n, real *time);
/* convert array of times */
/* Return TRUE when user requested viewing of the file */
+GMX_LIBGMX_EXPORT
xvg_format_t output_env_get_xvg_format(const output_env_t oenv);
/* Returns enum (see above) for xvg output formatting */
#ifndef _orires_h
#define _orires_h
-
+#include "visibility.h"
#include "sysstuff.h"
#include "typedefs.h"
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
void init_orires(FILE *fplog,const gmx_mtop_t *mtop,
rvec x[],
const t_inputrec *ir,
* Returns the weighted RMS deviation of the orientation restraints.
*/
+GMX_LIBGMX_EXPORT
void diagonalize_orires_tensors(t_oriresdata *od);
/*
* Diagonalizes the order tensor(s) of the orienation restraints.
* the 3 eigenvectors. The eigenvalues are ordered on magnitude.
*/
+GMX_LIBGMX_EXPORT
void print_orires_log(FILE *log,t_oriresdata *od);
/* Print order parameter, eigenvalues and eigenvectors to the log file */
t_ifunc orires;
/* Does only the orientation restraint force calculation */
+GMX_LIBGMX_EXPORT
void update_orires_history(t_fcdata *fcd,history_t *hist);
/* Copy the new time averages that have been calculated in calc_orires_dev */
#ifndef _partdec_h
#define _partdec_h
-
+#include "visibility.h"
#include "vsite.h"
#ifdef __cplusplus
int pd_bshift(const t_commrec *cr);
+GMX_LIBMD_EXPORT
void pd_cg_range(const t_commrec *cr,int *cg0,int *cg1);
/* Get the range for the home charge groups */
+GMX_LIBMD_EXPORT
void pd_at_range(const t_commrec *cr,int *at0,int *at1);
/* Get the range for the home particles */
+GMX_LIBMD_EXPORT
gmx_localtop_t *split_system(FILE *log,
gmx_mtop_t *mtop,t_inputrec *inputrec,
t_commrec *cr);
gmx_bool setup_parallel_vsites(t_idef *idef,t_commrec *cr,
t_comm_vsites *vsitecomm);
+GMX_LIBMD_EXPORT
t_state *partdec_init_local_state(t_commrec *cr,t_state *state_global);
/* Generate a local state struct from the global one */
#ifndef _types_pbc_h
#define _types_pbc_h
-
+#include "visibility.h"
#include "sysstuff.h"
#include "typedefs.h"
#include "types/commrec.h"
ecenterDEF = ecenterTRIC
};
+GMX_LIBGMX_EXPORT
int ePBC2npbcdim(int ePBC);
/* Returns the number of dimensions that use pbc, starting at X */
+GMX_LIBGMX_EXPORT
int inputrec2nboundeddim(t_inputrec *ir);
/* Returns the number of dimensions in which
* the coordinates of the particles are bounded, starting at X.
void dump_pbc(FILE *fp,t_pbc *pbc);
/* Dump the contents of the pbc structure to the file */
+GMX_LIBGMX_EXPORT
const char *check_box(int ePBC,matrix box);
/* Returns NULL if the box is supported by Gromacs.
* Otherwise is returns a string with the problem.
* When ePBC=-1, the type of pbc is guessed from the box matrix.
*/
+GMX_LIBGMX_EXPORT
real max_cutoff2(int ePBC,matrix box);
/* Returns the square of the maximum cut-off allowed for the box,
* taking into account that the grid neighborsearch code and pbc_dx
* only check combinations of single box-vector shifts.
*/
+GMX_LIBGMX_EXPORT
int guess_ePBC(matrix box);
/* Guesses the type of periodic boundary conditions using the box */
+GMX_LIBGMX_EXPORT
gmx_bool correct_box(FILE *fplog,int step,tensor box,t_graph *graph);
/* Checks for un-allowed box angles and corrects the box
* and the integer shift vectors in the graph (if graph!=NULL) if necessary.
* Returns TRUE when the box was corrected.
*/
+GMX_LIBGMX_EXPORT
int ndof_com(t_inputrec *ir);
/* Returns the number of degrees of freedom of the center of mass */
+GMX_LIBGMX_EXPORT
void set_pbc(t_pbc *pbc,int ePBC,matrix box);
/* Initiate the periodic boundary conditions.
* pbc_dx will not use pbc and return the normal difference vector
* When ePBC=-1, the type of pbc is guessed from the box matrix.
*/
+GMX_LIBGMX_EXPORT
t_pbc *set_pbc_dd(t_pbc *pbc,int ePBC,
gmx_domdec_t *dd,gmx_bool bSingleDir,matrix box);
/* As set_pbc, but additionally sets that correct distances can
* Returns pbc when pbc operations are required, NULL otherwise.
*/
+GMX_LIBGMX_EXPORT
void pbc_dx(const t_pbc *pbc,const rvec x1, const rvec x2, rvec dx);
/* Calculate the correct distance vector from x2 to x1 and put it in dx.
* set_pbc must be called before ever calling this routine.
* pbc->bLimitDistance=FALSE and thus all distances are correct.
*/
+GMX_LIBGMX_EXPORT
int pbc_dx_aiuc(const t_pbc *pbc,const rvec x1,const rvec x2,rvec dx);
/* Calculate the correct distance vector from x2 to x1 and put it in dx,
* This function can only be used when all atoms are in the rectangular
* (see calc_shifts below on how to obtain shift_vec)
* set_pbc_dd or set_pbc must be called before ever calling this routine.
*/
+GMX_LIBGMX_EXPORT
void pbc_dx_d(const t_pbc *pbc,const dvec x1, const dvec x2, dvec dx);
/* As pbc_dx, but for double precision vectors.
* set_pbc must be called before ever calling this routine.
* It is assumed that rlong2 is scaled the same way as the ivecs xi and xj.
*/
+GMX_LIBGMX_EXPORT
void calc_shifts(matrix box,rvec shift_vec[]);
/* This routine calculates ths shift vectors necessary to use the
* ns routine.
*/
+GMX_LIBGMX_EXPORT
void calc_box_center(int ecenter,matrix box,rvec box_center);
/* Calculates the center of the box.
* See the description for the enum ecenter above.
*/
+GMX_LIBGMX_EXPORT
void calc_triclinic_images(matrix box,rvec img[]);
/* Calculates the NTRICIMG box images */
+GMX_LIBGMX_EXPORT
void calc_compact_unitcell_vertices(int ecenter,matrix box,
rvec vert[]);
/* Calculates the NCUCVERT vertices of a compact unitcell */
+GMX_LIBGMX_EXPORT
int *compact_unitcell_edges(void);
/* Return an array of unitcell edges of length NCUCEDGE*2,
* this is an index in vert[], which is calculated by calc_unitcell_vertices.
* The index does not change, so it needs to be retrieved only once.
*/
+GMX_LIBGMX_EXPORT
void put_atoms_in_box_omp(int ePBC,matrix box,int natoms,rvec x[]);
/* This wrapper function around put_atoms_in_box() with the ugly manual
* workload splitting is needed toavoid silently introducing multithreading
* */
+GMX_LIBGMX_EXPORT
void put_atoms_in_box(int ePBC, matrix box,int natoms,rvec x[]);
/* These routines puts ONE or ALL atoms in the box, not caring
* about charge groups!
* Also works for triclinic cells.
*/
+GMX_LIBGMX_EXPORT
void put_atoms_in_triclinic_unitcell(int ecenter,matrix box,
int natoms,rvec x[]);
/* This puts ALL atoms in the triclinic unit cell, centered around the
* box center as calculated by calc_box_center.
*/
+GMX_LIBGMX_EXPORT
const char *put_atoms_in_compact_unitcell(int ePBC,int ecenter,
matrix box,
int natoms,rvec x[]);
#ifndef _pdb2top_h
#define _pdb2top_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "grompp.h"
#include "gpp_atomtype.h"
/* this *MUST* correspond to array in pdb2top.c */
enum { ehisA, ehisB, ehisH, ehis1, ehisNR };
+GMX_LIBGMXPREPROCESS_EXPORT
extern const char *hh[ehisNR];
typedef struct {
char *a1,*a2;
} t_ssbond;
+GMX_LIBGMXPREPROCESS_EXPORT
void choose_ff(const char *ffsel,
char *forcefield, int ff_maxlen,
char *ffdir, int ffdir_maxlen);
* If ffsel==NULL: interactive selection.
*/
+GMX_LIBGMXPREPROCESS_EXPORT
void choose_watermodel(const char *wmsel,const char *ffdir,
char **watermodel);
/* Choose, possibly interactively, which water model to include,
* in ffdir.
*/
+GMX_LIBGMXPREPROCESS_EXPORT
void get_hackblocks_rtp(t_hackblock **hb, t_restp **restp,
int nrtp, t_restp rtp[],
int nres, t_resinfo *resinfo,
* and store them in restp and hb.
*/
+GMX_LIBGMXPREPROCESS_EXPORT
void match_atomnames_with_rtp(t_restp restp[],t_hackblock hb[],
t_atoms *pdba,rvec *x,
gmx_bool bVerbose);
* add these atoms to restp.
*/
+GMX_LIBGMXPREPROCESS_EXPORT
void print_top_comment(FILE *out,const char *filename,const char *generator,const char *ffdir,gmx_bool bITP);
+GMX_LIBGMXPREPROCESS_EXPORT
void print_top_header(FILE *out,const char *filename,const char *title,gmx_bool bITP,
const char *ffdir,real mHmult);
+GMX_LIBGMXPREPROCESS_EXPORT
void print_top_mols(FILE *out,
const char *title, const char *ffdir, const char *water,
int nincl, char **incls,
int nmol, t_mols *mols);
+GMX_LIBGMXPREPROCESS_EXPORT
void write_top(FILE *out, char *pr,char *molname,
t_atoms *at,gmx_bool bRTPresname,
int bts[],t_params plist[],t_excls excls[],
/* NOTE: nrexcl is not the size of *excl! */
+GMX_LIBGMXPREPROCESS_EXPORT
void pdb2top(FILE *top_file, char *posre_fn, char *molname,
t_atoms *atoms,rvec **x,
gpp_atomtype_t atype,t_symtab *tab,
gmx_bool bRenumRes,gmx_bool bRTPresname);
/* Create a topology ! */
+GMX_LIBGMXPREPROCESS_EXPORT
void print_sums(t_atoms *atoms, gmx_bool bSystem);
#ifndef _pdbio_h
#define _pdbio_h
-
+#include "visibility.h"
#include "sysstuff.h"
#include "typedefs.h"
#include "symtab.h"
/* Enumerated value for indexing an uij entry (anisotropic temperature factors) */
enum { U11, U22, U33, U12, U13, U23 };
+GMX_LIBGMX_EXPORT
void set_pdb_wide_format(gmx_bool bSet);
/* If bSet, use wider format for occupancy and bfactor */
/* set read_pdbatoms to read upto 'TER' or 'ENDMDL' (default, bSet=FALSE).
This function is fundamentally broken as far as thread-safety is concerned.*/
+GMX_LIBGMX_EXPORT
void gmx_write_pdb_box(FILE *out,int ePBC,matrix box);
/* write the box in the CRYST1 record,
* with ePBC=-1 the pbc is guessed from the box
* This function is fundamentally broken as far as thread-safety is concerned.
*/
+GMX_LIBGMX_EXPORT
void write_pdbfile_indexed(FILE *out,const char *title,t_atoms *atoms,
rvec x[],int ePBC,matrix box,char chain,
int model_nr,atom_id nindex,atom_id index[],
gmx_conect conect,gmx_bool bTerSepChains);
/* REALLY low level */
+GMX_LIBGMX_EXPORT
void write_pdbfile(FILE *out,const char *title,t_atoms *atoms,
rvec x[],int ePBC,matrix box,char chain,
int model_nr,gmx_conect conect,gmx_bool bTerSepChains);
* which may be useful for visualization purposes.
*/
+GMX_LIBGMX_EXPORT
void get_pdb_atomnumber(t_atoms *atoms,gmx_atomprop_t aps);
/* Routine to extract atomic numbers from the atom names */
void get_pdb_coordnum(FILE *in,int *natoms);
/* Read a pdb file and count the ATOM and HETATM fields. */
+GMX_LIBGMX_EXPORT
gmx_bool is_hydrogen(const char *nm);
/* Return whether atom nm is a hydrogen */
+GMX_LIBGMX_EXPORT
gmx_bool is_dummymass(const char *nm);
/* Return whether atom nm is a dummy mass */
void gmx_conect_add(gmx_conect conect,int ai,int aj);
/* Add a connection between ai and aj (numbered from 0 to natom-1) */
+GMX_LIBGMX_EXPORT
gmx_conect gmx_conect_generate(t_topology *top);
/* Generate a conect structure from a topology */
*/
#ifndef _perf_est_h
#define _perf_est_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
* This number is also roughly proportional to the computational cost.
*/
+GMX_LIBMD_EXPORT
float pme_load_estimate(gmx_mtop_t *mtop,t_inputrec *ir,matrix box);
/* Returns an estimate for the relative load of the PME mesh calculation
* in the total force calculation.
#define _pme_h
#include <stdio.h>
+#include "visibility.h"
#include "typedefs.h"
#include "gmxcomplex.h"
#include "gmx_wallcycle.h"
enum { GMX_SUM_QGRID_FORWARD, GMX_SUM_QGRID_BACKWARD };
+GMX_LIBMD_EXPORT
int gmx_pme_init(gmx_pme_t *pmedata,t_commrec *cr,
int nnodes_major,int nnodes_minor,
t_inputrec *ir,int homenr,
* Return value 0 indicates all well, non zero is an error code.
*/
+GMX_LIBMD_EXPORT
int gmx_pme_reinit(gmx_pme_t * pmedata,
t_commrec * cr,
gmx_pme_t pme_src,
* Return value 0 indicates all well, non zero is an error code.
*/
+GMX_LIBMD_EXPORT
int gmx_pmeonly(gmx_pme_t pme,
t_commrec *cr, t_nrnb *mynrnb,
gmx_wallcycle_t wcycle,
gmx_large_int_t step);
/* Send the coordinates to our PME-only node and request a PME calculation */
+GMX_LIBMD_EXPORT
void gmx_pme_send_finish(t_commrec *cr);
/* Tell our PME-only node to finish */
+GMX_LIBMD_EXPORT
void gmx_pme_send_switch(t_commrec *cr, ivec grid_size, real ewaldcoeff);
/* Tell our PME-only node to switch to a new grid size */
#ifndef _princ_h
#define _princ_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
void rotate_atoms(int gnx,atom_id index[],rvec x[],matrix trans);
/* Rotate all atoms in index using matrix trans */
+GMX_LIBGMX_EXPORT
void principal_comp(int n,atom_id index[],t_atom atom[],rvec x[],
matrix trans,rvec d);
/* Calculate the principal components of atoms in index. Atoms are
* mass weighted. It is assumed that the center of mass is in the origin!
*/
+GMX_LIBGMX_EXPORT
void orient_princ(t_atoms *atoms, int isize, atom_id *index,
int natoms, rvec x[], rvec *v, rvec d);
/* rotates molecule to align principal axes with coordinate axes */
+GMX_LIBGMX_EXPORT
real calc_xcm(rvec x[],int gnx,atom_id *index,t_atom *atom,rvec xcm,
gmx_bool bQ);
/* Calculate the center of mass of the atoms in index. if bQ then the atoms
* Returns the total mass/charge.
*/
+GMX_LIBGMX_EXPORT
real sub_xcm(rvec x[],int gnx,atom_id *index,t_atom atom[],rvec xcm,
gmx_bool bQ);
/* Calc. the center of mass and subtract it from all coordinates.
#ifndef _pull_h
#define _pull_h
-
+#include "visibility.h"
#include "vec.h"
#include "typedefs.h"
for mdrun to interface with the pull code */
/* Get the distance to the reference and deviation for pull group g */
+GMX_LIBMD_EXPORT
void get_pullgrp_distance(t_pull *pull,t_pbc *pbc,int g,double t,
dvec dr,dvec dev);
/* Make a selection of the home atoms for all pull groups.
* Should be called at every domain decomposition.
*/
+GMX_LIBMD_EXPORT
void dd_make_local_pull_groups(gmx_domdec_t *dd,
t_pull *pull,t_mdatoms *md);
/* get memory and initialize the fields of pull that still need it, and
do runtype specific initialization */
+GMX_LIBMD_EXPORT
void init_pull(FILE *fplog,
t_inputrec *ir, /* the inputrec */
int nfile,
unsigned long Flags);
/* Close the pull output files */
+GMX_LIBMD_EXPORT
void finish_pull(FILE *fplog,t_pull *pull);
/* Print the pull output (x and/or f) */
+GMX_LIBMD_EXPORT
void pull_print_output(t_pull *pull, gmx_large_int_t step, double time);
/* In pullutil.c */
/* Calculates centers of mass all pull groups */
+GMX_LIBMD_EXPORT
void pull_calc_coms(t_commrec *cr,
t_pull *pull, /* the pull group */
t_mdatoms *md, /* all atoms */
#ifndef _pull_rotation_h
#define _pull_rotation_h
-
+#include "visibility.h"
#include "vec.h"
#include "typedefs.h"
* \param Flags Flags passed over from main, used to determine
* whether or not we are doing a rerun.
*/
+GMX_LIBMD_EXPORT
extern void init_rot(FILE *fplog,t_inputrec *ir,int nfile,const t_filenm fnm[],
t_commrec *cr, rvec *x, matrix box, gmx_mtop_t *mtop, const output_env_t oenv,
gmx_bool bVerbose, unsigned long Flags);
* \param fplog General output file, normally md.log.
* \param rot Pointer to all the enforced rotation data.
*/
+GMX_LIBMD_EXPORT
extern void finish_rot(FILE *fplog,t_rot *rot);
#ifndef _QMMM_h
#define _QMMM_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "pbc.h"
#include "network.h"
t_QMMMrec *mk_QMMMrec(void);
/* allocates memory for QMMMrec */
+GMX_LIBMD_EXPORT
void init_QMMMrec(t_commrec *cr,
matrix box,
gmx_mtop_t *mtop,
#ifndef _random_h
#define _random_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
int make_seed(void);
/* Make a random seed: (time+getpid) % 1000000 */
+GMX_LIBGMX_EXPORT
real rando(int *seed);
/* Generate a random number 0 <= r < 1. seed is the (address of) the
* random seed variable.
*/
+GMX_LIBGMX_EXPORT
void maxwell_speed(real tempi,int seed,
gmx_mtop_t *mtop, rvec v[]);
/* Generate velocites according to a maxwellian distribution */
* moment of Inertia. Returns the total mass.
*/
+GMX_LIBGMX_EXPORT
void stop_cm(FILE *log,int natoms,real mass[],rvec x[],rvec v[]);
#ifdef __cplusplus
#ifndef _rbin_h
#define _rbin_h
-
+#include "visibility.h"
#include "sysstuff.h"
#include "typedefs.h"
#include "network.h"
double *rbuf;
} t_bin;
+GMX_LIBGMX_EXPORT
t_bin *mk_bin(void);
/* Create a real bin */
+GMX_LIBGMX_EXPORT
void destroy_bin(t_bin *b);
/* Destroy the bin structure */
+GMX_LIBGMX_EXPORT
void reset_bin(t_bin *b);
/* Reset number of entries to zero */
+GMX_LIBGMX_EXPORT
int add_binr(t_bin *b,int nr,real r[]);
+GMX_LIBGMX_EXPORT
int add_bind(t_bin *b,int nr,double r[]);
/* Add reals to the bin. Returns index */
+GMX_LIBGMX_EXPORT
void sum_bin(t_bin *b,t_commrec *cr);
/* Globally sum the reals in the bin */
+GMX_LIBGMX_EXPORT
void extract_binr(t_bin *b,int index,int nr,real r[]);
+GMX_LIBGMX_EXPORT
void extract_bind(t_bin *b,int index,int nr,double r[]);
/* Extract values from the bin, starting from index (see add_bin) */
#ifndef _readinp_h
#define _readinp_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "warninp.h"
+GMX_LIBGMX_EXPORT
t_inpfile *read_inpfile(const char *fn,int *ninp,
char **cppopts,
warninp_t wi);
ninp = the number of read parameters
cppopts = the cpp-style options for #include paths and #defines */
+GMX_LIBGMX_EXPORT
void write_inpfile(const char *fn,int ninp,t_inpfile inp[],
gmx_bool bHaltOnUnknown,
warninp_t wi);
+GMX_LIBGMX_EXPORT
void replace_inp_entry(int ninp,t_inpfile *inp,
const char *old_entry,const char *new_entry);
+GMX_LIBGMX_EXPORT
int get_eint(int *ninp,t_inpfile **inp,const char *name,int def,
warninp_t wi);
+GMX_LIBGMX_EXPORT
gmx_large_int_t get_egmx_large_int(int *ninp,t_inpfile **inp,
const char *name,gmx_large_int_t def,
warninp_t);
+GMX_LIBGMX_EXPORT
double get_ereal(int *ninp,t_inpfile **inp,const char *name,double def,
warninp_t wi);
+GMX_LIBGMX_EXPORT
const char *get_estr(int *ninp,t_inpfile **inp,const char *name,const char *def);
+GMX_LIBGMX_EXPORT
int get_eeenum(int *ninp,t_inpfile **inp,const char *name,const char **defs,
warninp_t wi);
/* defs must be NULL terminated */
+GMX_LIBGMX_EXPORT
int get_eenum(int *ninp,t_inpfile **inp,const char *name,const char **defs);
/* defs must be NULL terminated */
gmx_bool opt2parg_gmx_bool(const char *option,int nparg,t_pargs pa[]);
+GMX_LIBGMX_EXPORT
real opt2parg_real(const char *option,int nparg,t_pargs pa[]);
+GMX_LIBGMX_EXPORT
const char *opt2parg_str(const char *option,int nparg,t_pargs pa[]);
const char *opt2parg_enum(const char *option,int nparg,t_pargs pa[]);
+GMX_LIBGMX_EXPORT
gmx_bool opt2parg_bSet(const char *option,int nparg,t_pargs pa[]);
void print_pargs(FILE *fp, int npargs,t_pargs pa[],gmx_bool bLeadingSpace);
#ifndef _resall_h
#define _resall_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "hackblock.h"
#include "gpp_atomtype.h"
* Generates a fatal error when rtpname is not found.
*/
+GMX_LIBGMXPREPROCESS_EXPORT
gpp_atomtype_t read_atype(const char *ffdir,t_symtab *tab);
/* read atom type database(s) */
+GMX_LIBGMXPREPROCESS_EXPORT
void read_resall(char *resdb, int *nrtp,t_restp **rtp,
gpp_atomtype_t atype, t_symtab *tab,
gmx_bool bAllowOverrideRTP);
/* read rtp database, append to the existing database */
+GMX_LIBGMXPREPROCESS_EXPORT
void print_resall(FILE *out, int nrtp, t_restp rtp[],
gpp_atomtype_t atype);
/* write rtp database */
#ifndef _rmpbc_h
#define _rmpbc_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
typedef struct gmx_rmpbc *gmx_rmpbc_t;
+GMX_LIBGMX_EXPORT
gmx_rmpbc_t gmx_rmpbc_init(t_idef *idef,int ePBC,int natoms,
matrix box);
+GMX_LIBGMX_EXPORT
void gmx_rmpbc_done(gmx_rmpbc_t gpbc);
+GMX_LIBGMX_EXPORT
void gmx_rmpbc(gmx_rmpbc_t gpbc,int natoms,matrix box,rvec x[]);
/* Correct coordinates x for atoms within every molecule for the periodic
* boundary conditions such that every molecule is whole.
* When ePBC=-1, the type of pbc is guessed from the box matrix.
*/
+GMX_LIBGMX_EXPORT
void gmx_rmpbc_copy(gmx_rmpbc_t gpbc,int natoms,matrix box,rvec x[],
rvec x_s[]);
/* As gmx_rmpbc, but outputs in x_s and does not modify x. */
+GMX_LIBGMX_EXPORT
void gmx_rmpbc_trxfr(gmx_rmpbc_t gpbc,t_trxframe *fr);
/* As gmx_rmpbc but operates on a t_trxframe data structure. */
matrix box,rvec x[],rvec x_s[]);*/
/* Convenience function that still holds a static variable. */
+GMX_LIBGMX_EXPORT
void rm_gropbc(t_atoms *atoms,rvec x[],matrix box);
/* Simple routine for use in analysis tools that just have a pdb or
* similar file.
#ifndef _sfactor_h
#define _sfactor_h
-
+#include "visibility.h"
#include "index.h"
#include "types/simple.h"
#include "gmxcomplex.h"
void rearrange_atoms (reduced_atom_t * positions, t_trxframe *fr, atom_id * index,
int isize, t_topology * top, gmx_bool flag,gmx_structurefactors_t *gsf);
+GMX_LIBGMX_EXPORT
int do_scattering_intensity (const char* fnTPS, const char* fnNDX,
const char* fnXVG, const char *fnTRX,
const char* fnDAT,
* And Hey:
* Gallium Rubidium Oxygen Manganese Argon Carbon Silicon
*/
-
+#include "visibility.h"
#include "typedefs.h"
#include "vsite.h"
/* Initialization function, also predicts the initial shell postions.
* If x!=NULL, the shells are predict for the global coordinates x.
*/
+GMX_LIBMD_EXPORT
gmx_shellfc_t init_shell_flexcon(FILE *log,
gmx_mtop_t *mtop,int nflexcon,
rvec *x);
/* Get the local shell with domain decomposition */
+GMX_LIBMD_EXPORT
void make_local_shells(t_commrec *cr,t_mdatoms *md,
gmx_shellfc_t shfc);
/* Optimize shell positions */
+GMX_LIBMD_EXPORT
int relax_shell_flexcon(FILE *log,t_commrec *cr,gmx_bool bVerbose,
gmx_large_int_t mdstep,t_inputrec *inputrec,
gmx_bool bDoNS,int force_flags,
#define _sighandler_h
#include <signal.h>
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
/* the externally visible functions: */
/* install the signal handlers that can set the stop condition. */
+GMX_LIBGMX_EXPORT
void signal_handler_install(void);
/* get the current stop condition */
+GMX_LIBGMX_EXPORT
gmx_stop_cond_t gmx_get_stop_condition(void);
/* set the stop condition upon receiving a remote one */
+GMX_LIBGMX_EXPORT
void gmx_set_stop_condition(gmx_stop_cond_t recvd_stop_cond);
/* get the signal name that lead to the current stop condition. */
+GMX_LIBGMX_EXPORT
const char *gmx_get_signal_name(void);
/* check whether we received a USR1 signal.
The condition is reset once a TRUE value is returned, so this function
only returns TRUE once for a single signal. */
+GMX_LIBGMX_EXPORT
gmx_bool gmx_got_usr_signal(void);
#define _sim_util_h
#include <time.h>
+#include "visibility.h"
#include "typedefs.h"
#include "enxio.h"
#include "mdebin.h"
} gmx_runtime_t;
+GMX_LIBMD_EXPORT
void do_pbc_first(FILE *log,matrix box,t_forcerec *fr,
t_graph *graph,rvec x[]);
+GMX_LIBMD_EXPORT
void do_pbc_first_mtop(FILE *fplog,int ePBC,matrix box,
gmx_mtop_t *mtop,rvec x[]);
+GMX_LIBMD_EXPORT
void do_pbc_mtop(FILE *fplog,int ePBC,matrix box,
gmx_mtop_t *mtop,rvec x[]);
/* ROUTINES from stat.c */
+GMX_LIBMD_EXPORT
gmx_global_stat_t global_stat_init(t_inputrec *ir);
void global_stat_destroy(gmx_global_stat_t gs);
* and names required by mdrun.
*/
+GMX_LIBMD_EXPORT
void done_mdoutf(gmx_mdoutf_t *of);
/* Close all open output files and free the of pointer */
#define MDOF_XTC (1<<3)
#define MDOF_CPT (1<<4)
+GMX_LIBMD_EXPORT
void write_traj(FILE *fplog,t_commrec *cr,
gmx_mdoutf_t *of,
int mdof_flags,
* Data is collected to the master node only when necessary.
*/
+GMX_LIBMD_EXPORT
int do_per_step(gmx_large_int_t step,gmx_large_int_t nstep);
/* Return TRUE if io should be done */
/* ROUTINES from sim_util.c */
+GMX_LIBMD_EXPORT
double gmx_gettime();
+GMX_LIBMD_EXPORT
void print_time(FILE *out, gmx_runtime_t *runtime,
gmx_large_int_t step,t_inputrec *ir, t_commrec *cr);
+GMX_LIBMD_EXPORT
void runtime_start(gmx_runtime_t *runtime);
+GMX_LIBMD_EXPORT
void runtime_end(gmx_runtime_t *runtime);
+GMX_LIBMD_EXPORT
void runtime_upd_proc(gmx_runtime_t *runtime);
/* The processor time should be updated every once in a while,
* since on 32-bit manchines it loops after 72 minutes.
*/
+GMX_LIBMD_EXPORT
void print_date_and_time(FILE *log,int pid,const char *title,
const gmx_runtime_t *runtime);
+GMX_LIBMD_EXPORT
void finish_run(FILE *log,t_commrec *cr,const char *confout,
t_inputrec *inputrec,
t_nrnb nrnb[],gmx_wallcycle_t wcycle,
void initialize_lambdas(FILE *fplog,t_inputrec *ir,int *fep_state,real *lambda,double *lam0);
+GMX_LIBMD_EXPORT
void do_constrain_first(FILE *log,gmx_constr_t constr,
t_inputrec *inputrec,t_mdatoms *md,
t_state *state,rvec *f,
t_graph *graph,t_commrec *cr,t_nrnb *nrnb,
t_forcerec *fr, gmx_localtop_t *top, tensor shake_vir);
+GMX_LIBMD_EXPORT
void init_md(FILE *fplog,
t_commrec *cr,t_inputrec *ir, const output_env_t oenv,
double *t,double *t0,
#ifndef _smalloc_h
#define _smalloc_h
-
+#include "visibility.h"
#include <stdlib.h>
/*
extern "C" {
#endif
-void *save_malloc(const char *name,const char *file,int line,size_t size);
+GMX_LIBGMX_EXPORT
+void *save_malloc(const char *name,const char *file,int line,size_t size);
+GMX_LIBGMX_EXPORT
void *save_calloc(const char *name,const char *file,int line,
size_t nelem,size_t elsize);
+GMX_LIBGMX_EXPORT
void *save_realloc(const char *name,const char *file,int line,
void *ptr,size_t nelem,size_t elsize);
+GMX_LIBGMX_EXPORT
void save_free(const char *name,const char *file,int line, void *ptr);
size_t maxavail(void);
size_t memavail(void);
/* Aligned-memory counterparts */
+GMX_LIBGMX_EXPORT
void *save_malloc_aligned(const char *name,const char *file,int line,
unsigned nelem,size_t elsize,size_t alignment);
+GMX_LIBGMX_EXPORT
void *save_calloc_aligned(const char *name,const char *file,int line,
unsigned nelem,size_t elsize,size_t alignment);
+GMX_LIBGMX_EXPORT
void save_free_aligned(const char *name,const char *file,int line, void *ptr);
#ifdef __cplusplus
#ifndef _sortwater_h
#define _sortwater_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
void randwater(int astart,int nwater,int nwatom,
rvec x[],rvec v[],int *seed);
/* Randomize the order of nwater molecules of length nwatom, the
*/
+GMX_LIBGMX_EXPORT
void sortwater(int astart,int nwater,int nwatom,rvec x[],rvec v[]);
/* Sort the order of nwater molecules of length nwatom on X coordinate
* If v is not NULL it will be shuffled along
* IS NOT THREAD SAFE
*/
+GMX_LIBGMX_EXPORT
void mkcompact(int astart,int nwater,int nwatom,rvec x[],rvec v[],
int nnode,matrix box);
/* Make compact subboxes
*/
#ifndef _SPARSEMATRIX_H_
#define _SPARSEMATRIX_H_
-
+#include "visibility.h"
#include "typedefs.h"
#include "types/simple.h"
* be FALSE. Set it to TRUE manually if you are only storing either the
* upper or lower half of the matrix.
*/
+GMX_LIBGMX_EXPORT
gmx_sparsematrix_t *
gmx_sparsematrix_init (int nrow);
*
* All arrays in the structure will be freed, and the structure itself.
*/
+GMX_LIBGMX_EXPORT
void
gmx_sparsematrix_destroy (gmx_sparsematrix_t * A);
* The column sort order might change, so you need to run fix_sparsematrix
* once you are done changing the matrix.
*/
+GMX_LIBGMX_EXPORT
void
gmx_sparsematrix_increment_value(gmx_sparsematrix_t * A,
int row,
*
* Calculate y = A * x for a sparse matrix A.
*/
+GMX_LIBGMX_EXPORT
void
gmx_sparsematrix_vector_multiply(gmx_sparsematrix_t * A,
real * x,
#ifndef _splitter_h
#define _splitter_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "types/inputrec.h"
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
void split_top(FILE *fp,int nnodes,gmx_localtop_t *top,
t_inputrec *ir,t_block *mols,
real *capacity,int *mulitnr_cgs,int **multinr_nre,
* Info is written to the file pointer fp.
*/
+GMX_LIBGMX_EXPORT
void gen_sblocks(FILE *fp,int at_start,int at_end,
t_idef *idef,t_blocka *sblock,
gmx_bool bSettle);
#define _statutil_h
#include <stdio.h>
+#include "visibility.h"
#include "typedefs.h"
#include "filenm.h"
#include "readinp.h"
a real problem. */
/* Return the name of the program */
+GMX_LIBGMX_EXPORT
const char *command_line(void);
void set_command_line(int argc, char *argv[]);
* that it must be a real file - we determine the library
* directory from its location!
*/
+GMX_LIBGMX_EXPORT
const char *Program(void);
+GMX_LIBGMX_EXPORT
void set_program_name(const char *argvzero);
/* Id. without leading directory */
+GMX_LIBGMX_EXPORT
const char *ShortProgram(void);
/************************************************
* Trajectory functions
************************************************/
+GMX_LIBGMX_EXPORT
int prec2ndec(real prec);
/* Convert precision in 1/(nm) to number of decimal places */
+GMX_LIBGMX_EXPORT
void clear_trxframe(t_trxframe *fr,gmx_bool bFirst);
/* Set all content gmx_booleans to FALSE.
* When bFirst = TRUE, set natoms=-1, all pointers to NULL
* and all data to zero.
*/
+GMX_LIBGMX_EXPORT
void set_trxframe_ePBC(t_trxframe *fr,int ePBC);
/* Set the type of periodic boundary conditions, ePBC=-1 is not set */
+GMX_LIBGMX_EXPORT
int nframes_read(t_trxstatus *status);
/* Returns the number of frames read from the trajectory */
+GMX_LIBGMX_EXPORT
int write_trxframe_indexed(t_trxstatus *status,t_trxframe *fr,int nind,
atom_id *ind, gmx_conect gc);
/* Write an indexed frame to a TRX file, see write_trxframe. gc may be NULL */
+GMX_LIBGMX_EXPORT
int write_trxframe(t_trxstatus *status,t_trxframe *fr,gmx_conect gc);
/* Write a frame to a TRX file.
* Only entries for which the gmx_boolean is TRUE will be written,
* gc is important for pdb file writing only and may be NULL.
*/
+GMX_LIBGMX_EXPORT
int write_trx(t_trxstatus *status,int nind,atom_id *ind,t_atoms *atoms,
int step,real time,matrix box,rvec x[],rvec *v,
gmx_conect gc);
* atoms can be NULL for file types which don't need atom names.
*/
+GMX_LIBGMX_EXPORT
void close_trx(t_trxstatus *status);
/* Close trj file as opened with read_first_x, read_frist_frame
* or open_trx. Identical to close_trj.
*/
+GMX_LIBGMX_EXPORT
t_trxstatus *open_trx(const char *outfile,const char *filemode);
/* Open a TRX file and return an allocated status pointer */
/* get a fileio from a trxstatus */
+GMX_LIBGMX_EXPORT
t_fileio *trx_get_fileio(t_trxstatus *status);
+GMX_LIBGMX_EXPORT
gmx_bool bRmod_fd(double a, double b, double c,gmx_bool bDouble);
/* Returns TRUE when (a - b) MOD c = 0, using a margin which is slightly
* larger than the float/double precision.
* on the value of bDouble.
*/
+GMX_LIBGMX_EXPORT
int check_times(real t);
/* This routine checkes if the read-in time is correct or not;
* returns -1 if t<tbegin,
#define DATA_NOT_OK (1<<1)
#define FRAME_NOT_OK (HEADER_NOT_OK | DATA_NOT_OK)
+GMX_LIBGMX_EXPORT
int read_first_frame(const output_env_t oenv,t_trxstatus **status,
const char *fn, t_trxframe *fr,int flags);
/* Read the first frame which is in accordance with flags, which are
* Returns TRUE when succeeded, FALSE otherwise.
*/
+GMX_LIBGMX_EXPORT
gmx_bool read_next_frame(const output_env_t oenv,t_trxstatus *status,
t_trxframe *fr);
/* Reads the next frame which is in accordance with fr->flags.
* Returns TRUE when succeeded, FALSE otherwise.
*/
+GMX_LIBGMX_EXPORT
int read_first_x(const output_env_t oenv,t_trxstatus **status,
const char *fn, real *t,rvec **x,matrix box);
/* These routines read first coordinates and box, and allocates
* The integer in status should be passed to calls of read_next_x
*/
+GMX_LIBGMX_EXPORT
gmx_bool read_next_x(const output_env_t oenv,t_trxstatus *status,real *t,
int natoms, rvec x[],matrix box);
/* Read coordinates and box from a trajectory file. Return TRUE when all well,
* status is the integer set in read_first_x.
*/
+GMX_LIBGMX_EXPORT
void close_trj(t_trxstatus *status);
/* Close trj file as opened with read_first_x, read_frist_frame
* or open_trx. Identical to close_trx.
void rewind_trj(t_trxstatus *status);
/* Rewind trj file as opened with read_first_x */
+GMX_LIBGMX_EXPORT
t_topology *read_top(const char *fn,int *ePBC);
/* Extract a topology data structure from a topology file.
* If ePBC!=NULL *ePBC gives the pbc type.
void vscan(int argc,char *argv[],int *i,rvec *vec);
/* Routine similar to the above, but working on rvecs. */
+GMX_LIBGMX_EXPORT
int nenum(const char *const enumc[]);
/* returns ordinal number of selected enum from args
* depends on enumc[0] pointing to one of the other elements
* array must be terminated by a NULL pointer
*/
+GMX_LIBGMX_EXPORT
void parse_common_args(int *argc,char *argv[],unsigned long Flags,
int nfile,t_filenm fnm[],int npargs,t_pargs *pa,
int ndesc,const char **desc,
#ifndef _strdb_h
#define _strdb_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
extern "C" {
#endif
+GMX_LIBGMX_EXPORT
gmx_bool get_a_line(FILE *fp,char line[],int n);
/* Read a line of at most n characters form *fp to line.
* Comment ';...' and leading spaces are removed, empty lines are skipped.
* Return FALSE when eof.
*/
+GMX_LIBGMX_EXPORT
gmx_bool get_header(char line[],char header[]);
/* Read a header between '[' and ']' from line to header.
* Returns FALSE no header is found.
* the address of an array of strings (to be malloced by this routine)
* return the number of strings.
*/
+GMX_LIBGMX_EXPORT
int get_lines(const char *db,char ***strings);
/* Open file db, or if non-existant file $GMXLIB/db and read strings
* return the number of strings.
*/
+GMX_LIBGMX_EXPORT
int search_str(int nstr,char **str,char *key);
/* Search an array of strings for key, return the index if found
* -1 if not found.
*/
+GMX_LIBGMX_EXPORT
int get_strings(const char *db,char ***strings);
/* Read an array of strings from file db or $GMXLIB/db. strings should be
* the address of an array of strings (to be malloced by this routine)
* return the number of strings.
*/
+GMX_LIBGMX_EXPORT
int get_file(const char *db,char ***strings);
/* Read an array of strings from file db or $GMXLIB/db. strings should be
* the address of an array of strings (to be malloced by this routine)
*
*/
-
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <time.h>
#include <errno.h>
+#include "visibility.h"
#include "gmx_header_config.h"
/*#include "typedefs.h"*/
#define CONTINUE '\\'
#define COMMENTSIGN ';'
+GMX_LIBGMX_EXPORT
int continuing(char *s);
+GMX_LIBGMX_EXPORT
char *fgets2(char *s, int n, FILE *stream);
+GMX_LIBGMX_EXPORT
void strip_comment (char *line);
int break_line (char *line,
char *variable,
char *value);
+GMX_LIBGMX_EXPORT
void upstring (char *str);
+GMX_LIBGMX_EXPORT
void ltrim (char *str);
+GMX_LIBGMX_EXPORT
void rtrim (char *str);
+GMX_LIBGMX_EXPORT
void trim (char *str);
+GMX_LIBGMX_EXPORT
void nice_header (FILE *out,const char *fn);
+GMX_LIBGMX_EXPORT
int gmx_strcasecmp_min(const char *str1, const char *str2);
+GMX_LIBGMX_EXPORT
int gmx_strncasecmp_min(const char *str1, const char *str2, int n);
/* This funny version of strcasecmp, is not only case-insensitive,
* but also ignores '-' and '_'.
*/
+GMX_LIBGMX_EXPORT
int gmx_strcasecmp(const char *str1, const char *str2);
+GMX_LIBGMX_EXPORT
int gmx_strncasecmp(const char *str1, const char *str2, int n);
+GMX_LIBGMX_EXPORT
char *gmx_strdup(const char *src);
char *gmx_strndup(const char *src, int n);
gmx_string_hash_func(const char *s, unsigned int hash_init);
/** Pattern matcing with wildcards. */
+GMX_LIBGMX_EXPORT
int gmx_wcmatch(const char *pattern, const char *src);
/** Return value for gmx_wcmatch() when there is no match. */
/* this is our implementation of strsep, the thread-safe replacement for
strtok */
+GMX_LIBGMX_EXPORT
char *gmx_strsep(char **stringp, const char *delim);
+GMX_LIBGMX_EXPORT
char *wrap_lines(const char *buf,int line_width, int indent,
gmx_bool bIndentFirst);
/* wraps lines at 'linewidth', indenting all following
#define _symtab_h
#include <stdio.h>
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
* back to a text string handle by get_symtab_handle().
*/
+GMX_LIBGMX_EXPORT
void open_symtab(t_symtab *symtab);
/* Initialises the symbol table symtab.
*/
+GMX_LIBGMX_EXPORT
void close_symtab(t_symtab *symtab);
/* Undoes the effect of open_symtab(), after invoking this function,
* no value can be added to the symbol table, only values can be
void free_symtab(t_symtab *symtab);
/* Frees the space allocated by the symbol table itself */
+GMX_LIBGMX_EXPORT
void done_symtab(t_symtab *symtab);
/* Frees the space allocated by the symbol table, including all
* entries in it */
+GMX_LIBGMX_EXPORT
char **put_symtab(t_symtab *symtab,const char *name);
/* Enters a string into the symbol table symtab, if it was not
* available, a reference to a copy is returned else a reference
* state afterwards, so no strings can be added to it.
*/
+GMX_LIBGMX_EXPORT
void pr_symtab(FILE *fp,int indent,const char *title,t_symtab *symtab);
/* This routine prints out a (human) readable representation of
* the symbol table symtab to the file fp. Ident specifies the
#ifndef _tables_h
#define _tables_h
-
+#include "visibility.h"
#ifdef __cplusplus
extern "C" {
#endif
}
#endif
+GMX_LIBMD_EXPORT
void table_spline3_fill_ewald_lr(real *table_F,
real *table_V,
real *table_FDV0,
#ifndef _tgroup_h
#define _tgroup_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "network.h"
extern "C" {
#endif
+GMX_LIBMD_EXPORT
void init_ekindata(FILE *log,gmx_mtop_t *mtop,t_grpopts *opts,
gmx_ekindata_t *ekind);
/* Allocate memory and set the grpnr array. */
* and sum them up. Return them in grps.
*/
+GMX_LIBMD_EXPORT
real sum_ekin(t_grpopts *opts,gmx_ekindata_t *ekind, real *dekindlambda,
gmx_bool bEkinFullStep,gmx_bool bSaveEkinOld, gmx_bool bScaleEkin);
/* Sum the group ekins into total ekin and calc temp per group,
#ifndef _topsort_h
#define _topsort_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
/* Returns if the are bonded interactions for free energy calculations */
+GMX_LIBGMX_EXPORT
gmx_bool gmx_mtop_bondeds_free_energy(const gmx_mtop_t *mtop);
/* Sort all the bonded ilists in idef to have the perturbed ones at the end
* and set nr_nr_nonperturbed in ilist.
*/
+GMX_LIBGMX_EXPORT
void gmx_sort_ilist_fe(t_idef *idef,const real *qA,const real *qB);
#ifdef __cplusplus
#ifndef _toputil_h
#define _toputil_h
-
+#include "visibility.h"
#include "grompp.h"
#include "gpp_atomtype.h"
void pr_alloc (int extra, t_params *pr);
+GMX_LIBGMXPREPROCESS_EXPORT
void set_p_string(t_param *p,const char *s);
void cp_param(t_param *dest,t_param *src);
+GMX_LIBGMXPREPROCESS_EXPORT
void add_param_to_list(t_params *list, t_param *b);
/* INITIATE */
+GMX_LIBGMXPREPROCESS_EXPORT
void init_plist(t_params plist[]);
void init_molinfo(t_molinfo *mol);
+GMX_LIBGMX_EXPORT
void init_top (t_topology *top);
void done_top(t_topology *top);
/* FREE */
+GMX_LIBGMXPREPROCESS_EXPORT
void done_mi(t_molinfo *mi);
/* PRINTING */
* can also be used with the routines in gmxfio.h
*
**************************************************************/
+#include "visibility.h"
#include "typedefs.h"
#include "gmxfio.h"
* but double and single precision can be read by either.
*/
+GMX_LIBGMX_EXPORT
t_fileio *open_tpx(const char *fn, const char *mode);
/* Return an file pointer corresponding to the file you have just opened */
+GMX_LIBGMX_EXPORT
void close_tpx(t_fileio *fio);
/* Close the file corresponding to fio */
+GMX_LIBGMX_EXPORT
void read_tpxheader(const char *fn, t_tpxheader *tpx, gmx_bool TopOnlyOK,
int *version, int *generation);
/* Read the header from a tpx file and then close it again.
* are returned in the two last arguments.
*/
+GMX_LIBGMX_EXPORT
void write_tpx_state(const char *fn,
t_inputrec *ir,t_state *state,gmx_mtop_t *mtop);
/* Write a file, and close it again.
* will not be closed afterwards)
*/
+GMX_LIBGMX_EXPORT
void read_tpx_state(const char *fn,
t_inputrec *ir,t_state *state,rvec *f,
gmx_mtop_t *mtop);
+GMX_LIBGMX_EXPORT
int read_tpx(const char *fn,
t_inputrec *ir,matrix box,int *natoms,
rvec *x,rvec *v,rvec *f,gmx_mtop_t *mtop);
* Returns ir->ePBC, if it could be read from the file.
*/
+GMX_LIBGMX_EXPORT
int read_tpx_top(const char *fn,
t_inputrec *ir, matrix box,int *natoms,
rvec *x,rvec *v,rvec *f,t_topology *top);
/* As read_tpx, but for the old t_topology struct */
+GMX_LIBGMX_EXPORT
gmx_bool fn2bTPX(const char *file);
/* return if *file is one of the TPX file types */
+GMX_LIBGMX_EXPORT
gmx_bool read_tps_conf(const char *infile,char *title,t_topology *top,
int *ePBC, rvec **x,rvec **v,matrix box,gmx_bool bMass);
/* Read title, top.atoms, x, v (if not NULL) and box from an STX file,
*/
#ifndef TRAJANA_H
#define TRAJANA_H
-
+#include "visibility.h"
#include "typedefs.h"
#include "filenm.h"
#include "readinp.h"
/*@{*/
/** Allocates and initializes data structure for trajectory analysis. */
+GMX_LIBGMX_EXPORT
int
gmx_ana_traj_create(gmx_ana_traj_t **data, unsigned long flags);
/** Frees the memory allocated for trajectory analysis data. */
int
gmx_ana_set_nrefgrps(gmx_ana_traj_t *d, int nrefgrps);
/** Sets the number of analysis groups required. */
+GMX_LIBGMX_EXPORT
int
gmx_ana_set_nanagrps(gmx_ana_traj_t *d, int nanagrps);
/** Sets whether PBC are used. */
int
gmx_ana_set_frflags(gmx_ana_traj_t *d, int frflags);
/** Parses command-line arguments and performs some initialization. */
+GMX_LIBGMX_EXPORT
int
parse_trjana_args(gmx_ana_traj_t *d, int *argc, char *argv[],
unsigned long pca_flags, int nfile, t_filenm fnm[],
int
gmx_ana_init_selections(gmx_ana_traj_t *d);
/** Initializes calculation of covered fractions for selections. */
+GMX_LIBGMX_EXPORT
int
gmx_ana_init_coverfrac(gmx_ana_traj_t *d, e_coverfrac_t type);
gmx_bool
gmx_ana_has_pbc(gmx_ana_traj_t *d);
/** Gets the topology information. */
+GMX_LIBGMX_EXPORT
int
gmx_ana_get_topology(gmx_ana_traj_t *d, gmx_bool bReq, t_topology **top, gmx_bool *bTop);
/** Gets the configuration from the topology. */
int
gmx_ana_get_ngrps(gmx_ana_traj_t *d, int *ngrps);
/** Gets the number of analysis groups provided by the user. */
+GMX_LIBGMX_EXPORT
int
gmx_ana_get_nanagrps(gmx_ana_traj_t *d, int *nanagrps);
/** Gets the selection object for a reference selection. */
int
gmx_ana_get_refsel(gmx_ana_traj_t *d, int i, gmx_ana_selection_t **sel);
/** Gets the selection object for a reference selection. */
+GMX_LIBGMX_EXPORT
int
gmx_ana_get_anagrps(gmx_ana_traj_t *d, gmx_ana_selection_t ***sel);
/** Gets an array of names for the selections. */
+GMX_LIBGMX_EXPORT
int
gmx_ana_get_grpnames(gmx_ana_traj_t *d, char ***grpnames);
/** Gets the selection collection object that contains all the selections. */
int
gmx_ana_get_selcollection(gmx_ana_traj_t *d, gmx_ana_selcollection_t **sc);
/** Prints the selection strings into an XVGR file as comments. */
+GMX_LIBGMX_EXPORT
int
xvgr_selections(FILE *out, gmx_ana_traj_t *d);
int nr, gmx_ana_selection_t *sel[], void *data);
/** Loops through all frames in the trajectory. */
+GMX_LIBGMX_EXPORT
int
gmx_ana_do(gmx_ana_traj_t *d, int flags, gmx_analysisfunc analyze, void *data);
/** Gets the total number of frames analyzed. */
* can also be used with the routines in gmxfio.h
*
**************************************************************/
-
+#include "visibility.h"
#include "typedefs.h"
#include "gmxfio.h"
int fep_state; /* Current value of alchemical state */
} t_trnheader;
+GMX_LIBGMX_EXPORT
t_fileio *open_trn(const char *fn,const char *mode);
/* Open a trj / trr file */
+GMX_LIBGMX_EXPORT
void close_trn(t_fileio *fio);
/* Close it */
+GMX_LIBGMX_EXPORT
gmx_bool fread_trnheader(t_fileio *fio,t_trnheader *trn,gmx_bool *bOK);
/* Read the header of a trn file. Return FALSE if there is no frame.
* bOK will be FALSE when the header is incomplete.
*/
+GMX_LIBGMX_EXPORT
void read_trnheader(const char *fn,t_trnheader *header);
/* Read the header of a trn file from fn, and close the file afterwards.
*/
* afterwards.
*/
+GMX_LIBGMX_EXPORT
void fwrite_trn(t_fileio *fio,int step,real t,real lambda,
rvec *box,int natoms,rvec *x,rvec *v,rvec *f);
/* Write a trn frame to file fp, box, x, v, f may be NULL */
+GMX_LIBGMX_EXPORT
gmx_bool fread_htrn(t_fileio *fio,t_trnheader *sh,
rvec *box,rvec *x,rvec *v,rvec *f);
/* Extern read a frame except the header (that should be pre-read,
* return FALSE on error
*/
+GMX_LIBGMX_EXPORT
void write_trn(const char *fn,int step,real t,real lambda,
rvec *box,int natoms,rvec *x,rvec *v,rvec *f);
/* Write a single trn frame to file fn, which is closed afterwards */
+GMX_LIBGMX_EXPORT
void read_trn(const char *fn,int *step,real *t,real *lambda,
rvec *box,int *natoms,rvec *x,rvec *v,rvec *f);
/* Read a single trn frame from file fn, which is closed afterwards
#include <stdio.h>
+#include "visibility.h"
#include "typedefs.h"
#include "tpxio.h"
#define USE_WIDTH ((LINE_WIDTH)-(RMARGIN))
#define INDENT 3
+GMX_LIBGMX_EXPORT
int pr_indent(FILE *fp,int n);
+GMX_LIBGMX_EXPORT
int available(FILE *fp,void *p,int indent,const char *title);
+GMX_LIBGMX_EXPORT
int pr_title(FILE *fp,int indent,const char *title);
int pr_title_n(FILE *fp,int indent,const char *title,int n);
int pr_title_nxn(FILE *fp,int indent,const char *title,int n1,int n2);
+GMX_LIBGMX_EXPORT
void pr_ivec(FILE *fp,int indent,const char *title,int vec[],int n, gmx_bool bShowNumbers);
void pr_ivecs(FILE *fp,int indent,const char *title,ivec vec[],int n, gmx_bool bShowNumbers);
+GMX_LIBGMX_EXPORT
void pr_bvec(FILE *fp,int indent,const char *title,gmx_bool vec[],int n, gmx_bool bShowNnumbers);
+GMX_LIBGMX_EXPORT
void pr_rvec(FILE *fp,int indent,const char *title,real vec[],int n, gmx_bool bShowNumbers);
void pr_dvec(FILE *fp,int indent,const char *title,double vec[],int n, gmx_bool bShowNumbers);
+GMX_LIBGMX_EXPORT
void pr_rvecs(FILE *fp,int indent,const char *title,rvec vec[],int n);
void pr_rvecs_len(FILE *fp,int indent,const char *title,rvec vec[],int n);
void pr_reals(FILE *fp,int indent,const char *title,real vec[],int n);
+GMX_LIBGMX_EXPORT
void pr_doubles(FILE *fp,int indent,const char *title,double *vec,int n);
void pr_block(FILE *fp,int indent,const char *title,t_block *block,gmx_bool bShowNumbers);
+GMX_LIBGMX_EXPORT
void pr_blocka(FILE *fp,int indent,const char *title,t_blocka *block,gmx_bool bShowNumbers);
void pr_ilist(FILE *fp,int indent,const char *title,
t_functype *functype,t_ilist *ilist, gmx_bool bShowNumbers);
+GMX_LIBGMX_EXPORT
void pr_iparams(FILE *fp,t_functype ftype,t_iparams *iparams);
void pr_idef(FILE *fp,int indent,const char *title,t_idef *idef, gmx_bool bShowNumbers);
+GMX_LIBGMX_EXPORT
void pr_inputrec(FILE *fp,int indent,const char *title,t_inputrec *ir,
gmx_bool bMDPformat);
void pr_atoms(FILE *fp,int indent,const char *title,t_atoms *atoms,
gmx_bool bShownumbers);
void pr_atomtypes(FILE *fp,int indent,const char *title,
t_atomtypes *atomtypes,gmx_bool bShowNumbers);
+GMX_LIBGMX_EXPORT
void pr_mtop(FILE *fp,int indent,const char *title,gmx_mtop_t *mtop,
gmx_bool bShowNumbers);
+GMX_LIBGMX_EXPORT
void pr_top(FILE *fp,int indent,const char *title,t_topology *top, gmx_bool bShowNumbers);
/*
* This routine prints out a (human) readable representation of
* spaces the text should be indented. Title is used to print a
* header text.
*/
+GMX_LIBGMX_EXPORT
void pr_header(FILE *fp,int indent,const char *title,t_tpxheader *sh);
/*
* This routine prints out a (human) readable representation of
#define NOTSET -12345
#include <sys/types.h>
+#include "visibility.h"
#include "sysstuff.h"
#include "types/simple.h"
#include "types/enums.h"
/* This factor leads to 4 realloc calls to double the array size */
#define OVER_ALLOC_FAC 1.19
+GMX_LIBGMX_EXPORT
void set_over_alloc_dd(gmx_bool set);
/* Turns over allocation for variable size atoms/cg/top arrays on or off,
* default is off.
*/
+GMX_LIBGMX_EXPORT
int over_alloc_dd(int n);
/* Returns n when domain decomposition over allocation is off.
* Returns OVER_ALLOC_FAC*n + 100 when over allocation in on.
/* Over allocation for large data types: complex structs */
#define over_alloc_large(n) (OVER_ALLOC_FAC*(n) + 1000)
+GMX_LIBGMX_EXPORT
int gmx_large_int_to_int(gmx_large_int_t step,const char *warn);
/* Convert a gmx_large_int_t value to int.
* If warn!=NULL a warning message will be written
#define STEPSTRSIZE 22
+GMX_LIBGMX_EXPORT
char *gmx_step_str(gmx_large_int_t i,char *buf);
/* Prints a gmx_large_int_t value in buf and returns the pointer to buf.
* buf should be large enough to contain i: STEPSTRSIZE (22) chars.
/* Functions to initiate and delete structures *
* These functions are defined in gmxlib/typedefs.c
*/
+GMX_LIBGMX_EXPORT
void init_block(t_block *block);
+GMX_LIBGMX_EXPORT
void init_blocka(t_blocka *block);
+GMX_LIBGMX_EXPORT
void init_atom (t_atoms *at);
+GMX_LIBGMX_EXPORT
void init_mtop(gmx_mtop_t *mtop);
+GMX_LIBGMX_EXPORT
void init_top (t_topology *top);
void init_inputrec(t_inputrec *ir);
+GMX_LIBGMX_EXPORT
void init_energyhistory(energyhistory_t * enerhist);
+GMX_LIBGMX_EXPORT
void done_energyhistory(energyhistory_t * enerhist);
+GMX_LIBGMX_EXPORT
void init_gtc_state(t_state *state,int ngtc, int nnhpres, int nhchainlength);
+GMX_LIBGMX_EXPORT
void init_state(t_state *state,int natoms,int ngtc, int nnhpres, int nhchainlength, int nlambda);
+GMX_LIBGMX_EXPORT
void init_df_history(df_history_t *dfhist, int nlambda, real wl_delta);
+GMX_LIBGMX_EXPORT
void copy_df_history(df_history_t * df_dest, df_history_t *df_source);
+GMX_LIBGMX_EXPORT
void copy_blocka(const t_blocka *src,t_blocka *dest);
+GMX_LIBGMX_EXPORT
void done_block(t_block *block);
+GMX_LIBGMX_EXPORT
void done_blocka(t_blocka *block);
+GMX_LIBGMX_EXPORT
void done_atom (t_atoms *at);
void done_moltype(gmx_moltype_t *molt);
void done_molblock(gmx_molblock_t *molb);
void done_mtop(gmx_mtop_t *mtop,gmx_bool bDoneSymtab);
void done_top(t_topology *top);
void done_inputrec(t_inputrec *ir);
+GMX_LIBGMX_EXPORT
void done_state(t_state *state);
+GMX_LIBGMX_EXPORT
void set_box_rel(t_inputrec *ir,t_state *state);
/* Set state->box_rel used in mdrun to preserve the box shape */
+GMX_LIBGMX_EXPORT
void preserve_box_shape(t_inputrec *ir,matrix box_rel,matrix b);
/* Preserve the box shape, b can be box or boxv */
+GMX_LIBGMX_EXPORT
void stupid_fill_block(t_block *grp, int natom,gmx_bool bOneIndexGroup);
/* Fill a block structure with numbers identical to the index
* (0, 1, 2, .. natom-1)
* otherwise there is one atom per index entry
*/
+GMX_LIBGMX_EXPORT
void stupid_fill_blocka(t_blocka *grp, int natom);
/* Fill a block structure with numbers identical to the index
* (0, 1, 2, .. natom-1)
* There is one atom per index entry
*/
+GMX_LIBGMX_EXPORT
void init_t_atoms(t_atoms *atoms, int natoms, gmx_bool bPdbinfo);
/* allocate memory for the arrays, set nr to natoms and nres to 0
* set pdbinfo to NULL or allocate memory for it */
void add_t_atoms(t_atoms *atoms,int natom_extra,int nres_extra);
/* allocate extra space for more atoms and or residues */
+GMX_LIBGMX_EXPORT
void t_atoms_set_resinfo(t_atoms *atoms,int atom_ind,t_symtab *symtab,
const char *resname,int resnr,unsigned char ic,
int chainnum, char chainid);
* of atom index atom_ind.
*/
+GMX_LIBGMX_EXPORT
void free_t_atoms(t_atoms *atoms,gmx_bool bFreeNames);
/* Free all the arrays and set the nr and nres to 0.
* bFreeNames tells if to free the atom and residue name strings,
t_atoms *mtop2atoms(gmx_mtop_t *mtop);
/* generate a t_atoms struct for the system from gmx_mtop_t */
+GMX_LIBGMX_EXPORT
real max_cutoff(real cutoff1,real cutoff2);
/* Returns the maximum of the cut-off's, taking into account that 0=inf. */
#ifndef _ifunc_h
#define _ifunc_h
-
+#include "visibility.h"
#include "idef.h"
#include "mdatom.h"
#include "fcdata.h"
#define IS_TABULATED(ftype) (interaction_function[(ftype)].flags & IF_TABULATED)
+GMX_LIBGMX_EXPORT
extern const t_interaction_function interaction_function[F_NRE];
/* initialised interaction functions descriptor */
*/
#ifndef _iteratedconstraints_h
#define _iteratedconstraints_h
-
+#include "visibility.h"
#ifdef __cplusplus
extern "C" {
#endif
int num_close; /* number of "close" violations, caused by limited precision. */
} gmx_iterate_t;
+GMX_LIBMD_EXPORT
void gmx_iterate_init(gmx_iterate_t *iterate,gmx_bool bIterate);
+GMX_LIBMD_EXPORT
gmx_bool done_iterating(const t_commrec *cr,FILE *fplog, int nsteps, gmx_iterate_t *iterate, gmx_bool bFirstIterate, real fom, real *newf);
#ifdef __cplusplus
*/
#ifndef _nlistheuristics_h
#define _nlistheuristics_h
-
+#include "visibility.h"
#ifdef __cplusplus
extern "C" {
#endif
void reset_nlistheuristics(gmx_nlheur_t *nlh,gmx_large_int_t step);
+GMX_LIBMD_EXPORT
void init_nlistheuristics(gmx_nlheur_t *nlh,
gmx_bool bGStatEveryStep,gmx_large_int_t step);
void update_nliststatistics(gmx_nlheur_t *nlh,gmx_large_int_t step);
+GMX_LIBMD_EXPORT
void set_nlistheuristics(gmx_nlheur_t *nlh,gmx_bool bReset,gmx_large_int_t step);
#ifdef __cplusplus
#ifndef _update_h
#define _update_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "mshift.h"
#include "tgroup.h"
gmx_update_t init_update(FILE *fplog,t_inputrec *ir);
/* Store the random state from sd in state */
+GMX_LIBMD_EXPORT
void get_stochd_state(gmx_update_t sd,t_state *state);
/* Set the random in sd from state */
+GMX_LIBMD_EXPORT
void set_stochd_state(gmx_update_t sd,t_state *state);
/* Store the box at step step
* as a reference state for simulations with box deformation.
*/
+GMX_LIBMD_EXPORT
void set_deform_reference_box(gmx_update_t upd,
gmx_large_int_t step,matrix box);
+GMX_LIBMD_EXPORT
void update_tcouple(FILE *fplog,
gmx_large_int_t step,
t_inputrec *inputrec,
t_mdatoms *md
);
+GMX_LIBMD_EXPORT
void update_pcouple(FILE *fplog,
gmx_large_int_t step,
t_inputrec *inputrec,
gmx_update_t upd,
gmx_bool bInitStep);
+GMX_LIBMD_EXPORT
void update_coords(FILE *fplog,
gmx_large_int_t step,
t_inputrec *inputrec, /* input record and box stuff */
/* Return TRUE if OK, FALSE in case of Shake Error */
+GMX_LIBMD_EXPORT
extern gmx_bool update_randomize_velocities(t_inputrec *ir, gmx_large_int_t step, t_mdatoms *md, t_state *state, gmx_update_t upd, t_idef *idef, gmx_constr_t constr);
+GMX_LIBMD_EXPORT
void update_constraints(FILE *fplog,
gmx_large_int_t step,
real *dvdlambda, /* FEP stuff */
/* Return TRUE if OK, FALSE in case of Shake Error */
+GMX_LIBMD_EXPORT
void update_box(FILE *fplog,
gmx_large_int_t step,
t_inputrec *inputrec, /* input record and box stuff */
void
init_ekinstate(ekinstate_t *ekinstate,const t_inputrec *ir);
+GMX_LIBMD_EXPORT
void
update_ekinstate(ekinstate_t *ekinstate,gmx_ekindata_t *ekind);
void nosehoover_tcoupl(t_grpopts *opts,gmx_ekindata_t *ekind,real dt,
double xi[],double vxi[],t_extmass *MassQ);
+GMX_LIBMD_EXPORT
t_state *init_bufstate(const t_state *template_state);
void destroy_bufstate(t_state *state);
+GMX_LIBMD_EXPORT
void trotter_update(t_inputrec *ir, gmx_large_int_t step, gmx_ekindata_t *ekind,
gmx_enerdata_t *enerd, t_state *state, tensor vir, t_mdatoms *md,
t_extmass *MassQ, int **trotter_seqlist, int trotter_seqno);
+GMX_LIBMD_EXPORT
int **init_npt_vars(t_inputrec *ir, t_state *state, t_extmass *Mass, gmx_bool bTrotter);
real NPT_energy(t_inputrec *ir, t_state *state, t_extmass *MassQ);
int start,int end,rvec v[]);
/* Rescale the velocities with the scaling factor in ekind */
+GMX_LIBMD_EXPORT
void update_annealing_target_temp(t_grpopts *opts,real t);
/* Set reference temp for simulated annealing at time t*/
void tmvmul_ur0(matrix a,rvec src,rvec dest) dest = a* . src
real trace(matrix m) = trace(m)
*/
-
+#include "visibility.h"
#include "types/simple.h"
#include "maths.h"
#include "typedefs.h"
#define PR_VEC(a) a[XX],a[YY],a[ZZ]
#ifdef GMX_SOFTWARE_INVSQRT
+GMX_LIBGMX_EXPORT
extern const unsigned int * gmx_invsqrt_exptab;
+GMX_LIBGMX_EXPORT
extern const unsigned int * gmx_invsqrt_fracttab;
#endif
#ifndef _viewit_h
#define _viewit_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
#endif
+GMX_LIBGMX_EXPORT
void do_view(const output_env_t oenv,const char *fn, const char *opts);
/* forks off appropriate command to view file.
* currently eps, xpm, xvg and pdb are supported
* defaults are provided, can be overriden with environment vars
*/
+GMX_LIBGMX_EXPORT
void view_all(const output_env_t oenv,int nf, t_filenm fnm[]);
/* calls do_view for all viewable output files in fnm[] */
--- /dev/null
+#ifdef USE_VISIBILITY /* off by default */
+#if defined _WIN32 || defined __CYGWIN__ || defined WINDOWS
+#ifdef gmx_EXPORTS
+#define GMX_LIBGMX_EXPORT __declspec(dllexport)
+#else
+#define GMX_LIBGMX_EXPORT __declspec(dllimport)
+#endif
+#ifdef md_EXPORTS
+#define GMX_LIBMD_EXPORT __declspec(dllexport)
+#else
+#define GMX_LIBMD_EXPORT __declspec(dllimport)
+#endif
+#ifdef gmxana_EXPORTS
+#define GMX_LIBGMXANA_EXPORT __declspec(dllexport)
+#else
+#define GMX_LIBGMXANA_EXPORT __declspec(dllimport)
+#endif
+#ifdef gmxpreprocess_EXPORTS
+#define GMX_LIBGMXPREPROCESS_EXPORT __declspec(dllexport)
+#else
+#define GMX_LIBGMXPREPROCESS_EXPORT __declspec(dllimport)
+#endif
+#else /* Unix */
+#define GMX_LIBGMX_EXPORT __attribute__((__visibility__("default")))
+#define GMX_LIBMD_EXPORT __attribute__((__visibility__("default")))
+#define GMX_LIBGMXANA_EXPORT __attribute__((__visibility__("default")))
+#define GMX_LIBGMXPREPROCESS_EXPORT __attribute__((__visibility__("default")))
+#endif
+#else /* no USE_VISIBILITY */
+#define GMX_LIBGMX_EXPORT
+#define GMX_LIBMD_EXPORT
+#define GMX_LIBGMXANA_EXPORT
+#define GMX_LIBGMXPREPROCESS_EXPORT
+#endif /* USE_VISIBILITY */
#ifndef _vsite_h
#define _vsite_h
-
#include <stdio.h>
+#include "visibility.h"
#include "typedefs.h"
#include "types/commrec.h"
int th_ind_nalloc; /* Size of th_ind */
} gmx_vsite_t;
+GMX_LIBMD_EXPORT
void construct_vsites(FILE *log,gmx_vsite_t *vsite,
rvec x[],t_nrnb *nrnb,
real dt,rvec v[],
* for the integration, they are only useful for analysis.
*/
+GMX_LIBMD_EXPORT
void construct_vsites_mtop(FILE *log,gmx_vsite_t *vsite,
gmx_mtop_t *mtop,rvec x[]);
/* Create positions of vsite atoms based on surrounding atoms
* as for instance for the PME mesh contribution.
*/
+GMX_LIBMD_EXPORT
gmx_vsite_t *init_vsite(gmx_mtop_t *mtop,t_commrec *cr,
gmx_bool bSerial_NoPBC);
/* Initialize the virtual site struct,
* Should be called at the end of the domain decomposition.
*/
+GMX_LIBMD_EXPORT
void set_vsite_top(gmx_vsite_t *vsite,gmx_localtop_t *top,t_mdatoms *md,
t_commrec *cr);
/* Set some vsite data for runs without domain decomposition.
#ifndef _warninp_h
#define _warninp_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
typedef struct warninp *warninp_t;
+GMX_LIBGMX_EXPORT
warninp_t
init_warning(gmx_bool bAllowWarnings,int maxwarning);
/* Initialize the warning data structure.
* a -maxwarn command line option.
*/
+GMX_LIBGMX_EXPORT
void
set_warning_line(warninp_t wi,const char *fn,int line);
/* Set filename and linenumber for the warning */
+GMX_LIBGMX_EXPORT
int
get_warning_line(warninp_t wi);
/* Get linenumber for the warning */
+GMX_LIBGMX_EXPORT
const char *
get_warning_file(warninp_t wi);
/* Get filename for the warning */
+GMX_LIBGMX_EXPORT
void
warning(warninp_t wi,const char *s);
/* Issue a warning, with the string s. If s == NULL, then warn_buf
* otherwise warning_note should be called.
*/
+GMX_LIBGMX_EXPORT
void
warning_note(warninp_t wi,const char *s);
/* Issue a note, with the string s. If s == NULL, then warn_buf
* but 100% ok for other systems.
*/
+GMX_LIBGMX_EXPORT
void
warning_error(warninp_t wi,const char *s);
/* Issue an error, with the string s. If s == NULL, then warn_buf
* are printed, nwarn_error (local) is incremented.
*/
+GMX_LIBGMX_EXPORT
void
check_warning_error(warninp_t wi,int f_errno,const char *file,int line);
/* When warning_error has been called at least once gmx_fatal is called,
* otherwise does nothing.
*/
+GMX_LIBGMX_EXPORT
void
done_warning(warninp_t wi,int f_errno,const char *file,int line);
/* Should be called when finished processing the input file.
* Frees the data structure pointed to by wi.
*/
+GMX_LIBGMX_EXPORT
void
_too_few(warninp_t wi,const char *fn,int line);
#define too_few(wi) _too_few(wi,__FILE__,__LINE__)
/* Issue a warning stating 'Too few parameters' */
+GMX_LIBGMX_EXPORT
void
_incorrect_n_param(warninp_t wi,const char *fn,int line);
#define incorrect_n_param(wi) _incorrect_n_param(wi,__FILE__,__LINE__)
#define _wgms_h
#include <stdio.h>
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
* If box == NULL it is not written
*/
+GMX_LIBGMX_EXPORT
void write_gms_ndx(FILE *fp,int isize,atom_id index[],
rvec x[],matrix box);
/* Write a gromos-87 trajectory frame (10f8.3) + box size for
#include <stdio.h>
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
extern const char *fontnm[efontNR];
+GMX_LIBGMX_EXPORT
t_psdata ps_open(const char *fn,real x1,real y1,real x2,real y2);
+GMX_LIBGMX_EXPORT
void ps_linewidth(t_psdata ps,int lw);
+GMX_LIBGMX_EXPORT
void ps_color(t_psdata ps,real r,real g,real b);
+GMX_LIBGMX_EXPORT
void ps_rgb(t_psdata ps,t_rgb *rgb);
void ps_rgb_box(t_psdata ps,t_rgb *rgb);
+GMX_LIBGMX_EXPORT
void ps_rgb_nbox(t_psdata ps,t_rgb *rgb,real n);
+GMX_LIBGMX_EXPORT
void ps_init_rgb_box(t_psdata ps,real xbox, real ybox);
+GMX_LIBGMX_EXPORT
void ps_init_rgb_nbox(t_psdata ps,real xbox, real ybox);
void ps_lineto(t_psdata ps,real x,real y);
void ps_linerel(t_psdata ps,real dx,real dy);
+GMX_LIBGMX_EXPORT
void ps_moveto(t_psdata ps,real x,real y);
+GMX_LIBGMX_EXPORT
void ps_moverel(t_psdata ps,real dx,real dy);
+GMX_LIBGMX_EXPORT
void ps_line(t_psdata ps,real x1,real y1,real x2,real y2);
+GMX_LIBGMX_EXPORT
void ps_box(t_psdata ps,real x1,real y1,real x2,real y2);
+GMX_LIBGMX_EXPORT
void ps_fillbox(t_psdata ps,real x1,real y1,real x2,real y2);
void ps_arc(t_psdata ps,real x1,real y1,real rad,real a0,real a1);
void ps_fillarc(t_psdata ps,real x1,real y1,real rad,real a0,real a1);
+GMX_LIBGMX_EXPORT
void ps_arcslice(t_psdata ps,real xc,real yc,
real rad1,real rad2,real a0,real a1);
+GMX_LIBGMX_EXPORT
void ps_fillarcslice(t_psdata ps,real xc,real yc,
real rad1,real rad2,real a0,real a1);
void ps_circle(t_psdata ps,real x1,real y1,real rad);
+GMX_LIBGMX_EXPORT
void ps_font(t_psdata ps,int font,real size);
+GMX_LIBGMX_EXPORT
void ps_strfont(t_psdata ps,char *font,real size);
void ps_text(t_psdata ps,real x1,real y1,const char *str);
+GMX_LIBGMX_EXPORT
void ps_ctext(t_psdata ps,real x1,real y1,const char *str,int expos);
+GMX_LIBGMX_EXPORT
void ps_close(t_psdata ps);
+GMX_LIBGMX_EXPORT
void ps_flip(t_psdata ps,gmx_bool bPlus);
/* Rotate over 90 (bPlus) or -90 (!bPlus) degrees */
+GMX_LIBGMX_EXPORT
void ps_rotate(t_psdata ps,real angle);
+GMX_LIBGMX_EXPORT
void ps_translate(t_psdata ps,real x,real y);
+GMX_LIBGMX_EXPORT
void ps_setorigin(t_psdata ps);
+GMX_LIBGMX_EXPORT
void ps_unsetorigin(t_psdata ps);
void viewps(char *fn);
+GMX_LIBGMX_EXPORT
void ps_comment(t_psdata ps,const char *s);
#ifdef __cplusplus
#include <stdio.h>
+#include "visibility.h"
#include "typedefs.h"
#ifdef __PGI /*Portland group compiler*/
} xdr_datatype;
/* names corresponding to the xdr_datatype enum */
+GMX_LIBGMX_EXPORT
extern const char *xdr_datatype_names[];
/* Read or write reduced precision *float* coordinates */
int xdr_xtc_seek_frame(int frame, FILE *fp, XDR *xdrs, int natoms);
+GMX_LIBGMX_EXPORT
float xdr_xtc_get_last_frame_time(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK);
#ifndef _xtcio_h
#define _xtcio_h
+#include "visibility.h"
#include "typedefs.h"
#include "gmxfio.h"
#include "xdrf.h"
* bOK tells if a frame is not corrupted
*/
+GMX_LIBGMX_EXPORT
t_fileio *open_xtc(const char *filename,const char *mode);
/* Open a file for xdr I/O */
+GMX_LIBGMX_EXPORT
void close_xtc(t_fileio *fio);
/* Close the file for xdr I/O */
+GMX_LIBGMX_EXPORT
int read_first_xtc(t_fileio *fio,
int *natoms,int *step,real *time,
matrix box,rvec **x,real *prec,gmx_bool *bOK);
/* Open xtc file, read xtc file first time, allocate memory for x */
+GMX_LIBGMX_EXPORT
int read_next_xtc(t_fileio *fio,
int natoms,int *step,real *time,
matrix box,rvec *x,real *prec,gmx_bool *bOK);
/* Read subsequent frames */
+GMX_LIBGMX_EXPORT
int write_xtc(t_fileio *fio,
int natoms,int step,real time,
matrix box,rvec *x,real prec);
#ifndef _xvgr_h
#define _xvgr_h
+#include "visibility.h"
#include "sysstuff.h"
#include "typedefs.h"
#include "viewit.h"
* \4 : (deprecated) end symbol font
*/
+GMX_LIBGMX_EXPORT
gmx_bool output_env_get_print_xvgr_codes(const output_env_t oenv);
/* Returns if we should print xmgrace or xmgr codes */
exvggtNONE, exvggtXNY, exvggtXYDY, exvggtXYDYDY, exvggtNR
};
+GMX_LIBGMX_EXPORT
void xvgr_header(FILE *fp,const char *title,const char *xaxis,
const char *yaxis,int exvg_graph_type,
const output_env_t oenv);
* but takes a filename and opens it.
*/
+GMX_LIBGMX_EXPORT
FILE *xvgropen_type(const char *fn,const char *title,const char *xaxis,
const char *yaxis,int exvg_graph_type,
const output_env_t oenv);
* The xvgr graph type enum is defined above.
*/
+GMX_LIBGMX_EXPORT
FILE *xvgropen(const char *fn,const char *title,const char *xaxis,
const char *yaxis,const output_env_t oenv);
/* Calls xvgropen_type with graph type xvggtXNY. */
/* Close xvgr file, and clean up internal file buffers correctly */
+GMX_LIBGMX_EXPORT
void xvgrclose(FILE *fp);
+GMX_LIBGMX_EXPORT
void xvgr_subtitle(FILE *out,const char *subtitle,
const output_env_t oenv);
/* Set the subtitle in xvgr */
+GMX_LIBGMX_EXPORT
void xvgr_view(FILE *out,real xmin,real ymin,real xmax,real ymax,
const output_env_t oenv);
/* Set the view in xvgr */
+GMX_LIBGMX_EXPORT
void xvgr_world(FILE *out,real xmin,real ymin,real xmax,real ymax,
const output_env_t oenv);
/* Set the world in xvgr */
+GMX_LIBGMX_EXPORT
void xvgr_legend(FILE *out,int nsets,const char** setnames,
const output_env_t oenv);
/* Make a legend box, and also modifies the view to make room for the legend */
+GMX_LIBGMX_EXPORT
void xvgr_new_dataset(FILE *out,
int nr_first, int nsets, const char **setnames,
const output_env_t oenv);
setnames = the set names (or NULL if no legends)
*/
+GMX_LIBGMX_EXPORT
void xvgr_line_props(FILE *out,int NrSet,int LineStyle,int LineColor,
const output_env_t oenv);
/* Set xvgr line styles and colors */
const output_env_t oenv);
/* Make a box */
+GMX_LIBGMX_EXPORT
int read_xvg_legend(const char *fn,double ***y,int *ny,
char **subtitle,char ***legend);
/* Read an xvg file for post processing. The number of rows is returned
* 0 is the first y legend, the legend string will be NULL when not present.
*/
+GMX_LIBGMX_EXPORT
int read_xvg(const char *fn,double ***y,int *ny);
/* As read_xvg_legend, but does not read legends. */
+GMX_LIBGMX_EXPORT
void write_xvg(const char *fn,const char *title,int nx,int ny,real **y,
const char** leg, const output_env_t oenv);
/* Write a two D array (y) of dimensions nx rows times
/* This function reads ascii (xvg) files and extracts the data sets to a
* two dimensional array which is returned.
*/
+GMX_LIBGMX_EXPORT
real **read_xvg_time(const char *fn,
gmx_bool bHaveT,
gmx_bool bTB,real tb,
add_dependencies(gmx gmx_version)
endif()
set_target_properties(gmx PROPERTIES OUTPUT_NAME "gmx${GMX_LIBS_SUFFIX}" SOVERSION ${SOVERSION} INSTALL_NAME_DIR "${LIB_INSTALL_DIR}"
- COMPILE_FLAGS "${OpenMP_C_FLAGS}")
+ COMPILE_FLAGS "${OpenMP_C_FLAGS}" COMPILE_DEFINITIONS "TMPI_EXPORTS")
install(TARGETS gmx DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries)
#include <config.h>
#endif
+#include "vec.h"
struct gmx_invsqrtdata
{
#include "string2.h"
#include "smalloc.h"
#include "gmxfio.h"
+#include "gmx_fatal_collective.h"
#ifdef GMX_LIB_MPI
#include <mpi.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#include "visibility.h"
#include "gmx_header_config.h"
#ifdef GMX_CRAY_XT3
rtrim (str);
}
+GMX_LIBGMX_EXPORT
char *
gmx_ctime_r(const time_t *clock,char *buf, int n)
{
#ifndef _calc_verletbuf_h
#define _calc_verletbuf_h
-
+#include "visibility.h"
#include "typedefs.h"
typedef struct
* The setup with smallest cluster sizes is return, such that the Verlet
* buffer size estimated with this setup will be conservative.
*/
+GMX_LIBGMXPREPROCESS_EXPORT
void verletbuf_get_list_setup(gmx_bool bGPU,
verletbuf_list_setup_t *list_setup);
* to determine their contribution to the drift exaclty, so we approximate.
* Returns the pair-list cut-off.
*/
+GMX_LIBGMXPREPROCESS_EXPORT
void calc_verlet_buffer_size(const gmx_mtop_t *mtop,real boxvol,
const t_inputrec *ir,real drift_target,
const verletbuf_list_setup_t *list_setup,
#include <signal.h>
#include <stdlib.h>
#include "typedefs.h"
+#include "compute_io.h"
static int div_nsteps(int nsteps,int nst)
{
#ifndef _compute_io_h
#define _compute_io_h
-
+#include "visibility.h"
#include "typedefs.h"
+GMX_LIBGMXPREPROCESS_EXPORT
extern double compute_io(t_inputrec *ir,int natoms,gmx_groups_t *groups,
int nrener,int nrepl);
/* Return total output to be written from this simulation. */
#ifndef _convparm_h
#define _convparm_h
-
+#include "visibility.h"
#include "typedefs.h"
+GMX_LIBGMXPREPROCESS_EXPORT
extern void convert_params(int atnr,t_params nbtypes[],
t_molinfo *mi,int comb,double reppow,real fudgeQQ,
gmx_mtop_t *mtop);
#endif
#include <stdio.h>
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
* base should be at least of size maxlen.
*/
+GMX_LIBGMXPREPROCESS_EXPORT
extern int fflib_search_file_end(const char *ffdir,
const char *file_end,
gmx_bool bFatalError,
* ending on dirend.
* Return the number of files and the directory names in dirnames.
*/
+GMX_LIBGMXPREPROCESS_EXPORT
extern gmx_bool fflib_fexist(const char *file);
/* Check if a file exists in the force field library */
+GMX_LIBGMXPREPROCESS_EXPORT
extern FILE *fflib_open(const char *file);
/* Open force field library file "file" for reading.
* "file" should contain the whole path to the force field library,
#include <stdio.h>
-
+#include "visibility.h"
typedef struct {
char *elem,*type;
double q,m;
double *blen;
} t_nm2type;
+GMX_LIBGMXPREPROCESS_EXPORT
extern t_nm2type *rd_nm2type(const char *ffdir,int *nnm);
/* Read the name 2 type database. nnm is the number of entries
* ff is the force field.
*/
+GMX_LIBGMXPREPROCESS_EXPORT
extern void dump_nm2type(FILE *fp,int nnm,t_nm2type nm2t[]);
/* Dump the database for debugging. Can be reread by the program */
+GMX_LIBGMXPREPROCESS_EXPORT
extern int nm2type(int nnm,t_nm2type nm2t[],t_symtab *tab,t_atoms *atoms,
gpp_atomtype_t atype,int *nbonds,t_params *bond);
/* Try to determine the atomtype (force field dependent) for the atoms
#ifndef _genhydro_h
#define _genhydro_h
-
+#include "visibility.h"
#include "pdbio.h"
#include "hackblock.h"
+GMX_LIBGMXPREPROCESS_EXPORT
extern int add_h(t_atoms **pdbaptr, rvec *xptr[],
int nah, t_hackblock ah[],
int nterpairs,
* return the New total number of atoms
*/
+GMX_LIBGMXPREPROCESS_EXPORT
extern int protonate(t_atoms **atoms, rvec **x, t_protonate *protdata);
/* Protonate molecule according to gmx2.ff/aminoacids.hdb
* when called the first time, new atoms are added to atoms,
#endif
#include <stdio.h>
+#include "visibility.h"
#include "typedefs.h"
#include "macros.h"
+GMX_LIBGMXPREPROCESS_EXPORT
extern void convert_harmonics(int nrmols,t_molinfo mols[],gpp_atomtype_t atype);
#endif /* _grompp_h */
#ifndef _h_db_h
#define _h_db_h
-
+#include "visibility.h"
#include "sysstuff.h"
#include "hackblock.h"
extern void read_ab(char *line,const char *fn,t_hack *ab);
/* Read one add block */
+GMX_LIBGMXPREPROCESS_EXPORT
extern int read_h_db(const char *ffdir,t_hackblock **ah);
/* Read the database from hdb file(s) in ffdir or current dir */
#include "toputil.h"
#include "pdb2top.h"
#include "string2.h"
+#include "hizzie.h"
static int in_strings(char *key,int nstr,const char **str)
{
#ifndef _hizzie_h
#define _hizzie_h
-
+#include "visibility.h"
+GMX_LIBGMXPREPROCESS_EXPORT
extern void set_histp(t_atoms *pdba,rvec *x,real angle,real distance);
/* calculate HIStidine protonation state */
#ifndef _readir_h
#define _readir_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "string2.h"
#include "readinp.h"
} t_gromppopts;
+GMX_LIBGMXPREPROCESS_EXPORT
extern void init_ir(t_inputrec *ir, t_gromppopts *opts);
/* Initiate stuff */
+GMX_LIBGMXPREPROCESS_EXPORT
extern void check_ir(const char *mdparin,t_inputrec *ir, t_gromppopts *opts,
warninp_t wi);
/* Validate inputrec data.
* Fatal errors will be added to nerror.
*/
+GMX_LIBGMXPREPROCESS_EXPORT
extern int search_string(char *s,int ng,char *gn[]);
/* Returns the index of string s in the index groups */
+GMX_LIBGMXPREPROCESS_EXPORT
extern void double_check(t_inputrec *ir,matrix box,gmx_bool bConstr,
warninp_t wi);
/* Do more checks */
+GMX_LIBGMXPREPROCESS_EXPORT
extern void triple_check(const char *mdparin,t_inputrec *ir,gmx_mtop_t *sys,
warninp_t wi);
/* Do even more checks */
+GMX_LIBGMXPREPROCESS_EXPORT
extern void check_chargegroup_radii(const gmx_mtop_t *mtop,const t_inputrec *ir,
rvec *x,
warninp_t wi);
/* Even more checks, charge group radii vs. cut-off's only. */
+GMX_LIBGMXPREPROCESS_EXPORT
extern void get_ir(const char *mdparin,const char *mdparout,
t_inputrec *ir,t_gromppopts *opts,
warninp_t wi);
* function is called. Also prints the input file back to mdparout.
*/
+GMX_LIBGMXPREPROCESS_EXPORT
extern void do_index(const char* mdparin,
const char *ndx,
gmx_mtop_t *mtop,
t_blocka *grps,char **gnames);
/* Process the pull parameters after reading the index groups */
+GMX_LIBGMXPREPROCESS_EXPORT
extern void set_pull_init(t_inputrec *ir,gmx_mtop_t *mtop,rvec *x,matrix box,
const output_env_t oenv, gmx_bool bStart);
/* Prints the initial pull group distances in x.
t_blocka *grps,char **gnames);
/* Process the rotation parameters after reading the index groups */
+GMX_LIBGMXPREPROCESS_EXPORT
extern void set_reference_positions(t_rot *rot, gmx_mtop_t *mtop, rvec *x, matrix box,
const char *fn, gmx_bool bSet, warninp_t wi);
#ifndef _specbond_h
#define _specbond_h
-
+#include "visibility.h"
#include "pdb2top.h"
+GMX_LIBGMXPREPROCESS_EXPORT
extern int mk_specbonds(t_atoms *pdba,rvec x[],gmx_bool bInteractive,
t_ssbond **specbonds,gmx_bool bVerbose);
#ifndef _ter_db_h
#define _ter_db_h
-
+#include "visibility.h"
#include "sysstuff.h"
#include "hackblock.h"
#include "grompp.h"
+GMX_LIBGMXPREPROCESS_EXPORT
extern int read_ter_db(const char *ffdir,char ter,
t_hackblock **tbptr,gpp_atomtype_t atype);
/* Read database for N&C terminal hacking */
+GMX_LIBGMXPREPROCESS_EXPORT
extern t_hackblock **filter_ter(int nrtp,t_restp rtp[],
int nb,t_hackblock tb[],
const char *resname,
int *nret);
/* Return a list of pointers to blocks that match residue name */
+GMX_LIBGMXPREPROCESS_EXPORT
extern t_hackblock *choose_ter(int nb,t_hackblock **tb,const char *title);
/* Interactively select one.. */
#ifndef _topexcl_h
#define _topexcl_h
-
+#include "visibility.h"
#include "topio.h"
typedef struct {
int ***a; /* like this: a[i][nre][nrx] */
} t_nextnb;
+GMX_LIBGMXPREPROCESS_EXPORT
extern void init_nnb(t_nextnb *nnb, int nr, int nrex);
/* Initiate the arrays for nnb (see above) */
+GMX_LIBGMXPREPROCESS_EXPORT
extern void done_nnb(t_nextnb *nnb);
/* Cleanup the nnb struct */
#define print_nnb(nnb, s)
#endif
+GMX_LIBGMXPREPROCESS_EXPORT
extern void gen_nnb(t_nextnb *nnb,t_params plist[]);
/* Generate a t_nextnb structure from bond information.
* With the structure you can either generate exclusions
#ifndef _topio_h
#define _topio_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "readir.h"
#include "grompp.h"
#include "gpp_atomtype.h"
+GMX_LIBGMXPREPROCESS_EXPORT
extern double check_mol(gmx_mtop_t *mtop,warninp_t wi);
/* Check mass and charge */
+GMX_LIBGMXPREPROCESS_EXPORT
extern char **do_top(gmx_bool bVerbose,
const char *topfile,
const char *topppfile,
/* This routine expects sys->molt[m].ilist to be of size F_NRE and ordered. */
+GMX_LIBGMXPREPROCESS_EXPORT
void generate_qmexcl(gmx_mtop_t *sys,t_inputrec *ir,warninp_t wi);
#endif /* _topio_h */
#include "enxio.h"
#include "mtop_util.h"
#include "string2.h"
+#include "tpbcmp.h"
static void cmp_int(FILE *fp,const char *s,int index,int i1,int i2)
{
#ifndef _tpbcmp_h
#define _tpbcmp_h
+#include "visibility.h"
+GMX_LIBGMXPREPROCESS_EXPORT
void
comp_tpx(const char *fn1,const char *fn2,gmx_bool bRMSD,real ftol,real abstol);
/* Compare two binary topology files */
+GMX_LIBGMXPREPROCESS_EXPORT
void
comp_trx(const output_env_t oenv,const char *fn1,const char *fn2,
gmx_bool bRMSD,real ftol,real abstol);
/* Compare two binary trajectory files */
+GMX_LIBGMXPREPROCESS_EXPORT
void
comp_enx(const char *fn1,const char *fn2,real ftol,real abstol,
const char *lastener);
#ifndef _vsite_parm_h
#define _vsite_parm_h
-
+#include "visibility.h"
#include "typedefs.h"
#include "grompp.h"
#include "gpp_atomtype.h"
+GMX_LIBGMXPREPROCESS_EXPORT
extern int set_vsites(gmx_bool bVerbose, t_atoms *atoms, gpp_atomtype_t atype,
t_params plist[]);
/* set parameters for vritual sites, return number of virtual sites */
+GMX_LIBGMXPREPROCESS_EXPORT
extern void set_vsites_ptype(gmx_bool bVerbose, gmx_moltype_t *molt);
/* set ptype to VSite for virtual sites */
+GMX_LIBGMXPREPROCESS_EXPORT
extern void clean_vsite_bondeds(t_params *ps, int natoms, gmx_bool bRmVSiteBds);
/* remove all bonded interaction (bonds, angles and diherals) that
have become obsolete due to virtual site constructions */
#ifndef _xlate_h
#define _xlate_h
-
+#include "visibility.h"
#include "index.h"
/* If bResname is true renames atoms based on residue names,
* otherwise renames atoms based on rtp entry names.
*/
+GMX_LIBGMXPREPROCESS_EXPORT
extern void rename_atoms(const char *xlfile,const char *ffdir,
t_atoms *atoms,t_symtab *symtab,const t_restp *restp,
gmx_bool bResname,gmx_residuetype_t rt,gmx_bool bReorderNum,
#ifndef _nbnxn_search_h
#define _nsnxn_search_h
-
+#include "visibility.h"
#include "typedefs.h"
#ifdef __cplusplus
/* Due to the cluster size the effective pair-list is longer than
* that of a simple atom pair-list. This function gives the extra distance.
*/
+GMX_LIBMD_EXPORT
real nbnxn_get_rlist_effective_inc(int cluster_size,real atom_density);
/* Allocates and initializes a pair search data structure */
#include <sys/time.h>
#endif
#include <math.h>
+#include "visibility.h"
#include "typedefs.h"
#include "string2.h"
#include "gmxfio.h"
#endif
/* Portable version of ctime_r implemented in src/gmxlib/string2.c, but we do not want it declared in public installed headers */
+GMX_LIBGMX_EXPORT
char *
gmx_ctime_r(const time_t *clock,char *buf, int n);
#include "statutil.h"
#include "typedefs.h"
#include "xvgr.h"
+#include "gmx_ana.h"
static const char *etitles[] = { "E-docked", "Free Energy" };
#include <io.h>
#endif
+#include "visibility.h"
#include "statutil.h"
#include "sysstuff.h"
#include "typedefs.h"
#include "string2.h"
/* Portable version of ctime_r implemented in src/gmxlib/string2.c, but we do not want it declared in public installed headers */
+GMX_LIBGMX_EXPORT
char *
gmx_ctime_r(const time_t *clock,char *buf, int n);
#include "gstat.h"
#include "tpxio.h"
#include "viewit.h"
-
+#include "gmx_ana.h"
static int strip_dssp(char *dsspfile,int nres,
gmx_bool bPhobres[],real t,
#include <nbsearch.h>
#include <trajana.h>
#include <math.h>
+#include "gmx_ana.h"
int gmx_dyecoupl(int argc, char *argv[])
#include "matio.h"
#include "binsearch.h"
#include "powerspect.h"
+#include "gmx_ana.h"
/* Print name of first atom in all groups in index file */
static void print_types(atom_id index[], atom_id a[], int ngrps,
#include "txtdump.h"
#include "eigio.h"
#include "index.h"
+#include "gmx_ana.h"
/* Suppress Cygwin compiler warnings from using newlib version of
* ctype.h */
#include "smalloc.h"
#include "vec.h"
#include "index.h"
+#include "gmx_ana.h"
#define MAXNAMES 30
#define NAME_LEN 30
#include "string2.h"
#include "futil.h"
#include "gmx_fatal.h"
+#include "gmx_ana.h"
static int calc_ntype(int nft,int *ft,t_idef *idef)
{
#include "macros.h"
#include "statutil.h"
#include "copyrite.h"
+#include "gmx_ana.h"
/*
* This program is needed to create the files:
#include "trnio.h"
#include "symtab.h"
#include "confio.h"
+#include "gmx_ana.h"
real pot(real x,real qq,real c6,real cn,int npow)
{