Added conditional inclusion of config.h to source files
[gromacs.git] / src / mdlib / callf77.c
blob5d938e8be2d9742452968403ac53b7c1ead89dd6
1 /*
2 * $Id$
3 *
4 * This source code is part of
5 *
6 * G R O M A C S
7 *
8 * GROningen MAchine for Chemical Simulations
9 *
10 * VERSION 3.2.0
11 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
12 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
13 * Copyright (c) 2001-2004, The GROMACS development team,
14 * check out http://www.gromacs.org for more information.
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
21 * If you want to redistribute modifications, please consider that
22 * scientific software is very special. Version control is crucial -
23 * bugs must be traceable. We will be happy to consider code for
24 * inclusion in the official distribution, but derived work must not
25 * be called official GROMACS. Details are found in the README & COPYING
26 * files - if they are missing, get the official version at www.gromacs.org.
28 * To help us fund GROMACS development, we humbly ask that you cite
29 * the papers on the package - you can find them in the top README file.
31 * For more info, check our website at http://www.gromacs.org
33 * And Hey:
34 * GROwing Monsters And Cloning Shrimps
36 /* This file is completely threadsafe - keep it that way! */
37 #ifdef HAVE_CONFIG_H
38 #include <config.h>
39 #endif
41 #include "callf77.h"
42 #include "fatal.h"
44 /* This file provides the interface to fortran routines in a machine
45 * independent way.
48 /* Fortran versions of shake and settle */
50 #ifdef USE_FORTRAN
51 extern void F77_FUNC(forsettle,FORSETTLE)(int *nshake,int owptr[],real
52 b4[],real after[],real
53 *dOH,real *dHH,real *mO,real
54 *mH,int *error);
55 extern void F77_FUNC(forshake,FORSHAKE)(atom_id iatom[],int *ncon,
56 int *nit, int *maxnit,
57 real dist2[],real xp[],
58 real rij[],real m2[],
59 real *omega,
60 real invmass[],real tt[],
61 real lambda[],int *error);
62 extern void F77_FUNC(forlincs,FORLINCS)(real *x,real *xp,int *nc,
63 int *bla1,int *bla2,int *blnr,
64 int *blbnb,real *bllen,
65 real *blc,real *blcc,real *blm,
66 int *nit,int *nrec,real *invmass,
67 real *r,real *temp1,real *temp2,
68 real *temp3,real *wangle,
69 int *warn,real *lambda);
70 #endif
72 void fsettle(int *nshake,int owptr[],real b4[],real after[],real *dOH,real *dHH,real *mO,real *mH,int *error)
74 #ifdef USE_FORTRAN
75 F77_FUNC(forsettle,FORSETTLE) (nshake,owptr,b4,after,dOH,dHH,mO,mH,error);
76 #else
77 fatal_error(0,"fsettle called (Fortran routine from %s %d)",__FILE__,__LINE__);
78 #endif
81 void fshake(atom_id iatom[],int *ncon,int *nit,int *maxnit,real dist2[],real xp[],real rij[],real m2[],real *omega,real invmass[],real tt[],real lambda[],int *error)
83 #ifdef USE_FORTRAN
84 F77_FUNC(forshake,FORSHAKE)(iatom,ncon,nit,maxnit,dist2,xp,rij,m2,omega,
85 invmass,tt,lambda,error);
86 #else
87 fatal_error(0,"fshake called (Fortran routine from %s %d)",__FILE__,__LINE__);
88 #endif
91 /* LINCS */
93 void flincs(real *x,real *xp,int *nc,int *bla1,int *bla2,int *blnr,int *blbnb,real *bllen,real *blc,real *blcc,real *blm,int *nit,int *nrec,real *invmass,real *r,real *temp1,real *temp2,real *temp3,real *wangle,int *warn,real *lambda)
95 #ifdef USE_FORTRAN
96 F77_FUNC(forlincs,FORLINCS)(x,xp,nc,bla1,bla2,blnr,blbnb,bllen,blc,blcc,
97 blm,nit,nrec,invmass,r,temp1,temp2,temp3,wangle,warn,lambda);
98 #else
99 fatal_error(0,"flincs called (Fortran routine from %s %d)",__FILE__,__LINE__);
100 #endif