aboutsummaryrefslogtreecommitdiff
path: root/Discov.f
blob: f6baeb8eb9ac80d5d48d1bdd428183d0f7bf4608 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

      subroutine discov(amol,i1,i2)
c******************************************************************************
c     This routine returns i2 = the number of times atom i1 appears in      
c     molecule amol                                                         
c******************************************************************************

      implicit real*8 (a-h,o-z)
      integer itest(5)                                                
      data itest /100000000, 1000000, 10000, 100, 1/
      i2 = 0                                                            
      im = amol                                                         
      do i=1,5                                                        
         i3 = im/itest(i)                                              
         if(i3 == i1) i2 = i2 + 1
         im = im - i3*itest(i)                                         
      enddo
      return                                                            


      end