aboutsummaryrefslogtreecommitdiff
path: root/Discov.f
diff options
context:
space:
mode:
Diffstat (limited to 'Discov.f')
-rwxr-xr-xDiscov.f23
1 files changed, 23 insertions, 0 deletions
diff --git a/Discov.f b/Discov.f
new file mode 100755
index 0000000..16e426d
--- /dev/null
+++ b/Discov.f
@@ -0,0 +1,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 .eq. i1) i2 = i2 + 1
+ im = im - i3*itest(i)
+ enddo
+ return
+
+
+ end
+
+