source: setvar.f

Last change on this file was cb47b9c, checked in by baerbaer <baerbaer@…>, 14 years ago

Explicitly declare variables.

All variables should be declared so that we can remove the implicit statements
from the beginning of the INCL.H file.

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

  • Property mode set to 100644
File size: 1.9 KB
RevLine 
[bd2278d]1!**************************************************************
2!
3! This file contains the subroutines: setvar
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! **************************************************************
[e40e335]11
12
13 subroutine setvar(nml,vlvrx)
14
[bd2278d]15! ..............................................................
16! PURPOSE: Reset variables in molecule 'nml' to new values given
17! in 'vlvrx' and rebuild molecule
18!
19! ! assure constant PHASE angles for branches from same atom
20!
21! CALLS: bldmol,difang
22! ....................................................
[e40e335]23
24 include 'INCL.H'
[cb47b9c]25Cf2py intent(in) nml, vlvrx
26 integer nml
27 double precision vlvrx
[e40e335]28 dimension vlvrx(mxvr)
[cb47b9c]29
30! functions
31 double precision difang
32
33 integer i, iat,ity, iow, j, jat, i1vr
34 double precision ba, to, tsh
35
[e40e335]36
37 i1vr=ivrml1(nml)
38 do i=i1vr,i1vr+nvrml(nml)-1 ! __________________ Variables of 'nml'
39
40 iat=iatvr(i)
41 ity=ityvr(i)
42
43 if (ity.eq.3) then ! torsion (assure phase=const.)
44
45 tsh=difang(toat(iat),vlvrx(i))
46 iow=iowat(iat) ! (cannot be 1st atom of 'nml')
47
48 do j=1,nbdat(iow)
49 jat=ibdat(j,iow)
50 if (iowat(jat).eq.iow) then ! excl. ring
51 to=toat(jat)+tsh
52 if (abs(to).gt.pi) to=to-sign(pi2,to)
53 toat(jat)=to
54 sntoat(jat)=sin(to)
55 cstoat(jat)=cos(to)
56 endif
57 enddo
58
59 elseif (ity.eq.2) then ! valence angle
60 ba=vlvrx(i)
61 baat(iat)=ba
62 snbaat(iat)=sin(ba)
63 csbaat(iat)=cos(ba)
64 elseif (ity.eq.1) then ! valence length
65 blat(iat)=vlvrx(i)
66 endif
67
68 enddo ! ... Variables
69
70 call bldmol(nml)
71
72 return
73 end
74
Note: See TracBrowser for help on using the repository browser.