ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/UseTheForce/DarkSide/atype.F90
(Generate patch)

Comparing trunk/OOPSE-4/src/UseTheForce/DarkSide/atype.F90 (file contents):
Revision 1609 by gezelter, Wed Oct 20 04:12:01 2004 UTC vs.
Revision 1633 by gezelter, Fri Oct 22 20:22:48 2004 UTC

# Line 1 | Line 1
1   !! module defines atypes available to simulation
2  
3   module atype_module
4 <  use definitions, only: dp
4 >
5    use vector_class
6    implicit none
7    private
8 <  
8 >
9    type (Vector), pointer, public :: atypes => null()
10 <  
11 <  
10 >
11    public :: new_atype
12    
13   contains
14    
15 <  subroutine new_atype(c_ident, is_LJ, is_Sticky, is_DP, is_GB, &
16 <       is_EAM, is_Charge, lj_epsilon, lj_sigma, charge, dipole_moment, &
17 <       status)
15 >  subroutine new_atype(ident, is_Directional, is_LennardJones, &
16 >       is_Electrostatic, is_Charge, is_Dipole, is_Sticky, is_GayBerne, &
17 >       is_EAM, is_Shape, is_FLARB, status)
18      
19 <    real( kind = dp ), intent(in) :: lj_epsilon
20 <    real( kind = dp ), intent(in) :: lj_sigma
21 <    real( kind = dp ), intent(in) :: dipole_moment
22 <    real( kind = dp ), intent(in) :: charge
19 >    integer,intent(in) :: ident
20 >    logical,intent(in) :: is_Directional, is_LennardJones, is_Electrostatic
21 >    logical,intent(in) :: is_Charge, is_Dipole, is_Sticky, is_GayBerne, is_EAM
22 >    logical,intent(in) :: is_Shape, is_FLARB
23 >    integer,intent(out) :: status
24  
25    integer, intent(in)  :: c_ident
26    integer, intent(out) :: status
27    integer, intent(in)  :: is_Sticky
28    integer, intent(in)  :: is_DP
29    integer, intent(in)  :: is_GB
30    integer, intent(in)  :: is_EAM
31    integer, intent(in)  :: is_LJ
32    integer, intent(in)  :: is_Charge
25      integer :: me
26 <    logical :: l_is_LJ, l_is_DP, l_is_Sticky, l_is_GB
35 <    logical :: l_is_EAM, l_is_Charge
36 <    integer :: FFcheckStatus
26 >        
27      status = 0
28 <
28 >    
29      if (.not. associated(atypes)) then
30         !! There are 16 properties to worry about for now.  
31         !! Fix this if needed for more atomic properties
# Line 45 | Line 35 | contains
35            return
36         endif
37      endif
38 <
38 >    
39      me = addElement(atypes)
40 <    call setElementProperty(atypes, me, "c_ident", c_ident)
41 <
42 <    l_is_LJ = (is_LJ .ne. 0)
43 <    l_is_DP = (is_DP .ne. 0)
44 <    l_is_Sticky = (is_Sticky .ne. 0)
45 <    l_is_GB = (is_GB .ne. 0)
46 <    l_is_EAM = (is_EAM .ne. 0)
47 <    l_is_Charge = (is_Charge .ne. 0)
48 <
49 <    call setElementProperty(atypes, me, "is_LJ", l_is_LJ)
50 <    call setElementProperty(atypes, me, "is_DP", l_is_DP)
51 <    call setElementProperty(atypes, me, "is_Sticky", l_is_Sticky)
52 <    call setElementProperty(atypes, me, "is_GB", l_is_GB)
63 <    call setElementProperty(atypes, me, "is_EAM", l_is_EAM)
64 <    call setElementProperty(atypes, me, "is_Charge", l_is_Charge)
65 <
66 <    if (l_is_LJ) then
67 <       call setElementProperty(atypes, me, "lj_sigma", lj_sigma)
68 <       call setElementProperty(atypes, me, "lj_epsilon", lj_epsilon)
69 <    endif
70 <    if (l_is_DP) then
71 <       call setElementProperty(atypes, me, "dipole_moment", dipole_moment)
72 <    endif
73 <    if (l_is_Charge) then
74 <       call setElementProperty(atypes, me, "charge", charge)
75 <    endif
76 <
40 >    call setElementProperty(atypes, me, "c_ident", ident)
41 >    
42 >    call setElementProperty(atypes, me, "is_Directional", is_Directional)
43 >    call setElementProperty(atypes, me, "is_LennardJones", is_LennardJones)
44 >    call setElementProperty(atypes, me, "is_Electrostatic", is_Electrostatic)
45 >    call setElementProperty(atypes, me, "is_Charge", is_Charge)
46 >    call setElementProperty(atypes, me, "is_Dipole", is_Dipole)
47 >    call setElementProperty(atypes, me, "is_Sticky", is_Sticky)
48 >    call setElementProperty(atypes, me, "is_GayBerne", is_GayBerne)
49 >    call setElementProperty(atypes, me, "is_EAM", is_EAM)
50 >    call setElementProperty(atypes, me, "is_Shape", is_Shape)
51 >    call setElementProperty(atypes, me, "is_FLARB", is_FLARB)
52 >    
53    end subroutine new_atype
54 <
54 >  
55   end module atype_module
56  
57 <  ! provide interface for c calls....
57 > ! provide interface for c calls....
58  
59 < subroutine makeatype(c_ident, is_LJ, is_Sticky, is_DP, is_GB, &
60 <       is_EAM, is_Charge, lj_epsilon, lj_sigma, charge, dipole_moment, &
61 <       status)
86 <    use definitions, only: dp  
87 <    use atype_module, ONLY: new_atype
88 <    
89 <    real( kind = dp ), intent(in) :: lj_epsilon
90 <    real( kind = dp ), intent(in) :: lj_sigma
91 <    real( kind = dp ), intent(in) :: dipole_moment
92 <    real( kind = dp ), intent(in) :: charge
59 > subroutine makeatype(atp, status)
60 >  
61 >  use atype_module, ONLY: new_atype
62  
63 <    integer, intent(in)  :: c_ident
64 <    integer, intent(out) :: status
96 <    integer, intent(in)  :: is_Sticky
97 <    integer, intent(in)  :: is_DP
98 <    integer, intent(in)  :: is_GB
99 <    integer, intent(in)  :: is_EAM
100 <    integer, intent(in)  :: is_LJ
101 <    integer, intent(in)  :: is_Charge
63 > #define __FORTRAN90
64 > #include "types/AtomTypeProperties.h"    
65  
66 <    call new_atype(c_ident, is_LJ, is_Sticky, is_DP, is_GB, &
67 <       is_EAM, is_Charge, lj_epsilon, lj_sigma, charge, dipole_moment, &
68 <       status)
69 <      
66 >  type(AtomTypeProperties), intent(in) :: atp
67 >  integer, intent(inout) :: status
68 >
69 >  integer :: ident
70 >  logical :: is_Directional, is_LennardJones, is_Electrostatic
71 >  logical :: is_Charge, is_Dipole, is_Sticky, is_GayBerne, is_EAM
72 >  logical :: is_Shape, is_FLARB
73 >  
74 >  ident = atp%ident
75 >  is_Directional = (atp%is_Directional .ne. 0)
76 >  is_LennardJones = (atp%is_LennardJones .ne. 0)
77 >  is_Electrostatic = (atp%is_Electrostatic .ne. 0)
78 >  is_Charge = (atp%is_Charge .ne. 0)
79 >  is_Dipole = (atp%is_Dipole .ne. 0)
80 >  is_Sticky = (atp%is_Sticky .ne. 0)
81 >  is_GayBerne = (atp%is_GayBerne .ne. 0)
82 >  is_EAM = (atp%is_EAM .ne. 0)
83 >  is_Shape = (atp%is_Shape .ne. 0)
84 >  is_FLARB = (atp%is_FLARB .ne. 0)
85 >
86 >  call new_atype(ident, is_Directional, is_LennardJones, is_Electrostatic, &
87 >       is_Charge, is_Dipole, is_Sticky, is_GayBerne, is_EAM, is_Shape, &
88 >       is_FLARB, status)
89 >  
90   end subroutine

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines