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

Comparing trunk/OOPSE-4/src/UseTheForce/DarkSide/eam.F90 (file contents):
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
Revision 2277 by chrisfen, Fri Aug 26 21:30:41 2005 UTC

# Line 44 | Line 44 | module eam
44    use force_globals
45    use status
46    use atype_module
47 <  use Vector_class
47 >  use vector_class
48   #ifdef IS_MPI
49    use mpiSimulation
50   #endif
# Line 117 | Line 117 | module eam
117       integer           :: currentAddition = 0
118  
119       type (EAMtype), pointer  :: EAMParams(:) => null()
120 +     integer, pointer         :: atidToEAMType(:) => null()
121    end type EAMTypeList
122  
123  
# Line 133 | Line 134 | module eam
134    public :: calc_eam_preforce_Frho
135    public :: clean_EAM
136    public :: destroyEAMTypes
137 +  public :: getEAMCut
138  
139   contains
140  
# Line 152 | Line 154 | contains
154      integer                                :: eam_ident
155      integer                                :: status
156  
157 <    integer                                :: nAtypes
157 >    integer                                :: nAtypes,nEAMTypes,myATID
158      integer                                :: maxVals
159      integer                                :: alloc_stat
160      integer                                :: current
# Line 167 | Line 169 | contains
169  
170      ! check to see if this is the first time into
171      if (.not.associated(EAMList%EAMParams)) then
172 <       call getMatchingElementList(atypes, "is_EAM", .true., nAtypes, MatchList)
173 <       EAMList%n_eam_types = nAtypes
174 <       allocate(EAMList%EAMParams(nAtypes))
172 >       call getMatchingElementList(atypes, "is_EAM", .true., nEAMtypes, MatchList)
173 >       EAMList%n_eam_types = nEAMtypes
174 >       allocate(EAMList%EAMParams(nEAMTypes))
175 >       nAtypes = getSize(atypes)
176 >       allocate(EAMList%atidToEAMType(nAtypes))
177      end if
178  
179      EAMList%currentAddition = EAMList%currentAddition + 1
180      current = EAMList%currentAddition
181  
182 +    myATID =  getFirstMatchingElement(atypes, "c_ident", eam_ident)
183 +    EAMList%atidToEAMType(myATID) = current
184  
185      call allocate_EAMType(eam_nrho,eam_nr,EAMList%EAMParams(current),stat=alloc_stat)
186      if (alloc_stat /= 0) then
# Line 182 | Line 188 | contains
188         return
189      end if
190  
191 <    ! this is a possible bug, we assume a correspondence between the vector atypes and
186 <    ! EAMAtypes
187 <
191 >  
192      EAMList%EAMParams(current)%eam_atype    = eam_ident
193      EAMList%EAMParams(current)%eam_lattice  = lattice_constant
194      EAMList%EAMParams(current)%eam_nrho     = eam_nrho
# Line 215 | Line 219 | contains
219      eamList%currentAddition = 0
220  
221    end subroutine destroyEAMtypes
222 +
223 +  function getEAMCut(atomID) result(cutValue)
224 +    integer, intent(in) :: atomID
225 +    real(kind=dp) :: cutValue
226 +    
227 +    cutValue = eamList%EAMParams(atomID)%eam_rcut
228 +
229 +  end function getEAMCut
230  
231    subroutine init_EAM_FF(status)
232      integer :: status

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines