source: enyreg.f

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

Explicitly declare variables.

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

  • Property mode set to 100644
File size: 931 bytes
RevLine 
[e40e335]1! This file contains enyreg
2!
3! Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann,
4! Jan H. Meinke, Sandipan Mohanty
[bd2278d]5! *******************************
[e40e335]6 real*8 function enyreg(nml)
7
[bd2278d]8! ----------------------------------------------------
9!
10! PURPOSE: sum( ( R_i - R^ref_j )**2 )
11!
12! with: R_i - atom position i in SMMP structure
13! R^ref_j - corresponding atom j in PDB str.
14!
15! CALLS: none
16!
17! ----------------------------------------------------
[e40e335]18
19 include 'INCL.H'
20 include 'INCP.H'
21
22
[32289cd]23 double precision eny
24
25 integer i, nml, j
26
[e40e335]27 eny = 0.d0
28
29 do i=iatrs1(irsml1(nml)),iatrs2(irsml2(nml))
30
31 j=ixatp(i)
32 if (j.gt.0) then ! corresp. atom in ref. structure
33
34 eny = eny + (xat(i)-xatp(j))**2+(yat(i)-yatp(j))**2+
[bd2278d]35 & (zat(i)-zatp(j))**2
[e40e335]36 endif
37 enddo ! atoms
38
39 enyreg = eny
40
41 return
42 end
43
Note: See TracBrowser for help on using the repository browser.