source: helix.f

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

Explicitly declare variables.

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

  • Property mode set to 100644
File size: 2.1 KB
Line 
1! **************************************************************
2!
3! This file contains the subroutines: helix
4!
5! Copyright 2003 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 helix(nhel,mhel,nbet,mbet)
14!---------------------------------------------------------------
15!
16! PURPOSE: simple identification of secondary structure content
17!
18! CALLS: none
19!
20! ---------------------------------------------------------------
21 include 'INCL.H'
22
23!f2py intent(out) nhel
24!f2py intent(out) mhel
25!f2py intent(out) nbet
26!f2py intent(out) mbet
27
28 logical lhel,lbet
29 double precision hlim, philim, psilim, hlim2, philim2, psilim2
30 double precision xphi, xpsi
31
32 integer nhel, mhel, nbet, mbet, i, iv
33
34 parameter(hlim=30.0d0,philim=-70.0d0,psilim=-37.0d0)
35 parameter(hlim2=30.0d0,philim2=-150.0d0,psilim2=150.0d0)
36
37 nhel = 0 ! Number of helical residues
38 mhel = 0 ! Number of helical segments
39 nbet = 0 ! Number of sheet-like residues
40 mbet = 0 ! Number of sheet-like segments
41 lhel = .false.
42 lbet = .false.
43 do i=1,nvr
44 iv=idvr(i)
45 if(nmvr(iv).eq.'phi') then
46 xphi = vlvr(iv)*crd
47 xpsi = vlvr(idvr(i+1))*crd
48! Helicity
49 if(abs(xphi-philim).le.hlim) then
50 lbet=.false.
51 if(abs(xpsi-psilim).le.hlim) then
52 nhel = nhel+1
53 if(.not.lhel) mhel = mhel + 1
54 lhel = .true.
55 else
56 lhel = .false.
57 end if
58! Sheetness
59 else if(abs(xphi-philim2).le.hlim2) then
60 lhel = .false.
61 if(abs(xpsi-psilim2).le.hlim2) then
62 nbet = nbet + 1
63 if(.not.lbet) mbet = mbet + 1
64 lbet = .true.
65 else
66 lbet = .false.
67 end if
68 else
69 lhel=.false.
70 lbet=.false.
71 end if
72 end if
73 end do
74
75 return
76 end
77
Note: See TracBrowser for help on using the repository browser.