Add visibility defines
authorRoland Schulz <roland@utk.edu>
Fri, 16 Nov 2012 15:56:04 +0000 (10:56 -0500)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 27 Nov 2012 16:46:10 +0000 (17:46 +0100)
This adds visibility declarations for functions and variables used
outside of a library. This enables shared linking on Windows and
thus makes the binaries much smaller. It doesn't effect any other
build because the defines are set to empty by default.

With GCC the correctness can be tested by adding to CFLAGS:
-fvisibility=hidden -DUSE_VISIBILITY

Related to #701

Change-Id: Ied261586e49bae11c5f8a8dffe377f0b0f02dd9d

157 files changed:
CMakeLists.txt
include/3dview.h
include/atomprop.h
include/bondf.h
include/calcgrid.h
include/calch.h
include/chargegroup.h
include/checkpoint.h
include/confio.h
include/constr.h
include/copyrite.h
include/coulomb.h
include/disre.h
include/do_fit.h
include/domdec.h
include/domdec_network.h
include/edsam.h
include/enxio.h
include/filenm.h
include/force.h
include/futil.h
include/gbutil.h
include/gen_ad.h
include/gmx_ana.h
include/gmx_arpack.h
include/gmx_cpuid.h
include/gmx_detect_hardware.h
include/gmx_fatal.h
include/gmx_fatal_collective.h
include/gmx_fft.h
include/gmx_header_config.h.cmakein
include/gmx_lapack.h
include/gmx_matrix.h
include/gmx_omp.h
include/gmx_omp_nthreads.h
include/gmx_random.h
include/gmx_sort.h
include/gmx_statistics.h
include/gmx_wallcycle.h
include/gmxcpp.h
include/gmxfio.h
include/gpp_atomtype.h
include/gpp_nextnb.h
include/grompp.h
include/hackblock.h
include/index.h
include/indexutil.h
include/inputrec.h
include/invblock.h
include/main.h
include/maths.h
include/matio.h
include/md_logging.h
include/md_support.h
include/mdatoms.h
include/mdebin.h
include/mdrun.h
include/mshift.h
include/mtop_util.h
include/mtxio.h
include/mvdata.h
include/names.h
include/network.h
include/nonbonded.h
include/nrama.h
include/nrjac.h
include/nrnb.h
include/ns.h
include/nsgrid.h
include/oenv.h
include/orires.h
include/partdec.h
include/pbc.h
include/pdb2top.h
include/pdbio.h
include/perf_est.h
include/pme.h
include/princ.h
include/pull.h
include/pull_rotation.h
include/qmmm.h
include/random.h
include/rbin.h
include/readinp.h
include/resall.h
include/rmpbc.h
include/sfactor.h
include/shellfc.h
include/sighandler.h
include/sim_util.h
include/smalloc.h
include/sortwater.h
include/sparsematrix.h
include/splitter.h
include/statutil.h
include/strdb.h
include/string2.h
include/symtab.h
include/tables.h
include/tgroup.h
include/topsort.h
include/toputil.h
include/tpxio.h
include/trajana.h
include/trnio.h
include/txtdump.h
include/typedefs.h
include/types/ifunc.h
include/types/iteratedconstraints.h
include/types/nlistheuristics.h
include/update.h
include/vec.h
include/viewit.h
include/visibility.h [new file with mode: 0644]
include/vsite.h
include/warninp.h
include/wgms.h
include/writeps.h
include/xdrf.h
include/xtcio.h
include/xvgr.h
src/gmxlib/CMakeLists.txt
src/gmxlib/cinvsqrtdata.c
src/gmxlib/gmx_fatal.c
src/gmxlib/string2.c
src/kernel/calc_verletbuf.h
src/kernel/compute_io.c
src/kernel/compute_io.h
src/kernel/convparm.h
src/kernel/fflibutil.h
src/kernel/g_x2top.h
src/kernel/genhydro.h
src/kernel/gpp_tomorse.h
src/kernel/h_db.h
src/kernel/hizzie.c
src/kernel/hizzie.h
src/kernel/readir.h
src/kernel/specbond.h
src/kernel/ter_db.h
src/kernel/topexcl.h
src/kernel/topio.h
src/kernel/tpbcmp.c
src/kernel/tpbcmp.h
src/kernel/vsite_parm.h
src/kernel/xlate.h
src/mdlib/nbnxn_search.h
src/mdlib/sim_util.c
src/tools/gmx_anadock.c
src/tools/gmx_covar.c
src/tools/gmx_do_dssp.c
src/tools/gmx_dyecoupl.c
src/tools/gmx_hydorder.c
src/tools/gmx_make_edi.c
src/tools/gmx_make_ndx.c
src/tools/gmx_mk_angndx.c
src/tools/gmx_options.c
src/tools/gmx_sigeps.c

index 7fb19a985f65c8992c130094d932113b95d61fd4..833abf71639e8068ab735323a925022431835de9 100644 (file)
@@ -122,9 +122,13 @@ set(CMAKE_PREFIX_PATH "" CACHE STRING "Extra locations to search for external li
 ########################################################################
 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.
index 0ffdab0a970fe0f3ba4587c3128bad0de3656809..5a1682e8a4b5af78de517074b2c5ca47d86f149d 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _3dview_h
 #define _3dview_h
-
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -61,20 +61,26 @@ typedef struct {
   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);
index 479a65e1898ec017747f71cc64647a2767ccddb4..57487a0ee2ab58130e0d22263845fb082560345b 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _atomprop_h
 #define _atomprop_h
-
+#include "visibility.h"
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -48,9 +48,11 @@ typedef struct gmx_atomprop *gmx_atomprop_t;
 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 */
 
@@ -58,6 +60,7 @@ char *gmx_atomprop_element(gmx_atomprop_t aps,int atomnumber);
 
 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);
index 9853f1c5aa39f26dc80bd76807d8a4a0d9cfe1c1..1dce4f32e10a936c860ba036405519569fdae154 100644 (file)
@@ -38,6 +38,7 @@
 
 
 #include <stdio.h>
+#include "visibility.h"
 #include "typedefs.h"
 #include "nrnb.h"
 #include "pbc.h"
@@ -54,6 +55,7 @@ int glatnr(int *global_atom_index,int i);
  * 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,
@@ -91,6 +93,7 @@ void calc_bonds(FILE *fplog,const gmx_multisim_t *ms,
  *         the total potential energy (sum over epot).
  */
 
+GMX_LIBGMX_EXPORT
 void calc_bonds_lambda(FILE *fplog,
                              const t_idef *idef,
                              rvec x[],
@@ -105,6 +108,7 @@ void calc_bonds_lambda(FILE *fplog,
  * 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,
@@ -113,12 +117,14 @@ real posres(int nbonds,
                   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 */
@@ -152,6 +158,7 @@ void make_dp_periodic(real *dp);
  * 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);
 
index 3a93bd7ed315ac0cdad4408b4d202af7c927d66b..d4a7ef2b6b776b3ff165e1458242c1d36e211c79 100644 (file)
  * 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);
index 69997f5dd9a52a673a73a2fff8fee7f6feb338de..6c16c16e42a07efb1f601c65b335071be793a784 100644 (file)
 
 #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 
index 2190c46f9f3997efb6374b9b906066775e0adcd9..ceb1cbb9cdc42e782832436b4ddab8d8afc153d0 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _chargegroup_h
 #define _chargegroup_h
-
+#include "visibility.h"
 #include "sysstuff.h"
 #include "typedefs.h"
 
@@ -43,6 +43,7 @@
 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);
@@ -50,12 +51,14 @@ extern "C" {
    * 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[],
index eb31d258651c4b6feab3d9e71d31e63dd8e8e201..6a99fb854af72b1ec9081b9030e87e97307f6cce 100644 (file)
@@ -36,7 +36,7 @@
 #ifndef _checkpoint_h
 #define _checkpoint_h
 
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "gmxfio.h"
 
@@ -51,6 +51,7 @@ extern "C" {
  * 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,
@@ -68,6 +69,7 @@ void write_checkpoint(const char *fn,gmx_bool bNumberAndKeep,
  * 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,
@@ -78,6 +80,7 @@ void load_checkpoint(const char *fn,FILE **fplog,
  * 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);
 
@@ -85,6 +88,7 @@ void read_checkpoint_state(const char *fn,int *simulation_part,
 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.
@@ -97,6 +101,7 @@ void list_checkpoint(const char *fn,FILE *out);
  * 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,
index f0fbb9673b983d7e468b4eb972c2c2f4f24964df..0f8512aa261f7453590c8f3b9dafd65ff5753705 100644 (file)
@@ -36,7 +36,7 @@
 #ifndef _confio_h
 #define _confio_h
 
-
+#include "visibility.h"
 #include "typedefs.h"
 
 /* For reading coordinate files it is assumed that enough memory
@@ -56,6 +56,7 @@ int read_g96_conf(FILE *fp,const char *infile,t_trxframe *fr, char *line);
  * 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                                    */
@@ -68,31 +69,37 @@ void write_hconf_indexed_p(FILE *out,const char *title,t_atoms *atoms,
                                  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);
index 90ebef173e69c2956dcd298c9badc59a3c374f27..a2f7f6d1200f05a058cb2278873bbeb3a5b89fc8 100644 (file)
@@ -36,6 +36,7 @@
 
 #ifndef _constr_h
 #define _constr_h
+#include "visibility.h"
 #include "typedefs.h"
 #include "types/commrec.h"
 
@@ -55,6 +56,7 @@ enum
     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 */
 
@@ -177,12 +179,14 @@ gmx_bool constrain(FILE *log,gmx_bool bLog,gmx_bool bEner,
  *
  */
 
+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,
@@ -224,6 +228,7 @@ real *constr_rmsd_data(gmx_constr_t constr);
  * 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 */
 
index 487bdba60a758cc01b441236ae508c910a17e0ae..3493b95065658cdfbe3e695a6667f449e2fdee7c 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _copyrite_h
 #define _copyrite_h
-
+#include "visibility.h"
 
 #include <stdio.h>
 #include "types/simple.h"
@@ -45,6 +45,7 @@ extern "C" {
 #endif
     
 /* Has to be a function, so we can get version number from autoconf */   
+GMX_LIBGMX_EXPORT
 const char *GromacsVersion(void);
 
 void 
@@ -77,6 +78,7 @@ GPLText[] = {
 void
 pr_difftime(FILE *out,double dt);
 
+GMX_LIBGMX_EXPORT
 void
 CopyRight(FILE *out,const char *szProgram);
  
@@ -86,12 +88,14 @@ 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);
 
@@ -99,12 +103,14 @@ gmx_bool
 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... */
index 0bd28f3f8113d5a9bf48e38a70aaa4de0fddbb28..e1b54cb23f5088ebe176fbca17afdd04429b6c2c 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _coulomb_h
 #define _coulomb_h
-
+#include "visibility.h"
 #include <stdio.h>
 #include "typedefs.h"
 #include "types/commrec.h"
@@ -51,6 +51,7 @@ init_ewald_tab(ewald_tab_t *et, const t_commrec *cr, const t_inputrec *ir,
                    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 */
@@ -68,6 +69,7 @@ do_ewald(FILE *log,       gmx_bool bVerbose,
          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,
@@ -83,6 +85,7 @@ ewald_LRcorrection(FILE *fp,
  * 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);
@@ -94,6 +97,7 @@ ewald_charge_correction(t_commrec *cr,t_forcerec *fr,real lambda,matrix box,
 /* 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);
index 9648f68e653b3fbfcee2171b48ec5962ce33754d..cb2c4850faa80982c10375957f52ee80928225e2 100644 (file)
@@ -36,7 +36,7 @@
 
 #ifndef _disre_h
 #define _disre_h
-
+#include "visibility.h"
 #include "sysstuff.h"
 #include "typedefs.h"
 
@@ -44,6 +44,7 @@
 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);
@@ -53,6 +54,7 @@ void init_disres(FILE *fplog,const gmx_mtop_t *mtop,
  * 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,
@@ -64,6 +66,7 @@ void calc_disres_R_6(const gmx_multisim_t *ms,
 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 */
 
index 9ab20d1d43d8a76e2418d79b9645212ddd547758..8339da953f95c11e2df0912ff2831b2354313897 100644 (file)
 
 #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 */
 
@@ -63,6 +66,7 @@ real rhodev(int natoms,real mass[],rvec x[],rvec xp[]);
  * 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
@@ -72,6 +76,7 @@ void calc_fit_R(int ndim,int natoms,real *w_rls,rvec *xp,rvec *x,
  * 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.
@@ -80,9 +85,11 @@ void do_fit_ndim(int ndim,int natoms,real *w_rls,rvec *xp,rvec *x);
  * 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[]);
@@ -94,6 +101,7 @@ void reset_x_ndim(int ndim,int ncm,const atom_id *ind_cm,
  * 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[]);
index 6e785fe840b923811366d1a2b2c03b5246edc5c2..b598ebb187009df8f00af40b98b851b61ea33f0e 100644 (file)
@@ -18,7 +18,7 @@
 
 #ifndef _domdec_h
 #define _domdec_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "types/commrec.h"
 #include "vsite.h"
@@ -73,8 +73,10 @@ int dd_pme_maxshift_x(gmx_domdec_t *dd);
 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,
@@ -88,6 +90,7 @@ init_domain_decomposition(FILE *fplog,
                           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,
@@ -97,6 +100,7 @@ void dd_init_bondeds(FILE *fplog,
 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);
@@ -104,6 +108,7 @@ void set_dd_parameters(FILE *fplog,gmx_domdec_t *dd,real dlb_scale,
  * 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.
@@ -111,16 +116,19 @@ gmx_bool change_dd_cutoff(t_commrec *cr,t_state *state,t_inputrec *ir,
  * 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 */
 
@@ -130,6 +138,7 @@ void dd_force_flop_start(gmx_domdec_t *dd,t_nrnb *nrnb);
 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.
@@ -150,6 +159,7 @@ void dd_atom_spread_real(gmx_domdec_t *dd,real v[]);
 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,
@@ -176,6 +186,7 @@ void dd_partition_system(FILE            *fplog,
  * 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 */
 
@@ -239,8 +250,10 @@ void dd_sort_local_top(gmx_domdec_t *dd,t_mdatoms *mdatoms,
                               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);
 
index 5a709d599ccd8cf8420dade9c161b7a582d66567..fafd3f4aecf4848d8b80a664e6f296e5a013ee33 100644 (file)
@@ -18,7 +18,7 @@
 
 #ifndef _domdec_network_h
 #define _domdec_network_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "types/commrec.h"
 
@@ -80,6 +80,7 @@ dd_sendrecv2_rvec(const gmx_domdec_t *dd,
  * The DD master node is the master for these operations.
  */
 
+GMX_LIBMD_EXPORT
 void
 dd_bcast(gmx_domdec_t *dd,int nbytes,void *data);
 
index 564d61128b09d99daa6df36b9b0b0eb33bb2618b..b62c899a938485acd816c162f92962ba52b7b90a 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _edsam_h
 #define _edsam_h
-
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -46,6 +46,7 @@ void do_edsam(t_inputrec *ir,gmx_large_int_t step,t_mdatoms *md,
                      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 */
 
index 9f7447b01950114546105e23261eaec3afaab6ce..3e98f0f69c442d96b1ea27d8b71a99196ff75cea 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _enxio_h
 #define _enxio_h
-
+#include "visibility.h"
 #include "sysstuff.h"
 #include "typedefs.h"
 #include "pbc.h"
@@ -87,6 +87,7 @@ extern "C" {
   };
 
   /* names for the above enum */
+GMX_LIBGMX_EXPORT
   extern const char *enx_block_id_name[];
 
 
@@ -164,25 +165,34 @@ extern "C" {
 
 
   /* 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);
@@ -196,16 +206,19 @@ extern "C" {
   /* 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);
 
 
index 3586ad8bcf692fe702ebdb613282dfe58362e229..c2e94db0a010d643695fb052ef2d358a49f29aa2 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _filenm_h
 #define _filenm_h
-
+#include "visibility.h"
 #include "futil.h"
 
 #ifdef __cplusplus
@@ -45,6 +45,7 @@ extern "C" {
 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 */
 
@@ -52,6 +53,7 @@ const char *ftp2ext_generic(int ftp);
 /* 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 */
 
@@ -78,16 +80,19 @@ void parse_file_args(int *argc,char *argv[],int nf,t_filenm fnm[],
 /* 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 
@@ -96,9 +101,11 @@ int opt2fns(char **fns[], const char *opt,int nfile,
 #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. */
 
@@ -115,26 +122,32 @@ char *ftp2filter(int ftp);
 #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 */
 
@@ -144,10 +157,12 @@ gmx_bool is_set(const t_filenm *fnm);
 /* 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(). */
index 9b20347b9aa76579f00069dfe7411209dec7e10a..0aa20283d7e6461141661ec625cf1117fe244548 100644 (file)
@@ -36,7 +36,7 @@
 #ifndef _force_h
 #define _force_h
 
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "types/force_flags.h"
 #include "pbc.h"
@@ -91,6 +91,7 @@ void make_wall_tables(FILE *fplog,const output_env_t oenv,
 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)
@@ -120,6 +121,7 @@ extern t_forcetable make_atf_table(FILE *out,const output_env_t oenv,
                                   const char *fn,
                                   matrix box);
 
+GMX_LIBMD_EXPORT
 void pr_forcerec(FILE *fplog,t_forcerec *fr,t_commrec *cr);
 
 void
@@ -129,6 +131,7 @@ forcerec_set_ranges(t_forcerec *fr,
                    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.
@@ -136,6 +139,7 @@ gmx_bool can_use_allvsall(const t_inputrec *ir, const gmx_mtop_t *mtop,
  * 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);
@@ -143,6 +147,7 @@ gmx_bool uses_simple_tables(int cutoff_scheme,
  * with the type of kernel indicated.
  */
 
+GMX_LIBMD_EXPORT
 void init_interaction_const_tables(FILE *fp, 
                                    interaction_const_t *ic,
                                    gmx_bool bSimpleTable,
@@ -160,6 +165,7 @@ void init_interaction_const(FILE *fp,
  * uses forcerec as input. 
  */
 
+GMX_LIBMD_EXPORT
 void init_forcerec(FILE       *fplog,     
                           const output_env_t oenv,
                          t_forcerec *fr,   
@@ -183,10 +189,12 @@ void init_forcerec(FILE       *fplog,
  * 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 */
 
@@ -202,6 +210,7 @@ void reset_enerdata(t_grpopts *opts,
 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 */
 
@@ -212,6 +221,7 @@ void update_forcerec(FILE *fplog,t_forcerec *fr,matrix box);
 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,
@@ -239,6 +249,7 @@ extern void do_force(FILE *log,t_commrec *cr,
  * f is always required.
  */
 
+GMX_LIBMD_EXPORT
 void ns(FILE       *fplog,
               t_forcerec *fr,
               rvec       x[],
index 8d214353412d63a97c50bd64e5d172711b53f457..a31a1aa1f4f8aee5f4b81b57f90561eb505b5675 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _futil_h
 #define _futil_h
-
+#include "visibility.h"
 #include <stdio.h>
 #include "typedefs.h"
 #include "types/commrec.h"
@@ -89,9 +89,11 @@ extern "C" {
 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 */
 
@@ -104,14 +106,17 @@ gmx_bool is_pipe(FILE *fp);
 /*  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 */
 
@@ -122,18 +127,22 @@ void frewind(FILE *fp);
 #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,
@@ -147,6 +156,7 @@ gmx_directory_t;
 /* 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);
 
@@ -157,17 +167,21 @@ 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);
@@ -176,6 +190,7 @@ 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 */
index 11e530390ab4925939c4042dae101e6972e412df..125c48ad30140bb5ff8791a5a5267ff9949e76fe 100644 (file)
  * 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 */
 
@@ -47,8 +49,10 @@ void orient(int natom,rvec *x,rvec *v, rvec angle,matrix box);
  *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 
index 65ea814a94cc5176c534d7f30ca0ed112697b812..605e967be0a75e7f1c7108b3c024f020563d76cc 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _gen_ad_h
 #define _gen_ad_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "toputil.h"
 #include "gpp_nextnb.h"
@@ -48,6 +48,7 @@ extern "C" {
 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);
index 8b025f46f8d7b3784b9e4ad7d468e08c5e428a80..f156c256afd57ac924d7db166e8b083250410413 100644 (file)
 
 #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[]);
 
index cd5ab75a504fae4f4e82d21095ab4112b04106d8..60c1ea50e28c0769365fd3fa375ebe2cb8a6b40f 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef _GMX_ARPACK_H
 #define _GMX_ARPACK_H
 
-
+#include "visibility.h"
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -231,6 +231,7 @@ F77_FUNC(dseupd,DSEUPD)(int *     rvec,
  *                 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, 
@@ -292,6 +293,7 @@ F77_FUNC(ssaupd,SSAUPD)(int *     ido,
  *  \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, 
index 24578fafb713b10cb1d50df4a0900207c33dad67..8012c22fe953a2f2d1a849e93d36019b2582547d 100644 (file)
@@ -20,7 +20,7 @@
  */
 #ifndef GMX_CPUID_H_
 #define GMX_CPUID_H_
-
+#include "visibility.h"
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -113,6 +113,7 @@ enum gmx_cpuid_acceleration
 };
 
 /* Text strings corresponding to CPU vendors */
+GMX_LIBGMX_EXPORT
 extern const char *
 gmx_cpuid_vendor_string[GMX_CPUID_NVENDORS];
 
@@ -140,6 +141,7 @@ gmx_cpuid_init              (gmx_cpuid_t *              cpuid);
 /* 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);
 
@@ -150,10 +152,12 @@ gmx_cpuid_brand             (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);
 
@@ -166,6 +170,7 @@ gmx_cpuid_stepping          (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);
@@ -210,6 +215,7 @@ enum gmx_cpuid_x86_smt
  * 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);
 
index a3acf0b7b473f814016f100f1cdc952a98df657a..61e9be121b1c415fe249ae544423594dcf05309f 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef GMX_HARDWARE_DETECT_H
 #define GMX_HARDWARE_DETECT_H
-
+#include "visibility.h"
 #include "types/hw_info.h"
 
 #ifdef __cplusplus
@@ -31,13 +31,16 @@ extern "C" {
 } /* 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);
index 6dfd8871968eb861a0ce07898a9cfeda53f5d0b8..ba418d01f15a8037e04ac2e9494f74800dc09440 100644 (file)
@@ -36,6 +36,7 @@
 
 #ifndef _fatal_h
 #define _fatal_h
+#include "visibility.h"
 
 #include <stdio.h>
 #include <stdarg.h>
@@ -64,6 +65,7 @@ extern "C" {
 #endif
 #endif
   
+GMX_LIBGMX_EXPORT
 void 
 _where(const char *file,int line);
 #define where() _where(__FILE__,__LINE__)
@@ -79,6 +81,7 @@ _unset_fatal_tmp_file(const char *fn, const char *file, int 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__
@@ -108,6 +111,7 @@ void
 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__)
@@ -122,11 +126,14 @@ void _unexpected_eof(const char *fn,int line,const char *srcfn,int srcline);
  * 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 */
   
@@ -137,6 +144,7 @@ void doexceptions(void);
 
   /* 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);
@@ -159,6 +167,7 @@ void doexceptions(void);
    * 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 
@@ -187,6 +196,7 @@ set_gmx_error_handler(void (*func)(const char *msg));
    * 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
index 96f5e055b32292a0fc9bd59820073ce118776af8..e9629eaaa9bdd93da2c77665637556baa5f59f1d 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _fatal_collective_h
 #define _fatal_collective_h
-
+#include "visibility.h"
 #include "types/simple.h"
 #include "types/commrec.h"
 
@@ -44,6 +44,7 @@ extern "C" {
 #endif
   
 
+GMX_LIBGMX_EXPORT
 void
 gmx_fatal_collective(int f_errno,const char *file,int line,
                     const t_commrec *cr,gmx_domdec_t *dd,
index 2398e6f7bd3d5fc3c7e8d32640dd771cb7f242b3..63c61782ed834c64fe99f7ae7eea93467b6d34fc 100644 (file)
@@ -35,7 +35,7 @@
  */
 
 #include <stdio.h>
-
+#include "visibility.h"
 #include "types/simple.h"
 #include "gmxcomplex.h"
 
@@ -158,6 +158,7 @@ gmx_fft_init_many_1d        (gmx_fft_t *       fft,
  *        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,
@@ -221,6 +222,7 @@ gmx_fft_init_2d        (gmx_fft_t *         fft,
  *        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, 
@@ -348,6 +350,7 @@ gmx_fft_many_1d          (gmx_fft_t                  setup,
  * \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,
@@ -437,6 +440,7 @@ gmx_fft_2d               (gmx_fft_t                  setup,
  * \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,
@@ -513,6 +517,7 @@ gmx_fft_3d_real          (gmx_fft_t                  setup,
  *              of the other initializers.
  *
  */
+GMX_LIBMD_EXPORT
 void
 gmx_fft_destroy          (gmx_fft_t                 setup);
 
index 7cd6b3a95770aa7395a74809c9e44c723d16c86a..a2f98bf13ae657f443db07dc30427ab40dbcb91b 100644 (file)
@@ -9,5 +9,3 @@
 
 /* Detect native (i.e. non-Cygwin) Windows */
 #cmakedefine GMX_NATIVE_WINDOWS
-
-
index 6ce5138c524f307119ddd2682d507e1948eb6bd1..22cc046fb3eb8023572f3e6c61a6dde5821dbbde 100644 (file)
@@ -35,7 +35,7 @@
 #ifndef _GMX_LAPACK_H_
 #define _GMX_LAPACK_H_
 
-
+#include "visibility.h"
 /** @file
  *
  *  @brief Header definitions for the standard LAPACK library.
@@ -776,6 +776,7 @@ void
 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 *
index 37f38b8c2e0080ef39f7db5a86192273558524b2..52e1bffb708b32fd771f2a28bb2d6d0b450b2c7e 100644 (file)
 #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);
@@ -47,6 +49,7 @@ 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
index 01e520836073db0c6564646fd1a5a88552d289ba..51f12d4d4605922e9589652d5371692a6006bec6 100644 (file)
@@ -24,7 +24,7 @@
 
 #ifndef GMX_OMP_H
 #define GMX_OMP_H
-
+#include "visibility.h"
 #include "types/commrec.h"
 #include "mdrun.h"
 
@@ -38,6 +38,7 @@
 /*! 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.
@@ -46,13 +47,16 @@ int gmx_omp_get_num_procs(void);
 
 /*! 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);
 
index bbd6e612cbdc3b63dfc8bcefbbc523d71afc266c..a0b5613368e30900957bcba0d8605ea8b6830296 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef GMX_OMP_NTHREADS
 #define GMX_OMP_NTHREADS
-
+#include "visibility.h"
 #include "types/commrec.h"
 
 
@@ -52,6 +52,7 @@ typedef enum module_nth
 /*! 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,
@@ -60,9 +61,11 @@ void gmx_omp_nthreads_init(FILE *fplog, t_commrec *cr,
                            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 */
index 752ae09ef1f33b4ecc1947bc17428d8bf7b1a11e..5bc6b2a22567c7e023784b750436e7e644863302 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef _GMX_RANDOM_H_
 #define _GMX_RANDOM_H_
-
+#include "visibility.h"
 #include <stdio.h>
 #include "types/simple.h"
 
@@ -57,6 +57,7 @@ gmx_rng_t;
  * Returns the size of the RNG integer data structure.
  * \threadsafe Yes.
  */
+GMX_LIBGMX_EXPORT
 int
 gmx_rng_n(void);
 
@@ -74,6 +75,7 @@ gmx_rng_n(void);
  *
  * \threadsafe Yes.
  */
+GMX_LIBGMX_EXPORT
 gmx_rng_t 
 gmx_rng_init(unsigned int seed);
 
@@ -92,6 +94,7 @@ gmx_rng_init(unsigned int seed);
  *
  * \threadsafe Yes.
  */
+GMX_LIBGMX_EXPORT
 unsigned int
 gmx_rng_make_seed(void);
 
@@ -131,6 +134,7 @@ gmx_rng_init_array(unsigned int    seed[],
  * \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);
 
@@ -143,6 +147,7 @@ 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);
 
@@ -155,6 +160,7 @@ 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);
 
@@ -177,7 +183,8 @@ 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);
 
 
@@ -199,6 +206,7 @@ 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);
 
@@ -234,6 +242,7 @@ 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);
 
@@ -254,6 +263,7 @@ gmx_rng_gaussian_real(gmx_rng_t rng);
  *
  * threadsafe: yes
  */
+GMX_LIBGMX_EXPORT
 real
 gmx_rng_gaussian_table(gmx_rng_t rng);
 
index c1ef471b90232f32ce6d6914befc6101258ff773..da7408caa7131f1732dde89ee45a29822ee10c85 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef _GMX_SORT_H_
 #define _GMX_SORT_H_
 
+#include "visibility.h"
+
 /** @file gmx_sort.h
  *
  *  @brief Portable implementation of thread-safe sort routines.
@@ -49,6 +51,7 @@ extern "C"
  *                 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, 
index 5d28891b98faa401154d8f801dd8a0eb4480e17c..69c40ef9e1529b8a25d44ab8a621964dfb513a3c 100644 (file)
@@ -34,6 +34,7 @@
 
 #ifndef _GMX_STATS_H
 #define _GMX_STATS_H
+#include "visibility.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -52,14 +53,17 @@ enum { elsqWEIGHT_NONE, elsqWEIGHT_X, elsqWEIGHT_Y,
 
 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);
 
@@ -73,6 +77,7 @@ int gmx_stats_add_points(gmx_stats_t stats,int n,real *x,real *y,
    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);
 
@@ -81,6 +86,7 @@ int gmx_stats_get_point(gmx_stats_t stats,real *x,real *y,
    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);
@@ -99,8 +105,10 @@ int gmx_stats_get_corr_coeff(gmx_stats_t stats,real *R);
 /* 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);
@@ -109,6 +117,7 @@ int gmx_stats_get_error(gmx_stats_t stats,real *error);
 
 /* 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 */
@@ -128,6 +137,7 @@ int gmx_stats_make_histogram(gmx_stats_t gstats,real binwidth,int *nbins,
                                    int normalized,real **x,real **y);
 
 /* Return message belonging to error code */
+GMX_LIBGMX_EXPORT
 const char *gmx_stats_message(int estats);
 
 /****************************************************
@@ -138,6 +148,7 @@ int lsq_y_ax(int n, real x[], real y[], real *a);
 /* 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.
@@ -150,6 +161,7 @@ int lsq_y_ax_b_xdouble(int n, double x[], real 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);
index cd1083bec4d24d590048e7a3ee35062729f4cf29..5e63c50ed8b5ee1605f5a78a67e905b8587572f4 100644 (file)
@@ -37,6 +37,7 @@
 #define _gmx_wallcycle_h
 
 #include <stdio.h>
+#include "visibility.h"
 #include "typedefs.h"
 #include "types/commrec.h"
 
@@ -63,21 +64,25 @@ enum { ewcsDD_REDIST, ewcsDD_GRID, ewcsDD_SETUPCOMM,
 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 */
 
@@ -88,9 +93,11 @@ void wallcycle_print(FILE *fplog, int nnodes, int npme, double realtime,
                            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 */
 
index d260545a36edcda49be3b8a2abd152c0d607c547..5ef5fa34f5b94b895d77392c2464435db4a48491 100644 (file)
@@ -35,6 +35,7 @@
 
 #ifndef _gmxcpp_h
 #define _gmxcpp_h
+#include "visibility.h"
 typedef struct gmx_cpp *gmx_cpp_t; 
        
        /* The possible return codes for these functions */
@@ -50,6 +51,7 @@ enum { eCPP_OK, eCPP_FILE_NOT_FOUND, eCPP_EOF, eCPP_SYNTAX, eCPP_INTERRUPT,
    
    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
@@ -57,24 +59,28 @@ int cpp_open_file(const char *filenm,gmx_cpp_t *handlep, char **cppopts);
    
    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
@@ -82,5 +88,6 @@ int cpp_close_file(gmx_cpp_t *handlep);
    
    NOT THREAD SAFE 
    */
+GMX_LIBGMX_EXPORT
 char *cpp_error(gmx_cpp_t *handlep,int status);
 #endif
index ef56ebc8a166fa02c3dbd3edf7796bfc48bcd136..7fce2f7936730418c2450513ea97a262d56f0efa 100644 (file)
@@ -37,6 +37,7 @@
 #define _gmxfio_h
 
 #include <stdio.h>
+#include "visibility.h"
 #include "sysstuff.h"
 #include "typedefs.h"
 #include "xdrf.h"
@@ -97,11 +98,13 @@ int gmx_fio_fp_close(t_fileio *fp);
 
 
 /* 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);
 
 
@@ -116,12 +119,14 @@ void gmx_fio_setprecision(t_fileio *fio,gmx_bool bDouble);
 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 */
 
@@ -142,6 +147,7 @@ void gmx_fio_checktype(t_fileio *fio);
 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 */
 
@@ -152,15 +158,19 @@ int gmx_fio_fsync(t_fileio *fio);
    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 */
 
@@ -183,6 +193,7 @@ typedef struct
 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.
@@ -218,6 +229,7 @@ int gmx_fio_get_file_md5(t_fileio *fio, gmx_off_t offset,
 
 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);
 
        
index d76f6f297ad3f7d1abd150320bf5388af903fd64..908f64b348832b26604bc55679474960842a0895 100644 (file)
@@ -37,6 +37,7 @@
 #define _gpp_atomtype_h
 
 #include <stdio.h>
+#include "visibility.h"
 #include "typedefs.h"
 #include "macros.h"
 #include "grompp.h"
@@ -47,13 +48,16 @@ extern "C" {
 
 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 */
 
@@ -61,13 +65,19 @@ real get_atomtype_massA(int nt,gpp_atomtype_t at);
 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 */
@@ -75,6 +85,7 @@ int get_atomtype_atomnumber(int nt,gpp_atomtype_t at);
 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 */
 
@@ -105,10 +116,12 @@ int add_atomtype(gpp_atomtype_t at,t_symtab *tab,
 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 */
 
index 2f72d02300af3d0447075645b723f69144457b4f..105582808de16acb2601d20e950caf156da88649 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _gpp_nextnb_h
 #define _gpp_nextnb_h
-
+#include "visibility.h"
 #include "grompp.h"
 
 #ifdef __cplusplus
@@ -52,9 +52,11 @@ typedef struct {
   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 */
 
@@ -66,6 +68,7 @@ void print_nnb(t_nextnb *nnb, char *s);
 #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
index 8121f997414e7d7be8b8b539d9d96cfcb6a21957..dbb651a8ed8c8be3dffaae6caf80c1bc96bf7e0e 100644 (file)
@@ -37,6 +37,7 @@
 #define _grompp_h
 
 #include <stdio.h>
+#include "visibility.h"
 #include "typedefs.h"
 #include "macros.h"
 
@@ -101,6 +102,7 @@ typedef struct {
   int  nr;
 } t_mols;
 
+GMX_LIBGMXPREPROCESS_EXPORT
 gmx_bool is_int(double x);
 /* Returns TRUE when x is integer */
 
index 68c839ab4950b4109f9829681689830ff5fac5ad..1397c8063da27c352b79cde69f6107c9d005b999 100644 (file)
@@ -36,6 +36,7 @@
 #ifndef _hackblock_h
 #define _hackblock_h
 
+#include "visibility.h"
 #include "typedefs.h"
 #include "pdbio.h"
 #include "grompp.h"
@@ -186,6 +187,7 @@ void merge_t_hackblock(t_hackblock *s, t_hackblock *d);
 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 */
 
index ad91baa98d7eaeaea1992e5a7e877da7e008f668..e03c50019d702dc194b315af584fe8bcf60e37d4 100644 (file)
 #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,
@@ -49,9 +51,11 @@ void check_index(char *gname,int n,atom_id index[],
  * 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
@@ -73,6 +77,7 @@ void rd_index_nrs(char *statfile,int ngrps,int isize[],
                  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
@@ -87,6 +92,7 @@ typedef struct {
   atom_id  *inv_clust;
 } t_cluster_ndx;
 
+GMX_LIBGMX_EXPORT
 t_cluster_ndx *cluster_index(FILE *fplog,const char *ndx);
   
 typedef struct {
@@ -97,15 +103,19 @@ 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);
 
@@ -114,21 +124,27 @@ gmx_residuetype_get_alltypes(gmx_residuetype_t    rt,
                              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);
 
@@ -137,21 +153,26 @@ 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);
 
 
index 6af9d9d6c0331c502ec0c9cb2b4d8647e191bcb5..6c1eacba9a537d47baa750192a9fad8b0d9d8de0 100644 (file)
@@ -53,7 +53,7 @@
  */
 #ifndef INDEXUTIL_H
 #define INDEXUTIL_H
-
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -333,6 +333,7 @@ gmx_ana_indexmap_clear(gmx_ana_indexmap_t *m);
 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);
@@ -346,6 +347,7 @@ gmx_ana_indexmap_deinit(gmx_ana_indexmap_t *m);
 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);
 /*@}*/
index 2faa843551fb497931b08dd403c0b8ae2abc3354..679eb848cb9b1312e2c60005febaae30b17650ca 100644 (file)
@@ -29,7 +29,7 @@
  */
 
 #include <stdlib.h>
-
+#include "visibility.h"
 #include "types/inputrec.h"
 
 #ifdef __cplusplus
@@ -42,14 +42,19 @@ extern "C"
 
 
 
+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
index 5a74ad30867de81d2c33bacb7ecf4e1fd7f0f5c1..5774612daae6f24cb4c6f927702fc47fc7ec170e 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _invblock_h
 #define _invblock_h
-
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -47,6 +47,7 @@ atom_id *make_invblock(const t_block *block,int nr);
  * 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
index c6a08cc1d90fe92a1b503f788c11e4491fb0db5a..397b2844248029b0ee83b8ff2225d294835a8c2f 100644 (file)
@@ -38,6 +38,7 @@
 
 
 #include <stdio.h>
+#include "visibility.h"
 #include "network.h"
 
 #ifdef __cplusplus
@@ -50,17 +51,21 @@ char *gmx_gethostname(char *name, size_t len);
  * 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
@@ -76,6 +81,7 @@ void init_multisystem(t_commrec *cr, int nsim, char **multidirs,
  * 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
@@ -84,6 +90,7 @@ t_commrec *init_par(int *argc,char ***argv_ptr);
  * 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 
index a4fd55ded43197a4b2cbea603185e9fae4fee403..7db5b321d2a45edcef433cb6956e71a5f473d001 100644 (file)
@@ -38,6 +38,7 @@
 #define _maths_h
 
 #include <math.h>
+#include "visibility.h"
 #include "types/simple.h"
 #include "typedefs.h"
 
@@ -111,13 +112,17 @@ static const double sy_const[MAX_SUZUKI_YOSHIDA_NUM+1][MAX_SUZUKI_YOSHIDA_NUM+1]
     {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)
@@ -127,6 +132,7 @@ float   gmx_erfcf(float 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
@@ -195,6 +201,7 @@ gmx_log2(real x)
  *
  *  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,
index 1a5238a18a3a4a9891992a8357ac787c3db7ba04..3a7763a45e7e0c1849188a9ab5ba9bebdc9b07dd 100644 (file)
 
 #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 */
 
@@ -61,18 +64,22 @@ void printcmap(FILE *out,int n,t_mapping map[]);
 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,
@@ -82,6 +89,7 @@ void write_xpm3(FILE *out,unsigned int flags,
 /* 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,
@@ -98,6 +106,7 @@ void write_xpm_split(FILE *out,unsigned int flags,
  * 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,
@@ -126,8 +135,10 @@ void write_xpm(FILE *out,unsigned int flags,
  * 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);
index e197520b31ba0340f41fded5738592e22255657c..aa3cb2ab4916dfb41c77347f05148d83325f13d6 100644 (file)
 #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
@@ -50,6 +52,7 @@ void md_print_info(const t_commrec *cr, FILE *fplog,
  * 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.
index 9e1a99330c0be701cc893c5b630773081675ffd0..e721f665e88831d18b5b5c9c41a3cc256ff5178d 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _md_support_h
 #define _md_support_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "types/globsig.h"
 #include "sim_util.h"
@@ -76,28 +76,34 @@ extern "C" {
 
 
 /* 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[]);
 
@@ -108,14 +114,17 @@ int multisim_nstsimsync(const t_commrec *cr,
                        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,
index 99e11c092fb62c6e6aa9dc278b9582538613ae5c..f1522630f8a8c71e442bb2ee14779dcd482172c7 100644 (file)
 
 #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,
@@ -52,6 +54,7 @@ void atoms2md(gmx_mtop_t *mtop,t_inputrec *ir,
  * 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 */
 
index 3471fd8f644107b0045b639746fc8c34cb863cfb..659f390e5203c84a9c6904c22ccbb312785ce9e2 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _mdebin_h
 #define _mdebin_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "sysstuff.h"
 #include "ebin.h"
@@ -99,12 +99,14 @@ t_mdebin *init_mdebin(ener_file_t fp_ene,
                              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,
@@ -123,11 +125,14 @@ void upd_mdebin(t_mdebin *md,
         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,
@@ -143,9 +148,11 @@ void print_ebin(ener_file_t fp_ene,gmx_bool bEne,gmx_bool bDR,gmx_bool bOR,
    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);
 
index 5914c054d2bdc0d40f2a56d7dca0018ec93db522..e71174f8ccf20a908ec6cca221d608248b606337 100644 (file)
@@ -38,6 +38,7 @@
 
 #include <stdio.h>
 #include <time.h>
+#include "visibility.h"
 #include "typedefs.h"
 #include "network.h"
 #include "sim_util.h"
@@ -146,46 +147,58 @@ gmx_integrator_t do_md_openmm;
 
 /* 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);
 
index 0c9ed96b3ede79d75c5a860281539feab937cff8..7b3b83bf173032f2c5910bd7a0211ae2a07f1d7f 100644 (file)
 
 #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);
@@ -51,6 +52,7 @@ t_graph *mk_graph(FILE *fplog,
  * 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,
@@ -58,24 +60,31 @@ void mk_graph_ilist(FILE *fplog,
 /* 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 */
 
index c43e33512909d1a8f0bfae683665b64775084d63..ee2cf93de0c426b30ffda17abe9d82d95ef8eba7 100644 (file)
@@ -32,6 +32,7 @@
  * And Hey:
  * Gromacs Runs On Most of All Computer Systems
  */
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -42,15 +43,18 @@ extern "C" {
  * 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);
 
 
@@ -58,14 +62,17 @@ 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);
 
@@ -74,6 +81,7 @@ 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,
@@ -83,6 +91,7 @@ gmx_mtop_atomnr_to_atom(const gmx_mtop_atomlookup_t alook,
 /* 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,
@@ -94,6 +103,7 @@ gmx_mtop_atomnr_to_ilist(const gmx_mtop_atomlookup_t alook,
  * 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,
@@ -101,6 +111,7 @@ gmx_mtop_atomnr_to_molblock_ind(const gmx_mtop_atomlookup_t alook,
 
 
 /* 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);
@@ -115,6 +126,7 @@ typedef struct gmx_mtop_atomloop_all *gmx_mtop_atomloop_all_t;
  * 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);
 
@@ -131,6 +143,7 @@ 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);
@@ -155,6 +168,7 @@ typedef struct gmx_mtop_atomloop_block *gmx_mtop_atomloop_block_t;
 
 /* 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);
 
@@ -171,6 +185,7 @@ 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);
@@ -180,6 +195,7 @@ gmx_mtop_atomloop_block_next(gmx_mtop_atomloop_block_t aloop,
 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);
 
@@ -190,6 +206,7 @@ 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);
@@ -203,6 +220,7 @@ typedef struct gmx_mtop_ilistloop_all *gmx_mtop_ilistloop_all_t;
  * 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);
 
@@ -212,22 +230,26 @@ 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);
 
@@ -243,6 +265,7 @@ gmx_mtop_make_atomic_charge_groups(gmx_mtop_t *mtop,gmx_bool bKeepSingleMolCG);
 /* 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);
 
@@ -250,6 +273,7 @@ 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);
 
index 88c0545421c90ea532d7cd95c152d6b17546f1dd..2eec7b9f36a04cd5d4f1d465f1b15c39d6c4368c 100644 (file)
@@ -40,7 +40,7 @@
 
 #ifndef _MTXIO_H_
 #define _MTXIO_H_
-
+#include "visibility.h"
 #include "types/simple.h"
 #include "sparsematrix.h"
 
@@ -54,6 +54,7 @@ extern "C" {
  * 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,
@@ -73,6 +74,7 @@ gmx_mtxio_write(const char *             filename,
  * 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,
index 3f49a0822b781acdca78989e02c6c58b2d5faff8..08829595b5cbe853fdbcb4dd1c868d2c3318d1d6 100644 (file)
@@ -35,7 +35,7 @@
 
 #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.
@@ -64,6 +67,7 @@ void bcast_state(const t_commrec *cr,t_state *state,gmx_bool bAlloc);
 
 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);
index 7b2e56aa2641f22fa2273c874b06d8a25f8c83b4..e2f484caa4ed10b601b25b67426daae7e7464ed0 100644 (file)
@@ -36,7 +36,7 @@
 #ifndef _names_h
 #define _names_h
 
-
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -47,56 +47,105 @@ extern "C" {
  * 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];
index f7d6e4aff5670ef0bc4acf3163cacd9a2e73007b..c224e5fb5575bfef4949b8214084527d53c5b35f 100644 (file)
@@ -42,7 +42,7 @@
  */
 
 #include <stdio.h>
-
+#include "visibility.h"
 #include "types/simple.h"
 #include "types/commrec.h"
 #include "typedefs.h"
@@ -62,14 +62,17 @@ int gmx_node_num(void);
 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. */
 
@@ -82,21 +85,26 @@ gmx_bool gmx_mpi_initialized(void);
 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 */
 
@@ -106,12 +114,15 @@ void gmx_sumf_comm(int nr,float r[],MPI_Comm mpi_comm);
 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 */
 
@@ -121,6 +132,7 @@ void gmx_sumd_sim(int nr,double r[],const gmx_multisim_t *ms);
 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 */
 
index 23aa6421f74402242cd48e6e5ad81080047c976c..731a6a50992e198533b99322d6ebe4fc03b93ffb 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _nonbonded_h
 #define _nonbonded_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "pbc.h"
 #include "network.h"
@@ -51,6 +51,7 @@ extern "C" {
 
 
 
+GMX_LIBGMX_EXPORT
 void
 gmx_nonbonded_setup(FILE *         fplog,
                     t_forcerec *   fr,
@@ -60,6 +61,7 @@ gmx_nonbonded_setup(FILE *         fplog,
 
 
 
+GMX_LIBGMX_EXPORT
 void
 gmx_nonbonded_set_kernel_pointers(FILE *       fplog,
                                   t_nblist *   nl);
@@ -72,6 +74,7 @@ gmx_nonbonded_set_kernel_pointers(FILE *       fplog,
 #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,
index 851c41f52bc7a0cee9a5c3330ac3d3caf3ea9fa4..a1658d23c81fc8c61646bae58aad8ced51625fd8 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _nrama_h
 #define _nrama_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "statutil.h"
 #include "mshift.h"
@@ -73,9 +73,11 @@ typedef struct {
   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
index 966fd514ab08079c5bf211db23a910a809c27c48..9d5b4093110992f3699d2a8184a84031c238dc09 100644 (file)
 
 #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
@@ -52,6 +53,7 @@ void jacobi(double **a,int n,double d[],double **v,int *nrot);
  * 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,
index 2c4b15bbc15eceeb202008be9b82d57c5d80224e..728a7ce1a6d2b26c3d334a433b17f026e1d6ea41 100644 (file)
@@ -35,7 +35,7 @@
 
 #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);
@@ -60,23 +62,28 @@ 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 */
 
index 1b40338e3ea940f37432100aa1bdd4e79b6321a2..53515230e6198cace5268873fa40ddfe709cbce5 100644 (file)
@@ -37,6 +37,7 @@
 #define _ns_h
 
 #include <stdio.h>
+#include "visibility.h"
 #include "sysstuff.h"
 #include "typedefs.h"
 #include "pbc.h"
@@ -54,6 +55,7 @@ extern "C" {
  *
  ****************************************************/
 
+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
@@ -80,6 +82,7 @@ void init_ns(FILE *fplog,const t_commrec *cr,
                    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,
@@ -94,11 +97,13 @@ int search_neighbours(FILE *log,t_forcerec *fr,
  
 
 /* 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 */
index f0785477cb884980aea2154f7dbcb43e1167ab31..cb9b75425945f05d093d70dbfb977f611784781e 100644 (file)
@@ -32,7 +32,7 @@
  * And Hey:
  * Gromacs Runs On Most of All Computer Systems
  */
-
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -55,6 +55,7 @@ extern "C" {
  * 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);
index 70604fe50c300c62e5071d8700260aacbfbb65c7..a2411e9d9b4a53cf067f8428358d79d175ab7b52 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _oenv_h
 #define _oenv_h
-
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -99,24 +99,31 @@ int output_env_get_verbosity(const output_env_t oenv);
 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 */
 
@@ -124,6 +131,7 @@ gmx_bool output_env_get_view(const output_env_t oenv);
 /* 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 */
 
index 1d0b56eeb93c7f9751bc7c5ba10e997822512ac6..51dd43f0d38a21822f3f4f49350e68ff8ad82266 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _orires_h
 #define _orires_h
-
+#include "visibility.h"
 #include "sysstuff.h"
 #include "typedefs.h"
 
@@ -43,6 +43,7 @@
     extern "C" {
 #endif
 
+GMX_LIBGMX_EXPORT
 void init_orires(FILE *fplog,const gmx_mtop_t *mtop,
                        rvec x[],
                        const t_inputrec *ir,
@@ -59,6 +60,7 @@ real calc_orires_dev(const gmx_multisim_t *ms,
  * 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.
@@ -66,12 +68,14 @@ void diagonalize_orires_tensors(t_oriresdata *od);
  * 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 */
 
index 8ac73bce137862ba73514bc6666d8686ae12da7a..3749aea4c86525d01f066671b82978356f167193 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _partdec_h
 #define _partdec_h
-
+#include "visibility.h"
 #include "vsite.h"
 
 #ifdef __cplusplus
@@ -104,12 +104,15 @@ int pd_shift(const t_commrec *cr);
 
 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);
@@ -118,6 +121,7 @@ gmx_localtop_t *split_system(FILE *log,
 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 */
 
index e3c49ca249a2ad0f6e9e9553293ca872887fe51b..8ff6665990c6111f3996667fc5e32fc953c520e6 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _types_pbc_h
 #define _types_pbc_h
-
+#include "visibility.h"
 #include "sysstuff.h"
 #include "typedefs.h"
 #include "types/commrec.h"
@@ -57,9 +57,11 @@ extern "C" {
     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.
@@ -68,30 +70,36 @@ extern "C" {
   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
@@ -99,6 +107,7 @@ extern "C" {
    * 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
@@ -110,6 +119,7 @@ extern "C" {
    * 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.
@@ -123,6 +133,7 @@ extern "C" {
    * 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
@@ -132,6 +143,7 @@ extern "C" {
    * (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.
@@ -166,23 +178,28 @@ extern "C" {
    * 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.
@@ -190,6 +207,7 @@ extern "C" {
    * 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
@@ -197,18 +215,21 @@ extern "C" {
    * */
 
 
+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[]);
index a58f6199faa5c90e8e6fc063551837b30b24c5a5..15def43ba262bd18ea771c3a876e1f370acf9bc2 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _pdb2top_h
 #define _pdb2top_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "grompp.h"
 #include "gpp_atomtype.h"
@@ -44,6 +44,7 @@
 
 /* this *MUST* correspond to array in pdb2top.c */
 enum { ehisA, ehisB, ehisH, ehis1, ehisNR };
+GMX_LIBGMXPREPROCESS_EXPORT
 extern const char *hh[ehisNR];
 
 typedef struct {
@@ -51,6 +52,7 @@ 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);
@@ -59,6 +61,7 @@ void choose_ff(const char *ffsel,
  * 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,
@@ -66,6 +69,7 @@ void choose_watermodel(const char *wmsel,const char *ffdir,
  * 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, 
@@ -76,6 +80,7 @@ void get_hackblocks_rtp(t_hackblock **hb, t_restp **restp,
  * 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);
@@ -84,16 +89,20 @@ void match_atomnames_with_rtp(t_restp restp[],t_hackblock hb[],
  * 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[],
@@ -101,6 +110,7 @@ void write_top(FILE *out, char *pr,char *molname,
 /* 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,
@@ -117,6 +127,7 @@ void pdb2top(FILE *top_file, char *posre_fn, char *molname,
                    gmx_bool bRenumRes,gmx_bool bRTPresname);
 /* Create a topology ! */
 
+GMX_LIBGMXPREPROCESS_EXPORT
 void print_sums(t_atoms *atoms, gmx_bool bSystem);
 
 
index 092451805f6f6dd2221165a302be1e320fd0130a..a1e0c20007221965f70c5ad79c48042d607412b7 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _pdbio_h
 #define _pdbio_h
-
+#include "visibility.h"
 #include "sysstuff.h"
 #include "typedefs.h"
 #include "symtab.h"
@@ -61,6 +61,7 @@ enum { epdbATOM,   epdbHETATM, epdbANISOU, epdbCRYST1, epdbCOMPND,
 /* 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 */
 
@@ -68,18 +69,21 @@ void pdb_use_ter(gmx_bool bSet);
 /* 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);
@@ -96,6 +100,7 @@ void write_pdbfile(FILE *out,const char *title,t_atoms *atoms,
  * 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 */
 
@@ -118,9 +123,11 @@ void read_pdb_conf(const char *infile,char *title,
 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 */
 
@@ -133,6 +140,7 @@ gmx_bool gmx_conect_exist(gmx_conect conect,int ai,int aj);
 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 */
 
index 0dba685d6610785d5d302e0aeb2b525f90682941..0ec60a5e0d2bf2fc0cd176779ce5ae7435b3e9c9 100644 (file)
@@ -33,7 +33,7 @@
  */
 #ifndef _perf_est_h
 #define _perf_est_h
-
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -45,6 +45,7 @@ int n_bonded_dx(gmx_mtop_t *mtop,gmx_bool bExcl);
  * 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.
index 576b0a394c13e18d4c2830b78097144188882bf2..9a1c6af42ede0fdae05481d377a27da392ddfb4f 100644 (file)
@@ -37,6 +37,7 @@
 #define _pme_h
 
 #include <stdio.h>
+#include "visibility.h"
 #include "typedefs.h"
 #include "gmxcomplex.h"
 #include "gmx_wallcycle.h"
@@ -49,6 +50,7 @@ typedef real *splinevec[DIM];
 
 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,
@@ -57,6 +59,7 @@ int gmx_pme_init(gmx_pme_t *pmedata,t_commrec *cr,
  * 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,
@@ -92,6 +95,7 @@ int gmx_pme_do(gmx_pme_t pme,
  * 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,
@@ -127,9 +131,11 @@ void gmx_pme_send_x(t_commrec *cr, matrix box, rvec *x,
                           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 */
 
index fde98024470d5ba70aecfd7ee855cedcad407bbe..02fa86cec9ffbc56d9eaf771cc21b22207c52c12 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _princ_h
 #define _princ_h
-
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -45,16 +45,19 @@ extern "C" {
 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
@@ -62,6 +65,7 @@ real calc_xcm(rvec x[],int gnx,atom_id *index,t_atom *atom,rvec xcm,
  * 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.
index a7bbed3cb26a4ce4979dafaab60e76880dc36751..ec8fba881cfde9bba832479610fe3c23d5c1e455 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _pull_h
 #define _pull_h
-
+#include "visibility.h"
 #include "vec.h"
 #include "typedefs.h"
 
@@ -48,6 +48,7 @@ extern "C" {
    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);
 
@@ -69,11 +70,13 @@ void pull_constraint(t_pull *pull, t_mdatoms *md, t_pbc *pbc,
 /* 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,       
@@ -86,14 +89,17 @@ void init_pull(FILE *fplog,
                       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 */
index 3ba9eb00153dc63ee640faeefc6c6e4314881626..46afb3f313582e3ab09329be03ed789adcd22fe2 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef _pull_rotation_h
 #define _pull_rotation_h
-
+#include "visibility.h"
 #include "vec.h"
 #include "typedefs.h"
 
@@ -71,6 +71,7 @@ extern "C" {
  * \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);
@@ -132,6 +133,7 @@ extern real add_rot_forces(t_rot *rot, rvec f[], t_commrec *cr, gmx_large_int_t
  * \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);
 
 
index d305f61bf7ae7fa0a5134e2b3fcfd280e33476dd..4d856fa90dd672c88f76f464aebb3bcf2dda1446 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef _QMMM_h
 #define _QMMM_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "pbc.h"
 #include "network.h"
@@ -49,6 +49,7 @@ void atomic_number(int nr, char ***atomtype, int *nucnum);
 t_QMMMrec *mk_QMMMrec(void);
 /* allocates memory for QMMMrec */
 
+GMX_LIBMD_EXPORT
 void init_QMMMrec(t_commrec *cr,
                         matrix box,
                         gmx_mtop_t *mtop,
index 73466b972194a32256d634a819381977ba74fd69..d399707ba95b84e72b04304197953433a71b91f6 100644 (file)
 
 #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 */
@@ -60,6 +63,7 @@ real calc_cm(FILE *log,int natoms,real mass[],rvec x[],rvec v[],
  * 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
index f01f782a8fc5303377812c45a758186d81311ab9..b5c387c331c6dedb24c9b614c98d7a46ee936d71 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _rbin_h
 #define _rbin_h
-
+#include "visibility.h"
 #include "sysstuff.h"
 #include "typedefs.h"
 #include "network.h"
@@ -50,23 +50,31 @@ typedef struct {
   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) */
 
index f3599d95a97eb1f9e591b6b7579aa8e021fb3e7b..244043f98d6cdf3cc10121e60a0a1578d730c816 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _readinp_h
 #define _readinp_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "warninp.h"
 
@@ -59,6 +59,7 @@ typedef struct {
 
 
 
+GMX_LIBGMX_EXPORT
 t_inpfile *read_inpfile(const char *fn,int *ninp,
                               char **cppopts,
                               warninp_t wi);
@@ -67,29 +68,37 @@ t_inpfile *read_inpfile(const char *fn,int *ninp,
    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 */
 
@@ -157,12 +166,15 @@ int opt2parg_int(const char *option,int nparg,t_pargs pa[]);
 
 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);
index 69cbb1f84394b1caf2d62e19f781ddcef34775ed..b94d2be4fc361c1a4c0f30c1e2164899aac9c905 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _resall_h
 #define _resall_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "hackblock.h"
 #include "gpp_atomtype.h"
@@ -56,14 +56,17 @@ t_restp *get_restp(const char *rtpname,int nrtp,t_restp rtp[]);
  * 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 */
index 9165ac4d94a2f981005ee5de415185f544f96767..32299d8b482a0969f8e153168f39f8330d45dc86 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _rmpbc_h
 #define _rmpbc_h
-
+#include "visibility.h"
 #include "typedefs.h"
        
 #ifdef __cplusplus
@@ -44,11 +44,14 @@ extern "C" {
 
   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.
@@ -57,10 +60,12 @@ extern "C" {
    * 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. */
 
@@ -68,6 +73,7 @@ extern "C" {
     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.
index aa8fe9d96766604b559a1e734534f9dfc5a3d129..503b178a1a2304749b6827fbaf471f038bf68cbc 100644 (file)
@@ -36,7 +36,7 @@
 #ifndef _sfactor_h
 #define _sfactor_h
 
+#include "visibility.h" 
 #include "index.h"
 #include "types/simple.h"
 #include "gmxcomplex.h"
@@ -80,6 +80,7 @@ int return_atom_type (const char *name,gmx_structurefactors_t *gsf);
 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,
index 9eeed7b8e1ae4dad8ce289038e08466f13749a07..1826b3479d167ae412ae77e808f87ae08bd658fa 100644 (file)
@@ -31,7 +31,7 @@
  * And Hey:
  * Gallium Rubidium Oxygen Manganese Argon Carbon Silicon
  */
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "vsite.h"
 
@@ -42,15 +42,18 @@ extern "C" {
 /* 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,
index 16fe627a71f346528e6b69369afcc1e4e98ea778..90a224a66c3b9d085cbf54f40b4448ac635af5c0 100644 (file)
@@ -37,7 +37,7 @@
 #define _sighandler_h
 
 #include <signal.h>
-
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -66,20 +66,25 @@ extern const char *gmx_stop_cond_name[];
 /* 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);
 
 
index 9282f25107ec18a2a6670886b2e5c980f6a856c8..8eecf7a724677c63ccd9a7196538992d3510936d 100644 (file)
@@ -37,6 +37,7 @@
 #define _sim_util_h
 
 #include <time.h>
+#include "visibility.h"
 #include "typedefs.h"
 #include "enxio.h"
 #include "mdebin.h"
@@ -79,18 +80,22 @@ typedef struct {
 } 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);
@@ -114,6 +119,7 @@ gmx_mdoutf_t *init_mdoutf(int nfile,const t_filenm fnm[],
  * 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 */
 
@@ -123,6 +129,7 @@ void done_mdoutf(gmx_mdoutf_t *of);
 #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,
@@ -136,28 +143,36 @@ void write_traj(FILE *fplog,t_commrec *cr,
  * 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,
@@ -175,12 +190,14 @@ void calc_dispcorr(FILE *fplog,t_inputrec *ir,t_forcerec *fr,
 
 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,
index 88ad9f903a0ee44b66e9fd2620f460b568691cf5..8959f544e6b7a6a85a1175c2bc3fd57898f27fd7 100644 (file)
@@ -35,7 +35,7 @@
 
 #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
index 4cae320ec5979fdb7c95a9713d80cda36356d7f1..3e2a3fc622fd74223996f81863852e11eb595d9b 100644 (file)
 
 #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
@@ -51,12 +52,14 @@ void randwater(int astart,int nwater,int nwatom,
  */
 
 
+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 
index 27993c2f16e72eb86cd0d9d4c05b75cfddcd98aa..89b9cf297db2de354f9f1f10b9aa966a8095686c 100644 (file)
@@ -34,7 +34,7 @@
  */
 #ifndef _SPARSEMATRIX_H_
 #define _SPARSEMATRIX_H_
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "types/simple.h"
 
@@ -122,6 +122,7 @@ gmx_sparsematrix_t;
  *  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);
 
@@ -130,6 +131,7 @@ 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);
 
@@ -161,6 +163,7 @@ gmx_sparsematrix_value          (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, 
@@ -187,6 +190,7 @@ gmx_sparsematrix_compress       (gmx_sparsematrix_t *    A);
  * 
  * Calculate y = A * x for a sparse matrix A. 
  */
+GMX_LIBGMX_EXPORT
 void
 gmx_sparsematrix_vector_multiply(gmx_sparsematrix_t *    A,
                                  real *                  x,
index 5fb0832f10f19ca91b132bf92411c7e0c508be42..6039da1d4d4933b0e74ae449a4d80e7cbc16679f 100644 (file)
@@ -35,7 +35,7 @@
  
 #ifndef _splitter_h
 #define _splitter_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "types/inputrec.h"
 
@@ -43,6 +43,7 @@
 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,
@@ -55,6 +56,7 @@ void split_top(FILE *fp,int nnodes,gmx_localtop_t *top,
  * 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);
index d66f4fcc85fba7fc8d6c0622669dc5c9113eab22..82dda3e24fb4c2f4d9b529ed5cb891d76e5150be 100644 (file)
@@ -37,6 +37,7 @@
 #define _statutil_h
 
 #include <stdio.h>
+#include "visibility.h"
 #include "typedefs.h"
 #include "filenm.h"
 #include "readinp.h"
@@ -89,6 +90,7 @@ typedef gmx_bool t_next_x(t_trxstatus *status,real *t,int natoms,rvec x[],
    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[]);
 
@@ -96,34 +98,43 @@ 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,
@@ -134,6 +145,7 @@ int write_trxframe(t_trxstatus *status,t_trxframe *fr,gmx_conect gc);
  * 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);
@@ -142,18 +154,22 @@ int write_trx(t_trxstatus *status,int nind,atom_id *ind,t_atoms *atoms,
  * 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.
@@ -176,6 +192,7 @@ int check_times2(real t,real t0,real tp,real tpp,gmx_bool bDouble);
  * 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,
@@ -206,6 +223,7 @@ int check_times(real t);
 #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
@@ -216,12 +234,14 @@ int read_first_frame(const output_env_t oenv,t_trxstatus **status,
    * 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 
@@ -230,6 +250,7 @@ int read_first_x(const output_env_t oenv,t_trxstatus **status,
  * 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,
@@ -237,6 +258,7 @@ gmx_bool read_next_x(const output_env_t oenv,t_trxstatus *status,real *t,
  * 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.
@@ -245,6 +267,7 @@ void close_trj(t_trxstatus *status);
 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.
@@ -301,12 +324,14 @@ char *sscan(int argc,char *argv[],int *i);
 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,
index bfdf07761876aff2a0d6dcbd62c7c68fa9bad891..4db0cf99bad4ab3b292c60edf8b1e3815f3f1104 100644 (file)
 #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.
@@ -59,21 +61,25 @@ int fget_lines(FILE *in,char ***strings);
  * 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)
index 645316b319c835238e02ebf7ad56e985c27f8fab..068477d822da7a25029ef218431072d18978e352 100644 (file)
  *
  */
 
-
 #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"*/
@@ -83,35 +83,48 @@ extern "C" {
 #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);
 
@@ -131,6 +144,7 @@ unsigned int
 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. */
@@ -139,9 +153,11 @@ int gmx_wcmatch(const char *pattern, const char *src);
 
 /* 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
index 1651ac78878901c2b97b51abf7c59052402d36e5..2a7b59b4ac9024c83866f7856c5800b4fb2d26cf 100644 (file)
@@ -37,6 +37,7 @@
 #define _symtab_h
 
 #include <stdio.h>
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -54,10 +55,12 @@ extern "C" {
  * 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 
@@ -67,10 +70,12 @@ void close_symtab(t_symtab *symtab);
 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 
@@ -102,6 +107,7 @@ long rd_symtab(FILE *fp,t_symtab *symtab);
       * 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
index 262da15e2c887cf4e9cf1c4b12b47cd2e6a255eb..edd055ac9425beb7515dc2d7858dd234e5447d01 100644 (file)
@@ -36,7 +36,7 @@
 #ifndef _tables_h
 #define _tables_h
 
-
+#include "visibility.h"
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -44,6 +44,7 @@ extern "C" {
 }
 #endif
 
+GMX_LIBMD_EXPORT
 void table_spline3_fill_ewald_lr(real *table_F,
                                  real *table_V,
                                  real *table_FDV0,
index 1cf5cc01c27f3698cc6377d7da61a211fee6c83f..386a585cd4b0a42b998fdcb8947eebb32a3ba139 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _tgroup_h
 #define _tgroup_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "network.h"
 
@@ -43,6 +43,7 @@
 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. */
@@ -58,6 +59,7 @@ void accumulate_u(t_commrec *cr,t_grpopts *opts,
  * 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,
index 9b11a9f8d68792535692649183780e579499773c..ff3ea1bb63314725b225ed459bb84e081ace2538 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _topsort_h
 #define _topsort_h
 
-
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus 
@@ -10,11 +10,13 @@ extern "C" {
 
 
 /* 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
index f7260f4389957b983bd515e9d0bac2e00e1e6b95..b8bddb4d1b8d7f20392ae3643962ff8c541ba5e7 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _toputil_h
 #define _toputil_h
-
+#include "visibility.h"
 #include "grompp.h"
 #include "gpp_atomtype.h"
 
@@ -49,23 +49,28 @@ int name2index(char *str, char ***typenames, int ntypes);
 
 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 */
index 34b20acda4dc821045d07f24bf1e4ccf8f383c67..145b41d1a149f9490f13915d3d650d559768b642 100644 (file)
@@ -45,6 +45,7 @@
    * can also be used with the routines in gmxfio.h
    *
    **************************************************************/
+#include "visibility.h"
 #include "typedefs.h"
 #include "gmxfio.h"
 
@@ -86,12 +87,15 @@ typedef struct
  * 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.
@@ -104,6 +108,7 @@ void read_tpxheader(const char *fn, t_tpxheader *tpx, gmx_bool TopOnlyOK,
  * 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. 
@@ -111,9 +116,11 @@ void write_tpx_state(const char *fn,
  * 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);
@@ -124,14 +131,17 @@ int read_tpx(const char *fn,
  * 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,
index 8000a810334e0c4214f8b11e38b0f8fa79c93f4e..a6828c83af4556370cd01a1308510a71832061b7 100644 (file)
@@ -54,7 +54,7 @@
  */
 #ifndef TRAJANA_H
 #define TRAJANA_H
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "filenm.h"
 #include "readinp.h"
@@ -179,6 +179,7 @@ typedef struct gmx_ana_traj_t gmx_ana_traj_t;
 /*@{*/
 
 /** 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. */
@@ -191,6 +192,7 @@ gmx_ana_add_flags(gmx_ana_traj_t *d, unsigned long flags);
 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. */
@@ -203,6 +205,7 @@ gmx_ana_set_rmpbc(gmx_ana_traj_t *d, gmx_bool bRmPBC);
 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[],
@@ -214,6 +217,7 @@ parse_trjana_args(gmx_ana_traj_t *d, int *argc, char *argv[],
 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);
 
@@ -221,6 +225,7 @@ 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. */
@@ -234,21 +239,25 @@ gmx_ana_get_first_frame(gmx_ana_traj_t *d, t_trxframe **fr);
 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);
 
@@ -282,6 +291,7 @@ typedef int (*gmx_analysisfunc)(t_topology *top, t_trxframe *fr, t_pbc *pbc,
                                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. */
index 91d0de9646aec0365b7c39213217589e45551a23..fe6f7df8b0abee6694b2c0abf2f3160e2358671c 100644 (file)
@@ -50,7 +50,7 @@
  * can also be used with the routines in gmxfio.h
  *
  **************************************************************/
-       
+#include "visibility.h"        
 #include "typedefs.h"
 #include "gmxfio.h"
 
@@ -81,17 +81,21 @@ typedef struct              /* This struct describes the order and the      */
   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. 
  */
@@ -104,10 +108,12 @@ gmx_bool is_trn(FILE *fp);
  * 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,
@@ -122,10 +128,12 @@ gmx_bool fread_trn(t_fileio *fio,int *step,real *t,real *lambda,
  * 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 
index 79191b09b5856f092b78aef32a6517286f61b326..28eed7eabf2a7c8e68655c5dacf5aa3299624c97 100644 (file)
@@ -38,6 +38,7 @@
 
 
 #include <stdio.h>
+#include "visibility.h"
 #include "typedefs.h"
 #include "tpxio.h"
 
@@ -51,34 +52,47 @@ extern "C" {
 #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 
@@ -86,6 +100,7 @@ void pr_top(FILE *fp,int indent,const char *title,t_topology *top, gmx_bool bSho
  * 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
index caac2ce9778063f2b0b37698226cb4e9cbfb5e82..6f27e322d527e5c77d2d7b5d76c673d01a8852a0 100644 (file)
@@ -41,6 +41,7 @@
 #define NOTSET -12345
 
 #include <sys/types.h>
+#include "visibility.h"
 #include "sysstuff.h"
 #include "types/simple.h"
 #include "types/enums.h"
@@ -86,11 +87,13 @@ extern "C" {
 /* 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.
@@ -104,6 +107,7 @@ int over_alloc_dd(int n);
 /* 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
@@ -114,6 +118,7 @@ int gmx_large_int_to_int(gmx_large_int_t step,const char *warn);
 
 #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.
@@ -124,37 +129,56 @@ char *gmx_step_str(gmx_large_int_t i,char *buf);
 /* 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)
@@ -162,12 +186,14 @@ void stupid_fill_block(t_block *grp, int natom,gmx_bool bOneIndexGroup);
  * 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 */  
@@ -178,6 +204,7 @@ t_atoms *copy_t_atoms(t_atoms *src);
 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);
@@ -185,6 +212,7 @@ void t_atoms_set_resinfo(t_atoms *atoms,int atom_ind,t_symtab *symtab,
  * 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,
@@ -194,6 +222,7 @@ void free_t_atoms(t_atoms *atoms,gmx_bool bFreeNames);
 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. */
 
index 0e953dfcb441eec28463bb7907c0793f4257c49f..add24225c5f32a9ed5d2161da45f9956aafca74d 100644 (file)
@@ -36,7 +36,7 @@
 
 #ifndef _ifunc_h
 #define _ifunc_h
-
+#include "visibility.h"
 #include "idef.h"
 #include "mdatom.h"
 #include "fcdata.h"
@@ -120,6 +120,7 @@ typedef struct
 
 #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                                */
 
index 501c2743ccba94262b05f78361f973e0d73b533a..954c95441341a0f1ab5706865d6dc7e2509519b3 100644 (file)
@@ -34,7 +34,7 @@
  */
 #ifndef _iteratedconstraints_h
 #define _iteratedconstraints_h
-
+#include "visibility.h"
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -59,8 +59,10 @@ typedef struct
     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
index b240bacfdaad9e5dc72f04edca9e8d8cb1e4e1fd..f86e1495a43dcf285256b75034aadd5cb681b4e7 100644 (file)
@@ -34,7 +34,7 @@
  */
 #ifndef _nlistheuristics_h
 #define _nlistheuristics_h
-
+#include "visibility.h"
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -60,11 +60,13 @@ typedef struct {
 
 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
index a83c71c20d17df9bbb02760e60de37d60ffad435..67f15f5d3a01b1ebbc7581f0f611b7c41778ca19 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _update_h
 #define _update_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "mshift.h"
 #include "tgroup.h"
@@ -56,17 +56,21 @@ typedef struct gmx_update *gmx_update_t;
 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,   
@@ -78,6 +82,7 @@ void update_tcouple(FILE         *fplog,
                           t_mdatoms    *md
 );
 
+GMX_LIBMD_EXPORT
 void update_pcouple(FILE         *fplog,
                           gmx_large_int_t   step,
                           t_inputrec   *inputrec,   
@@ -88,6 +93,7 @@ void update_pcouple(FILE         *fplog,
                           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        */
@@ -111,8 +117,10 @@ void update_coords(FILE         *fplog,
 
 /* 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 */
@@ -138,6 +146,7 @@ void update_constraints(FILE         *fplog,
 
 /* 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   */
@@ -176,6 +185,7 @@ void calc_ke_part(t_state *state,t_grpopts *opts,t_mdatoms *md,
 void
 init_ekinstate(ekinstate_t *ekinstate,const t_inputrec *ir);
 
+GMX_LIBMD_EXPORT
 void
 update_ekinstate(ekinstate_t *ekinstate,gmx_ekindata_t *ekind);
 
@@ -190,14 +200,17 @@ void andersen_tcoupl(t_inputrec *ir,t_mdatoms *md,t_state *state, gmx_rng_t rng,
 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);
@@ -218,6 +231,7 @@ void rescale_velocities(gmx_ekindata_t *ekind,t_mdatoms *mdatoms,
                               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*/
 
index 0791772eac2d845d08a21244d6f2a2f213219086..a6df84f0d954571ab1f729ff07d004ee19b7a1c2 100644 (file)
   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"
@@ -134,7 +134,9 @@ extern "C" {
 #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
 
index 8a3496d92e52803b4516577473c8952185b1387a..e252f5a0b2f7a181e8398e2f8af891badc45422d 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _viewit_h
 #define _viewit_h
-
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -43,12 +43,14 @@ extern "C" {
 #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[] */
  
diff --git a/include/visibility.h b/include/visibility.h
new file mode 100644 (file)
index 0000000..a0430a2
--- /dev/null
@@ -0,0 +1,34 @@
+#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 */
index 2160a5575b8af50f3bd0bf269952080c7ec18d52..8a7baa7542aa9775c37cd3cd7822909db7e24e67 100644 (file)
@@ -35,8 +35,8 @@
 
 #ifndef _vsite_h
 #define _vsite_h
-
 #include <stdio.h>
+#include "visibility.h"
 #include "typedefs.h"
 #include "types/commrec.h"
 
@@ -78,6 +78,7 @@ typedef struct {
   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[],
@@ -94,6 +95,7 @@ void construct_vsites(FILE *log,gmx_vsite_t *vsite,
  * 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
@@ -115,6 +117,7 @@ void spread_vsite_f(FILE *log,gmx_vsite_t *vsite,
  * 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,
@@ -132,6 +135,7 @@ void split_vsites_over_threads(const t_ilist *ilist,
  * 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.
index fa7b66403ea5704bd7b94f2daf02ab8a5c287a08..6df43ec9b881576d6f2fc1f18ff601182624e096 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _warninp_h
 #define _warninp_h
-
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -47,6 +47,7 @@ extern "C" {
 typedef struct warninp *warninp_t;
 
 
+GMX_LIBGMX_EXPORT
 warninp_t
 init_warning(gmx_bool bAllowWarnings,int maxwarning);
 /* Initialize the warning data structure.
@@ -59,19 +60,23 @@ init_warning(gmx_bool bAllowWarnings,int maxwarning);
  * 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
@@ -83,6 +88,7 @@ warning(warninp_t wi,const char *s);
  * 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
@@ -92,6 +98,7 @@ warning_note(warninp_t wi,const char *s);
  * 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
@@ -99,12 +106,14 @@ warning_error(warninp_t wi,const char *s);
  * 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.
@@ -114,11 +123,13 @@ done_warning(warninp_t wi,int f_errno,const char *file,int line);
  * 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__)
index c2ad2ca2c68b075473dc5fbb3123c7d53bbdeb40..11224ce62466ccb9e213bb30754f0792a977c797 100644 (file)
@@ -37,6 +37,7 @@
 #define _wgms_h
 
 #include <stdio.h>
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -48,6 +49,7 @@ void write_gms(FILE *fp,int natoms,rvec x[],matrix box);
  * 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
index 38a31193de9c82bee6f63770a4ec9064be6e5707..fe43d5c248b98062cea9137593b4233cd1b3f24c 100644 (file)
@@ -38,6 +38,7 @@
 
 
 #include <stdio.h>
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -66,57 +67,81 @@ typedef struct t_int_psdata *t_psdata;
 
 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
index 4e1cf9c4b66efa9a7776a23c1309f2e55ea10d29..7cf870ef7e45a22b4d08e40307d6212717d4b645 100644 (file)
@@ -38,6 +38,7 @@
 
 
 #include <stdio.h>
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __PGI    /*Portland group compiler*/
@@ -77,6 +78,7 @@ typedef enum
 } 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 */
@@ -107,6 +109,7 @@ int xdr_xtc_seek_time(real time, FILE *fp, XDR *xdrs, int natoms,gmx_bool bSeekF
 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);
 
 
index 7da45aa8cd844aa77d333946b09bbdc29ab31b51..3c0db2fdb494d3285e926cc54f353d86bbb79ef2 100644 (file)
@@ -36,6 +36,7 @@
 #ifndef _xtcio_h
 #define _xtcio_h
 
+#include "visibility.h"
 #include "typedefs.h"
 #include "gmxfio.h"
 #include "xdrf.h"
@@ -48,22 +49,27 @@ extern "C" {
  * 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);
index deb53c37800bfd5a2829d4700333a00b42078653..b641da667c2692c3c44c903165251b5e40253d83 100644 (file)
@@ -36,6 +36,7 @@
 #ifndef _xvgr_h
 #define _xvgr_h
 
+#include "visibility.h"
 #include "sysstuff.h"
 #include "typedefs.h"
 #include "viewit.h"
@@ -88,6 +89,7 @@ enum {
  * \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 */
 
@@ -95,6 +97,7 @@ enum {
   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);
@@ -102,6 +105,7 @@ void xvgr_header(FILE *fp,const char *title,const char *xaxis,
  * 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);
@@ -110,30 +114,37 @@ FILE *xvgropen_type(const char *fn,const char *title,const char *xaxis,
  * 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);
@@ -143,6 +154,7 @@ void xvgr_new_dataset(FILE *out,
     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 */
@@ -155,6 +167,7 @@ void xvgr_box(FILE *out,
                      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
@@ -166,9 +179,11 @@ int read_xvg_legend(const char *fn,double ***y,int *ny,
  * 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
@@ -179,6 +194,7 @@ void write_xvg(const char *fn,const char *title,int nx,int ny,real **y,
 /* 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,
index 0e1cc4f0dcd32138ae515681307d1956cb01ac7f..83a60cf2bc9ab3a09fcbe28b904f75032906b032 100644 (file)
@@ -90,7 +90,7 @@ if(USE_VERSION_H)
        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)
 
index f426643ced340a9dd5ace20a83735a308f6394db..4fa55effa7279bab126ec0813a58d52d0807d4b2 100644 (file)
@@ -37,6 +37,7 @@
 #include <config.h>
 #endif
 
+#include "vec.h"
 
 struct gmx_invsqrtdata 
 {
index f4131d6d15ea16f041da948e97c78809783b5006..42da0dc937a4fff4b7b9407efa0dd02e80ce7d4b 100644 (file)
@@ -52,6 +52,7 @@
 #include "string2.h"
 #include "smalloc.h"
 #include "gmxfio.h"
+#include "gmx_fatal_collective.h"
 
 #ifdef GMX_LIB_MPI
 #include <mpi.h>
index 5af6f04a9e74ff33a31e85f709a456e8a4f50d47..9d8e535df48096df7c2ecf5ba747eb8b779b80fe 100644 (file)
@@ -36,6 +36,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+#include "visibility.h"
 #include "gmx_header_config.h"
 
 #ifdef GMX_CRAY_XT3
@@ -174,6 +175,7 @@ void trim (char *str)
   rtrim (str);
 }
 
+GMX_LIBGMX_EXPORT
 char *
 gmx_ctime_r(const time_t *clock,char *buf, int n)
 {
index d9a85fcb58388e6ab5998b75e58989ed406e1cc7..50cdca14aeff22619eb869e68d41b51742564d8e 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _calc_verletbuf_h
 #define _calc_verletbuf_h
-
+#include "visibility.h"
 #include "typedefs.h"
 
 typedef struct
@@ -49,6 +49,7 @@ 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);
 
@@ -61,6 +62,7 @@ void verletbuf_get_list_setup(gmx_bool bGPU,
  * 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,
index 2cac2bd4951da11fbfa3b1c7b97030cc1edf065a..257f2e340f09af505dffb6fd7c31a97620721442 100644 (file)
@@ -40,6 +40,7 @@
 #include <signal.h>
 #include <stdlib.h>
 #include "typedefs.h"
+#include "compute_io.h"
 
 static int div_nsteps(int nsteps,int nst)
 {
index 6cf2853868f79eba9d7c1a1373f6ebf6fe014a01..7ada264a3f533255659e77b00b1bf0e6ffc1ce50 100644 (file)
 
 #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. */
index a98310739858850046a9b7d14d9039b4308469be..267730342f4d054a601a9cf33ad48b365d066fcf 100644 (file)
 
 #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);
index b5416953692866f803618d7e94849cca8469f3d2..85e497636abcbc1e29e37a20df0b5757a6d543af 100644 (file)
@@ -41,6 +41,7 @@
 #endif
 
 #include <stdio.h>
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -62,6 +63,7 @@ extern void fflib_filename_base(const char *filename,char *filebase,int maxlen);
  * 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,
@@ -77,9 +79,11 @@ extern int fflib_search_file_in_dirend(const char *filename,const char *dirend,
  * 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,
index 79cd43421d890b64ff24e4f4941ccee8691c1617..d8bd7f1e643759527150ce9f74bbf892182d9603 100644 (file)
@@ -38,7 +38,7 @@
 
        
 #include <stdio.h>
-       
+#include "visibility.h"        
 typedef struct {
   char   *elem,*type;
   double q,m;
@@ -47,14 +47,17 @@ typedef struct {
   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 
index ba905433caa4d4036ce73b58861cf6e545604708..56dbfb47bd652e8a327b871c5b2dea1fb6c99179 100644 (file)
 
 #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,
@@ -58,6 +59,7 @@ extern int add_h(t_atoms **pdbaptr, rvec *xptr[],
  * 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, 
index 54c37a8e489cd264d1756e9d9e9c81ef223460c0..c1935e604a25b2f68404d317d7c5592d01456d65 100644 (file)
 #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 */
index 6329e67b71fc3d666de739383e9bad1c2a5ea153..5853c76232e967c2a1800726d7cf109afe535891 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _h_db_h
 #define _h_db_h
-
+#include "visibility.h"
 #include "sysstuff.h"
 #include "hackblock.h"
 
@@ -47,6 +47,7 @@ extern const int ncontrol[];
 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 */
 
index fce3a522f403be96b21a3bc3f145fa2d28b15f20..be5f00a11ddc5a65bebeddb83ef39d0ca0030b9e 100644 (file)
@@ -47,6 +47,7 @@
 #include "toputil.h"
 #include "pdb2top.h"
 #include "string2.h"
+#include "hizzie.h"
 
 static int in_strings(char *key,int nstr,const char **str)
 {
index 416b6589a36e96ac86c6e62a68e1c4067430b066..d6046e740b137d6f6d486d71ab0474975032256e 100644 (file)
@@ -35,7 +35,8 @@
 
 #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 */
 
index d84c2699fcce301a6a3020d5e5ebf4cab0ad2a6c..2dad5dc3a62a172097ed86b7c7e75dc1e97237bb 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _readir_h
 #define _readir_h
-
+#include "visibility.h"
 #include "typedefs.h"
 #include "string2.h"
 #include "readinp.h"
@@ -73,30 +73,37 @@ typedef struct {
 } 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);
@@ -105,6 +112,7 @@ extern void get_ir(const char *mdparin,const char *mdparout,
  * 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,
@@ -128,6 +136,7 @@ extern void make_pull_groups(t_pull *pull,char **pgnames,
                             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.
@@ -150,6 +159,7 @@ extern void make_rotation_groups(t_rot *rot,char **rotgnames,
                  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);
 
index 7e0fbbb04e4cc91c604e896dc1056d27f34874d7..c86e07a99a60f3b1b7c857ab9de935b6b3f6463e 100644 (file)
 
 #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);
 
index 69044d3cf5278a9cdc29e50ebbdf536e5425b12c..0aae8caf522d2acebe5da60507fef179e99c4593 100644 (file)
 
 #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,
@@ -51,6 +53,7 @@ extern t_hackblock **filter_ter(int nrtp,t_restp rtp[],
                                 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.. */
 
index eea2acc95b3647c3b323f415e3f0bad60247fd63..3395f156e75ae5b7a00d8e218073234828a7624c 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _topexcl_h
 #define _topexcl_h
-
+#include "visibility.h"
 #include "topio.h"
 
 typedef struct {
@@ -48,9 +48,11 @@ 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 */
 
@@ -62,6 +64,7 @@ extern void print_nnb(t_nextnb *nnb, char *s);
 #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
index f9573c61a47e678e1aad22c0b8bba0a710683239..eb4375fbfb236de4a75963184638bbff70ce516d 100644 (file)
 
 #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,
@@ -65,6 +67,7 @@ extern char **do_top(gmx_bool         bVerbose,
 
 
 /* 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 */
index 3bcf86ad403184094d5701d153151ae37e4bfffc..672629960401356a4bed7da548a1d91c280a0ba2 100644 (file)
@@ -53,6 +53,7 @@
 #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)
 {
index c906413e10368499a344fa79d3bdce6afc4abac5..6252c0b0f5910e2b91829e3d42ea64d7741581ba 100644 (file)
 
 #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);
index da246cd40bc7e52c95c44ddfd67b539c6244fb98..b81ecb2781f276740f9c70c29c1809c170719f86 100644 (file)
 
 #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 */
index e3dc25fe3da6efe843d3b4cdebd4178d5323a4e0..1d869eb160d55ceaa4e21dacd8bfbc2886561fb4 100644 (file)
 
 #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,
index 891376c61773584fe74f146399c37aa787fb3f53..1d27f4257ba9c89f6306c96343369e686ac219f2 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef _nbnxn_search_h
 #define _nsnxn_search_h
-
+#include "visibility.h"
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -54,6 +54,7 @@ gmx_bool nbnxn_kernel_pairlist_simple(int nb_kernel_type);
 /* 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 */
index bd75bdc1e036e1d2ae7a193d978384ed1ed305f9..667287a719ccb58c1c8d0b27f161ba47578ea363 100644 (file)
@@ -48,6 +48,7 @@
 #include <sys/time.h>
 #endif
 #include <math.h>
+#include "visibility.h"
 #include "typedefs.h"
 #include "string2.h"
 #include "gmxfio.h"
@@ -114,6 +115,7 @@ typedef struct gmx_timeprint {
 #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);
 
index 0e50b9cbf5356de1a1bedf0add202611d93c68ed..14a5a60d7711fededf1b6a3d63a863ce2b361490 100644 (file)
@@ -47,6 +47,7 @@
 #include "statutil.h"
 #include "typedefs.h"
 #include "xvgr.h"
+#include "gmx_ana.h"
        
 static const char *etitles[] = { "E-docked", "Free Energy" };
 
index 66d2085f26c75025c05c9ae2f1992382983ca764..551990dfd7cc06d51dde40a65934837510741530 100644 (file)
@@ -50,6 +50,7 @@
 #include <io.h>
 #endif
 
+#include "visibility.h"
 #include "statutil.h"
 #include "sysstuff.h"
 #include "typedefs.h"
@@ -76,6 +77,7 @@
 #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);
 
index 10c9fc7a9d50df1bc19de819bf60cf34564efee2..71cfce60b7611a3b3614608a225fbb2f9de4b70b 100644 (file)
@@ -54,7 +54,7 @@
 #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,
index 91e319ae1cc932e85c1ddb5b06ef530c092c86e8..f0258daf3e8728b178c968a539bc5b985fa6bbd5 100644 (file)
@@ -39,6 +39,7 @@
 #include <nbsearch.h>
 #include <trajana.h>
 #include <math.h>
+#include "gmx_ana.h"
 
 
 int gmx_dyecoupl(int argc, char *argv[])
index 5094c8ef3699051e6bdc421fd36f49e39980d438..c0d840846780345cc66f9cf8d5b36216a6a1840e 100644 (file)
@@ -59,6 +59,7 @@
 #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, 
index 3142dc16de5a6f0aba1f2619953c4d9b18967da0..4da7814f2ad1b8d339b83405c8af048630987a5f 100644 (file)
@@ -63,6 +63,7 @@
 #include "txtdump.h"
 #include "eigio.h"
 #include "index.h"
+#include "gmx_ana.h"
 
 /* Suppress Cygwin compiler warnings from using newlib version of
  * ctype.h */
index 6dbe2e2a8ab35c2a5f260ceb43211ca455386bc0..ae653c4f3b40d0a156641380253fe8398a15b2a6 100644 (file)
@@ -50,6 +50,7 @@
 #include "smalloc.h"
 #include "vec.h"
 #include "index.h"
+#include "gmx_ana.h"
 
 #define MAXNAMES 30
 #define NAME_LEN 30
index 780d4c203e587d2d3313f8a9ec3b5a288c3daf9e..5207f1992c783c0d7db96f74ea0928b0fbb00c3d 100644 (file)
@@ -45,6 +45,7 @@
 #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)
 {
index c1763b8eec01465cdf4830d605e2af9cb526bc3b..fcb12e8774016c19c4683efdab16686b556b7126 100644 (file)
@@ -40,6 +40,7 @@
 #include "macros.h"
 #include "statutil.h"
 #include "copyrite.h"
+#include "gmx_ana.h"
 
 /* 
  * This program is needed to create the files:
index 190152ea273072b92b5035425895ab7ac27c6b32..37866adcf5c06ca7708ff8e184c45aa75cef3088 100644 (file)
@@ -54,6 +54,7 @@
 #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)
 {