Changeset b477fe8 for energy.f


Ignore:
Timestamp:
09/05/08 11:49:41 (16 years ago)
Author:
baerbaer <baerbaer@…>
Branches:
master
Children:
2ebb8b6
Parents:
078aff3
Message:

Fixed handling of nmol = 0 in esolan.

The function energy calls esolan(0) to get the solvent energy if itysol > 0.
Esolan should calculate the solvent energy using all atoms in the system in
this case. I added an if statement at the beginning of esolan() that takes
care of this now. Further rewrote energy() so that it assigns the result
returned by esolan() to teysl, which in turn will be assigned to eysl in the
end.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • energy.f

    r078aff3 rb477fe8  
    7272            esm=esm+enysol(0)
    7373            teysl = teysl+eysl
    74       elseif (itysol.lt.0) then
    75       esm=esm+esolan(0)
     74         else if (itysol.lt.0) then
     75            eysl = esolan(0)
     76            teysl = teysl + eysl
     77            esm = esm + eysl
    7678         else
    7779            eysl=0.d0
     
    143145            esm=esm+enysol(nml)
    144146      elseif (itysol.lt.0) then
    145       esm=esm+esolan(nml)
     147            esm=esm+esolan(nml)
    146148         else
    147149            eysl=0.d0
Note: See TracChangeset for help on using the changeset viewer.