~ubuntu-branches/ubuntu/utopic/nwchem/utopic

« back to all changes in this revision

Viewing changes to src/tools/ga-5-2/global/examples/md_cluster/mdinit.F

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Daniel Leidert, Andreas Tille, Michael Banck
  • Date: 2013-07-04 12:14:55 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130704121455-5tvsx2qabor3nrui
Tags: 6.3-1
* New upstream release.
* Fixes anisotropic properties (Closes: #696361).
* New features include:
  + Multi-reference coupled cluster (MRCC) approaches
  + Hybrid DFT calculations with short-range HF 
  + New density-functionals including Minnesota (M08, M11) and HSE hybrid
    functionals
  + X-ray absorption spectroscopy (XAS) with TDDFT
  + Analytical gradients for the COSMO solvation model
  + Transition densities from TDDFT 
  + DFT+U and Electron-Transfer (ET) methods for plane wave calculations
  + Exploitation of space group symmetry in plane wave geometry optimizations
  + Local density of states (LDOS) collective variable added to Metadynamics
  + Various new XC functionals added for plane wave calculations, including
    hybrid and range-corrected ones
  + Electric field gradients with relativistic corrections 
  + Nudged Elastic Band optimization method
  + Updated basis sets and ECPs 

[ Daniel Leidert ]
* debian/watch: Fixed.

[ Andreas Tille ]
* debian/upstream: References

[ Michael Banck ]
* debian/upstream (Name): New field.
* debian/patches/02_makefile_flags.patch: Refreshed.
* debian/patches/06_statfs_kfreebsd.patch: Likewise.
* debian/patches/07_ga_target_force_linux.patch: Likewise.
* debian/patches/05_avoid_inline_assembler.patch: Removed, no longer needed.
* debian/patches/09_backported_6.1.1_fixes.patch: Likewise.
* debian/control (Build-Depends): Added gfortran-4.7 and gcc-4.7.
* debian/patches/10_force_gcc-4.7.patch: New patch, explicitly sets
  gfortran-4.7 and gcc-4.7, fixes test suite hang with gcc-4.8 (Closes:
  #701328, #713262).
* debian/testsuite: Added tests for COSMO analytical gradients and MRCC.
* debian/rules (MRCC_METHODS): New variable, required to enable MRCC methods.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#if HAVE_CONFIG_H
 
2
#   include "config.fh"
 
3
#endif
 
4
c
 
5
c                                   NOTICE
 
6
c
 
7
c   This software is being made available for internal testing and
 
8
c   evaluation purposes only. This software is a pre-release test version
 
9
c   which has not yet been authenticated and cleared for publication. Adherence
 
10
c   to this notice may be necessary for the author, Battelle Memorial
 
11
c   Institute, to successfully assert copyright in and commercialize this
 
12
c   software. This software is not intended for duplication or distribution
 
13
c   to third parties without the permission of the Manager of Software
 
14
c   Products at Pacific Northwest Laboratory, Richland, Washington,  99352.
 
15
c
 
16
      subroutine mdinit
 
17
#include "common.fh"
 
18
c
 
19
      double precision six,twelve,ac
 
20
      integer i,j
 
21
c
 
22
c  turn of all cluster related functions
 
23
c
 
24
      nocluster = .false.
 
25
c
 
26
c    This subroutine sets up the potentials, assigns atomic masses
 
27
c    and finishes initializing the calculation
 
28
c
 
29
      six = 6.0d00
 
30
      twelve = 12.0d00
 
31
c
 
32
c      initialize timing and energy statistics arrays
 
33
c
 
34
      do i = 1, MAXNRG
 
35
        nrg(i) = 0.0d00
 
36
        anrg(i) = 0.0d00
 
37
        anrg2(i) = 0.0d00
 
38
      end do
 
39
      nrgcnt = 0
 
40
      nrg2ct = 0
 
41
      do i = 1, MAXTIM
 
42
        tmstat(i) = 0.0d00
 
43
      end do
 
44
      failcount = 0
 
45
c
 
46
c     assign atom masses
 
47
c
 
48
      do i = 1, antot
 
49
        mass(i) = amass(at(i))
 
50
      end do
 
51
c
 
52
c   Initialize cutoffs for  potential arrays.
 
53
c
 
54
      rcmax = 0.0d00
 
55
      do i = 1, atnum
 
56
        do j = 1, atnum
 
57
          ac = acut(i,j)
 
58
          if (ac.gt.rcmax) rcmax = ac
 
59
          rcorr(i,j) = e12(i,j) / ac**12
 
60
          dcorr(i,j) = -e6(i,j) / ac**6
 
61
          if (icut.eq.1) then
 
62
            frcorr(i,j) = - twelve * e12(i,j) / ac**13
 
63
            fdcorr(i,j) = six * e6(i,j) / ac**7
 
64
          else
 
65
            frcorr(i,j) = 0.0d00
 
66
            fdcorr(i,j) = 0.0d00
 
67
          endif
 
68
        end do
 
69
      end do
 
70
      rcmax = rcmax + 1.0d00
 
71
c
 
72
c   calculate total number of degrees of freedom
 
73
c
 
74
      nrg(1) = dble(3*atot-3)
 
75
      nrg(2) = nrg(1) / 2.0
 
76
c
 
77
c   Convert algorithm parameters into system units
 
78
c
 
79
      istep = 0
 
80
      tavg = 0.0d00
 
81
      itavg = 0
 
82
      tmstrt = 0
 
83
      t_done = 0.0d00
 
84
      t_rmndr = tau
 
85
c
 
86
c   Initialize parameters for mass and temperature degrees of freedom
 
87
c
 
88
      vol1 = xbox * ybox * zbox
 
89
      alen1(1) = xbox
 
90
      alen1(2) = ybox
 
91
      alen1(3) = zbox
 
92
      vol2 = 0.0d00
 
93
      vol3 = 0.0d00
 
94
      do j = 1, 3
 
95
        alen2(j) = 0.0d00
 
96
        alen3(j) = 0.0d00
 
97
      end do
 
98
      scal1 = 1.0d00
 
99
      scal2 = 0.0d00
 
100
      scal3 = 0.0d00
 
101
c
 
102
c   Initialize bins accumulating r_cluster values
 
103
c
 
104
      do j = 1, 10
 
105
        do i = 1, mcbins
 
106
          r_distr(i,j) = 0
 
107
        end do
 
108
      end do
 
109
c
 
110
c   Initialize absolute coordinates
 
111
c
 
112
      call cluster_center
 
113
      call update
 
114
      call force
 
115
      mbflg = .true.
 
116
      call cluster_com
 
117
c
 
118
      tavg = 0.0d00
 
119
      do j = 1, 3
 
120
        do i = 1, antot
 
121
          ra(i,j,7) = ra(i,j,8)
 
122
          ra(i,j,3) = ra(i,j,4)/mass(i)
 
123
        end do
 
124
      end do
 
125
c
 
126
      return
 
127
      end