iweight=31
izsc=32
#endif
+ iliptranpar=60
+ itube=61
#if defined(WHAM_RUN) || defined(CLUSTER)
!
! setting the mpi variables for WHAM
! enddo !iblock
! do i=1,maxres
-! itype(i)=0
+! itype(i,1)=0
! itel(i)=0
! enddo
! Initialize the bridge arrays
! & " ivec_start",ivec_start," ivec_end",ivec_end
iset_start=loc_start+2
iset_end=loc_end+2
+ call int_bounds(nres,ilip_start,ilip_end)
+ ilip_start=ilip_start
+ ilip_end=ilip_end
+ call int_bounds(nres-1,itube_start,itube_end)
+ itube_start=itube_start
+ itube_end=itube_end
if (ndih_constr.eq.0) then
idihconstr_start=1
idihconstr_end=0
else
call int_bounds(ndih_constr,idihconstr_start,idihconstr_end)
endif
+ if (ntheta_constr.eq.0) then
+ ithetaconstr_start=1
+ ithetaconstr_end=0
+ else
+ call int_bounds &
+ (ntheta_constr,ithetaconstr_start,ithetaconstr_end)
+ endif
+
! nsumgrad=(nres-nnt)*(nres-nnt+1)/2
! nlen=nres-nnt+1
nsumgrad=(nres-nnt)*(nres-nnt+1)/2
iphi1_end=nres
idihconstr_start=1
idihconstr_end=ndih_constr
+ ithetaconstr_start=1
+ ithetaconstr_end=ntheta_constr
iphid_start=iphi_start
iphid_end=iphi_end-1
itau_start=4
iset_end=nres+1
iint_start=2
iint_end=nres-1
+ ilip_start=1
+ ilip_end=nres
+ itube_start=1
+ itube_end=nres
#endif
!el common /przechowalnia/
! deallocate(iturn3_start_all)
nside=0
do i=2,nres-1
#ifdef WHAM_RUN
- if (itype(i).ne.10) then
+ if (itype(i,1).ne.10) then
#else
- if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
+ if (itype(i,1).ne.10 .and. itype(i,1).ne.ntyp1) then
#endif
nside=nside+1
ialph(i,1)=nvar+nside
!-----------------------------------------------------------------------------
! rescode.f
!-----------------------------------------------------------------------------
- integer function rescode(iseq,nam,itype)
+ integer function rescode(iseq,nam,itype,molecule)
use io_base, only: ucase
! implicit real*8 (a-h,o-z)
! include 'COMMON.IOUNITS'
character(len=3) :: nam !,ucase
integer :: iseq,itype,i
-
+ integer :: molecule
+ print *,molecule,nam
+ if (molecule.eq.1) then
if (itype.eq.0) then
- do i=-ntyp1,ntyp1
- if (ucase(nam).eq.restyp(i)) then
+ do i=-ntyp1_molec(molecule),ntyp1_molec(molecule)
+ if (ucase(nam).eq.restyp(i,molecule)) then
rescode=i
return
endif
else
- do i=-ntyp1,ntyp1
+ do i=-ntyp1_molec(molecule),ntyp1_molec(molecule)
if (nam(1:1).eq.onelet(i)) then
rescode=i
return
enddo
endif
+ else if (molecule.eq.2) then
+ do i=1,ntyp1_molec(molecule)
+ if (nam(1:1).eq.restyp(i,molecule)) then
+ rescode=i
+ return
+ endif
+ enddo
+ else if (molecule.eq.3) then
+ write(iout,*) "SUGAR not yet implemented"
+ stop
+ else if (molecule.eq.4) then
+ write(iout,*) "Explicit LIPID not yet implemented"
+ stop
+ else if (molecule.eq.5) then
+ do i=1,ntyp1_molec(molecule)
+ print *,i,restyp(i,molecule)
+ if (ucase(nam).eq.restyp(i,molecule)) then
+ rescode=i
+ return
+ endif
+ enddo
+ else
+ write(iout,*) "molecule not defined"
+ endif
write (iout,10) iseq,nam
stop
10 format ('**** Error - residue',i4,' has an unresolved name ',a3)
end function rescode
+ integer function sugarcode(sugar,ires)
+ character sugar
+ integer ires
+ if (sugar.eq.'D') then
+ sugarcode=1
+ else if (sugar.eq.' ') then
+ sugarcode=2
+ else
+ write (iout,*) 'UNKNOWN sugar type for residue',ires,' ',sugar
+ stop
+ endif
+ return
+ end function sugarcode
+
!-----------------------------------------------------------------------------
! timing.F
!-----------------------------------------------------------------------------