aboutsummaryrefslogtreecommitdiff
path: root/Sunder.f
blob: 4492a40beedebebcc8e4a0a8e88ad0bfb140ad57 (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
24

      subroutine sunder (amol,i1,i2)
c******************************************************************************
c     This routine breaks up molecule amol into leftmost atom i1 and        
c     the rest of the molecule i2                                           
c******************************************************************************

      implicit real*8 (a-h,o-z)
      dimension itest(5)          
      data itest/100000000,1000000,10000,100,1/ 

      im = nint(amol)

      do i=1,5                              
         i1 = im/itest(i)                       
         if (i1 == 0) cycle
         i2 = im - i1*itest(i)                
         exit
      enddo

      return                       

      end