source: gradient.f@ e40e335

Last change on this file since e40e335 was e40e335, checked in by baerbaer <baerbaer@…>, 16 years ago

Initial import to BerliOS corresponding to 3.0.4

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/smmp/trunk@1 26dc1dd8-5c4e-0410-9ffe-d298b4865968

  • Property mode set to 100644
File size: 1.3 KB
Line 
1C **************************************************************
2c
3c This file contains the subroutines: gradient
4c
5c Copyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann,
6c Shura Hayryan, Chin-Ku
7c Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann,
8c Jan H. Meinke, Sandipan Mohanty
9c
10c **************************************************************
11
12
13 subroutine gradient()
14
15c -------------------------------------------
16c PURPOSE: calculate energy & gradients
17c
18c CALLS: opeflx,opereg,opeshe,opesol,setvar
19c -------------------------------------------
20
21 include 'INCL.H'
22
23
24 esm = 0.d0
25
26 do i = 1,ntlml ! molecules
27
28 call setvar(i,vlvr) ! set variables & rebuild
29
30 if (flex) then
31 call opeflx(i)
32 else
33 call opeshe(i)
34 endif
35
36 esm = esm + eysm
37
38 if (itysol.lt.0) then
39
40 call opesol(i)
41 esm = esm + eysl
42
43 ivr1=ivrml1(i)
44 ivr2=ivr1+nvrml(i)-1
45
46 do j=ivr1,ivr2
47 gdeyvr(j) = gdeyvr(j)+gdeysl(j)
48 enddo
49
50 else if (itysol.eq.0) then
51
52 eysl = 0.d0
53 else
54
55 write(*,*) 'gradient> Set itysol < 0'
56 stop
57 endif
58
59 if (ireg.eq.1) call opereg(i)
60
61 enddo
62
63 eysm = esm
64
65 return
66 end
Note: See TracBrowser for help on using the repository browser.