ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/UseTheForce/DarkSide/charge.F90
(Generate patch)

Comparing branches/new_design/OOPSE-3.0/src/UseTheForce/DarkSide/charge.F90 (file contents):
Revision 1858, Thu Oct 28 22:34:02 2004 UTC vs.
Revision 1859 by tim, Mon Dec 6 23:29:20 2004 UTC

# Line 21 | Line 21 | module charge_charge
21    public :: getCharge
22    
23    type :: ChargeList
24 <     integer :: ident
24 >     integer :: c_ident
25       real(kind=DP) :: charge = 0.0_DP
26    end type ChargeList
27  
# Line 29 | Line 29 | contains
29  
30   contains
31  
32 <  subroutine newChargeType(ident, charge, status)
33 <    integer,intent(in) :: ident
32 >  subroutine newChargeType(c_ident, charge, status)
33 >    integer,intent(in) :: c_ident
34      real(kind=dp),intent(in) :: charge
35      integer,intent(out) :: status
36 <    integer :: nAtypes
36 >    integer :: nAtypes, myATID
37  
38      status = 0
39      
40 +    myATID = getFirstMatchingElement(atypes, "c_ident", c_ident)
41 +    
42      !! Be simple-minded and assume that we need a ChargeMap that
43      !! is the same size as the total number of atom types
44  
# Line 55 | Line 57 | contains
57        
58      end if
59  
60 <    if (ident .gt. size(ChargeMap)) then
60 >    if (myATID .gt. size(ChargeMap)) then
61         status = -1
62         return
63      endif
64      
65      ! set the values for ChargeMap for this atom type:
66  
67 <    ChargeMap(ident)%ident = ident
68 <    ChargeMap(ident)%charge = charge
67 >    ChargeMap(myATID)%c_ident = c_ident
68 >    ChargeMap(myATID)%charge = charge
69      
70    end subroutine newChargeType
71    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines