source: enyreg.f@ e40e335

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

Initial import to BerliOS corresponding to 3.0.4

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

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