source: gradient.f@ bd2278d

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

Reformatting comments and continuation marks.

Fortran 90 and higher use ! to mark comments no matter where they are in the
code. The only valid continuation marker is &.
I also added the SMMP.kdevelop.filelist to the repository to make it easier
to use kdevelop.

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

  • Property mode set to 100644
File size: 1.3 KB
Line 
1! **************************************************************
2!
3! This file contains the subroutines: gradient
4!
5! Copyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann,
6! Shura Hayryan, Chin-Ku
7! Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann,
8! Jan H. Meinke, Sandipan Mohanty
9!
10! **************************************************************
11
12
13 subroutine gradient()
14
15! -------------------------------------------
16! PURPOSE: calculate energy & gradients
17!
18! CALLS: opeflx,opereg,opeshe,opesol,setvar
19! -------------------------------------------
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.