58 |
|
|
59 |
DO j=jmin,jmax |
DO j=jmin,jmax |
60 |
DO i=imin,imax |
DO i=imin,imax |
61 |
DO k=1,nR |
DO k=1,Nr |
62 |
IF(hFacC(i,j,k,bi,bj) .gt. 0.0)THEN |
IF (hFacC(i,j,k,bi,bj) .GT. 0. _d 0) THEN |
63 |
|
|
64 |
C Ligand,FeL,Fe calculation |
C Ligand,FeL,Fe calculation |
65 |
|
|
66 |
lig=(-ligand_stab*fe (i,j,k,bi,bj)+ |
lig=(-ligand_stab*fe (i,j,k,bi,bj)+ |
67 |
& ligand_stab*ligand_tot-1 |
& ligand_stab*ligand_tot-1. _d 0 |
68 |
& +((ligand_stab*fe (i,j,k,bi,bj) |
& +((ligand_stab*fe (i,j,k,bi,bj) |
69 |
& -ligand_stab*ligand_tot+1)**2+4 |
& -ligand_stab*ligand_tot+1. _d 0)**2 |
70 |
& *ligand_stab*ligand_tot)**0.5)/(2*ligand_stab) |
& +4. _d 0*ligand_stab*ligand_tot)**0.5 _d 0 |
71 |
|
& )/(2. _d 0*ligand_stab) |
72 |
|
|
73 |
FeL = ligand_tot-lig |
FeL = ligand_tot-lig |
74 |
freefe(i,j,k,bi,bj) = fe (i,j,k,bi,bj)-FeL |
freefe(i,j,k,bi,bj) = fe (i,j,k,bi,bj)-FeL |
76 |
#ifdef AD_SAFE |
#ifdef AD_SAFE |
77 |
thx=freefe(i,j,k,bi,bj) |
thx=freefe(i,j,k,bi,bj) |
78 |
thy=freefemax |
thy=freefemax |
79 |
theps=1.d-8 |
theps=1. _d -8 |
80 |
freefe(i,j,k,bi,bj) = |
freefe(i,j,k,bi,bj) = |
81 |
& ( 1.d0 - tanh((thx-thy)/theps) ) * thx/2 + |
& ( 1. _d 0 - tanh((thx-thy)/theps) ) * thx/2.+ |
82 |
& ( 1.d0 + tanh((thx-thy)/theps) ) * thy/2 |
& ( 1. _d 0 + tanh((thx-thy)/theps) ) * thy/2. |
83 |
|
|
84 |
#else |
#else |
85 |
freefe(i,j,k,bi,bj) = min(freefe(i,j,k,bi,bj),freefemax) |
freefe(i,j,k,bi,bj) = min(freefe(i,j,k,bi,bj),freefemax) |
93 |
c |
c |
94 |
#endif |
#endif |
95 |
RETURN |
RETURN |
96 |
END |
END |