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
RevLine 
[bd2278d]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! **************************************************************
[e40e335]11
12
13 subroutine helix(nhel,mhel,nbet,mbet)
[bd2278d]14!---------------------------------------------------------------
15!
16! PURPOSE: simple identification of secondary structure content
17!
18! CALLS: none
19!
20! ---------------------------------------------------------------
[e40e335]21 include 'INCL.H'
22
[bd2278d]23!f2py intent(out) nhel
24!f2py intent(out) mhel
25!f2py intent(out) nbet
26!f2py intent(out) mbet
[e40e335]27
28 logical lhel,lbet
[6650a56]29 double precision hlim, philim, psilim, hlim2, philim2, psilim2
30 double precision xphi, xpsi
31
32 integer nhel, mhel, nbet, mbet, i, iv
[e40e335]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
[bd2278d]48! Helicity
[e40e335]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
[bd2278d]58! Sheetness
[e40e335]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.