1 |
#ifdef __C |
2 |
#ifndef __FSIMULATION |
3 |
#define __FSIMULATION |
4 |
/** This header provides dual access for the simulation structure between fortran and C |
5 |
for the simtype structure. NOTE: Sequence of struct components must match between |
6 |
C and fortran and in general be packed double,int,char. |
7 |
*/ |
8 |
typedef struct{ |
9 |
double box[3]; |
10 |
double rlist; |
11 |
double rcut; |
12 |
double rlistsq; |
13 |
double rcutsq; |
14 |
double rcut6; |
15 |
int natoms; |
16 |
int usePBC; |
17 |
char ensemble[100]; |
18 |
char mixingRule[100]; |
19 |
} simtype; |
20 |
#endif //__FSIMULATION |
21 |
#endif //__C |
22 |
|
23 |
#ifdef __FORTRAN90 |
24 |
|
25 |
integer, parameter :: string_len = 100 |
26 |
|
27 |
type, public :: simtype |
28 |
PRIVATE |
29 |
SEQUENCE |
30 |
!! Periodic Box |
31 |
real ( kind = dp ), dimension(3) :: box |
32 |
!! List Cutoff |
33 |
real ( kind = dp ) :: rlist = 0.0_dp |
34 |
!! Radial cutoff |
35 |
real ( kind = dp ) :: rcut = 0.0_dp |
36 |
!! List cutoff squared |
37 |
real ( kind = dp ) :: rlistsq = 0.0_dp |
38 |
!! Radial Cutoff squared |
39 |
real ( kind = dp ) :: rcutsq = 0.0_dp |
40 |
!! Radial Cutoff^6 |
41 |
real ( kind = dp ) :: rcut6 = 0.0_dp |
42 |
!! Number of particles on this processor |
43 |
integer :: nLRparticles |
44 |
!! Periodic Boundry Conditions |
45 |
logical :: use_pbc |
46 |
!! Ensemble must be defined inside of C |
47 |
character(len = string_len) :: ensemble |
48 |
!! Mixing Rules must be defined inside of C |
49 |
character(len = string_len) :: mixingRule |
50 |
end type simtype |
51 |
#endif |