character(len=1) :: toronelet(-2:2) = (/"p","a","G","A","P"/)
logical :: lprint,LaTeX
real(kind=8),dimension(3,3,maxlob) :: blower !(3,3,maxlob)
- real(kind=8),dimension(13) :: b
+ real(kind=8),dimension(13) :: buse
character(len=3) :: lancuch !,ucase
!el local variables
integer :: m,n,l,i,j,k,iblock,lll,llll,ll,nlobi,mm
allocate(nbondterm(ntyp)) !(ntyp)
allocate(vbldsc0(maxbondterm,ntyp)) !(maxbondterm,ntyp)
allocate(aksc(maxbondterm,ntyp)) !(maxbondterm,ntyp)
- allocate(msc(ntyp+1,5)) !(ntyp+1)
- allocate(isc(ntyp+1,5)) !(ntyp+1)
- allocate(restok(ntyp+1,5)) !(ntyp+1)
allocate(abond0(maxbondterm,ntyp)) !(maxbondterm,ntyp)
allocate(long_r_sidechain(ntyp))
allocate(short_r_sidechain(ntyp))
dsc_inv(:)=0.0d0
#ifdef CRYST_BOND
+ allocate(msc(ntyp+1)) !(ntyp+1)
+ allocate(isc(ntyp+1)) !(ntyp+1)
+ allocate(restok(ntyp+1)) !(ntyp+1)
+
read (ibond,*) vbldp0,akp,mp,ip,pstok
do i=1,ntyp
nbondterm(i)=1
endif
enddo
#else
+ allocate(msc(ntyp+1,5)) !(ntyp+1)
+ allocate(isc(ntyp+1,5)) !(ntyp+1)
+ allocate(restok(ntyp+1,5)) !(ntyp+1)
+
read (ibond,*) junk,vbldp0,vbldpDUM,akp,rjunk,mp(1),ip(1),pstok(1)
do i=1,ntyp_molec(1)
read (ibond,*) nbondterm(i),(vbldsc0(j,i),aksc(j,i),abond0(j,i),&
do i=0,nloctyp-1
read (ifourier,*,end=115,err=115)
- read (ifourier,*,end=115,err=115) (b(ii),ii=1,13)
+ read (ifourier,*,end=115,err=115) (buse(ii),ii=1,13)
if (lprint) then
write (iout,*) 'Type',i
- write (iout,'(a,i2,a,f10.5)') ('b(',ii,')=',b(ii),ii=1,13)
+ write (iout,'(a,i2,a,f10.5)') ('buse(',ii,')=',buse(ii),ii=1,13)
endif
- B1(1,i) = b(3)
- B1(2,i) = b(5)
- B1(1,-i) = b(3)
- B1(2,-i) = -b(5)
-! b1(1,i)=0.0d0
-! b1(2,i)=0.0d0
- B1tilde(1,i) = b(3)
- B1tilde(2,i) =-b(5)
- B1tilde(1,-i) =-b(3)
- B1tilde(2,-i) =b(5)
-! b1tilde(1,i)=0.0d0
-! b1tilde(2,i)=0.0d0
- B2(1,i) = b(2)
- B2(2,i) = b(4)
- B2(1,-i) =b(2)
- B2(2,-i) =-b(4)
-
-! b2(1,i)=0.0d0
-! b2(2,i)=0.0d0
- CC(1,1,i)= b(7)
- CC(2,2,i)=-b(7)
- CC(2,1,i)= b(9)
- CC(1,2,i)= b(9)
- CC(1,1,-i)= b(7)
- CC(2,2,-i)=-b(7)
- CC(2,1,-i)=-b(9)
- CC(1,2,-i)=-b(9)
+ B1(1,i) = buse(3)
+ B1(2,i) = buse(5)
+ B1(1,-i) = buse(3)
+ B1(2,-i) = -buse(5)
+! buse1(1,i)=0.0d0
+! buse1(2,i)=0.0d0
+ B1tilde(1,i) = buse(3)
+ B1tilde(2,i) =-buse(5)
+ B1tilde(1,-i) =-buse(3)
+ B1tilde(2,-i) =buse(5)
+! buse1tilde(1,i)=0.0d0
+! buse1tilde(2,i)=0.0d0
+ B2(1,i) = buse(2)
+ B2(2,i) = buse(4)
+ B2(1,-i) =buse(2)
+ B2(2,-i) =-buse(4)
+
+! buse2(1,i)=0.0d0
+! buse2(2,i)=0.0d0
+ CC(1,1,i)= buse(7)
+ CC(2,2,i)=-buse(7)
+ CC(2,1,i)= buse(9)
+ CC(1,2,i)= buse(9)
+ CC(1,1,-i)= buse(7)
+ CC(2,2,-i)=-buse(7)
+ CC(2,1,-i)=-buse(9)
+ CC(1,2,-i)=-buse(9)
! CC(1,1,i)=0.0d0
! CC(2,2,i)=0.0d0
! CC(2,1,i)=0.0d0
! CC(1,2,i)=0.0d0
- Ctilde(1,1,i)=b(7)
- Ctilde(1,2,i)=b(9)
- Ctilde(2,1,i)=-b(9)
- Ctilde(2,2,i)=b(7)
- Ctilde(1,1,-i)=b(7)
- Ctilde(1,2,-i)=-b(9)
- Ctilde(2,1,-i)=b(9)
- Ctilde(2,2,-i)=b(7)
+ Ctilde(1,1,i)=buse(7)
+ Ctilde(1,2,i)=buse(9)
+ Ctilde(2,1,i)=-buse(9)
+ Ctilde(2,2,i)=buse(7)
+ Ctilde(1,1,-i)=buse(7)
+ Ctilde(1,2,-i)=-buse(9)
+ Ctilde(2,1,-i)=buse(9)
+ Ctilde(2,2,-i)=buse(7)
! Ctilde(1,1,i)=0.0d0
! Ctilde(1,2,i)=0.0d0
! Ctilde(2,1,i)=0.0d0
! Ctilde(2,2,i)=0.0d0
- DD(1,1,i)= b(6)
- DD(2,2,i)=-b(6)
- DD(2,1,i)= b(8)
- DD(1,2,i)= b(8)
- DD(1,1,-i)= b(6)
- DD(2,2,-i)=-b(6)
- DD(2,1,-i)=-b(8)
- DD(1,2,-i)=-b(8)
+ DD(1,1,i)= buse(6)
+ DD(2,2,i)=-buse(6)
+ DD(2,1,i)= buse(8)
+ DD(1,2,i)= buse(8)
+ DD(1,1,-i)= buse(6)
+ DD(2,2,-i)=-buse(6)
+ DD(2,1,-i)=-buse(8)
+ DD(1,2,-i)=-buse(8)
! DD(1,1,i)=0.0d0
! DD(2,2,i)=0.0d0
! DD(2,1,i)=0.0d0
! DD(1,2,i)=0.0d0
- Dtilde(1,1,i)=b(6)
- Dtilde(1,2,i)=b(8)
- Dtilde(2,1,i)=-b(8)
- Dtilde(2,2,i)=b(6)
- Dtilde(1,1,-i)=b(6)
- Dtilde(1,2,-i)=-b(8)
- Dtilde(2,1,-i)=b(8)
- Dtilde(2,2,-i)=b(6)
+ Dtilde(1,1,i)=buse(6)
+ Dtilde(1,2,i)=buse(8)
+ Dtilde(2,1,i)=-buse(8)
+ Dtilde(2,2,i)=buse(6)
+ Dtilde(1,1,-i)=buse(6)
+ Dtilde(1,2,-i)=-buse(8)
+ Dtilde(2,1,-i)=buse(8)
+ Dtilde(2,2,-i)=buse(6)
! Dtilde(1,1,i)=0.0d0
! Dtilde(1,2,i)=0.0d0
! Dtilde(2,1,i)=0.0d0
! Dtilde(2,2,i)=0.0d0
- EE(1,1,i)= b(10)+b(11)
- EE(2,2,i)=-b(10)+b(11)
- EE(2,1,i)= b(12)-b(13)
- EE(1,2,i)= b(12)+b(13)
- EE(1,1,-i)= b(10)+b(11)
- EE(2,2,-i)=-b(10)+b(11)
- EE(2,1,-i)=-b(12)+b(13)
- EE(1,2,-i)=-b(12)-b(13)
+ EE(1,1,i)= buse(10)+buse(11)
+ EE(2,2,i)=-buse(10)+buse(11)
+ EE(2,1,i)= buse(12)-buse(13)
+ EE(1,2,i)= buse(12)+buse(13)
+ EE(1,1,-i)= buse(10)+buse(11)
+ EE(2,2,-i)=-buse(10)+buse(11)
+ EE(2,1,-i)=-buse(12)+buse(13)
+ EE(1,2,-i)=-buse(12)-buse(13)
! ee(1,1,i)=1.0d0
! ee(2,2,i)=1.0d0
allocate(dhead_scphoi(ntyp_molec(1)))
allocate(rborn_scphoi(ntyp_molec(1)))
allocate(rborn_scphoj(ntyp_molec(1)))
+ allocate(alphi_scpho(ntyp_molec(1)))
+
! j=1
do j=1,ntyp_molec(1) ! without U then we will take T for U
read(isidep_scpho,*) &
(wqdip_scpho(k,j),k=1,2),wqq_scpho(j),dhead_scphoi(j)
read(isidep_scpho,*) &
- epsintab_scpho(j),alphapol_scpho(j),rborn_scphoi(j),rborn_scphoj(j)
+ epsintab_scpho(j),alphapol_scpho(j),rborn_scphoi(j),rborn_scphoj(j), &
+ alphi_scpho(j)
END DO
allocate(aa_scpho(ntyp_molec(1)))
! write (2,*) "UNRES_PDB",unres_pdb
ires=0
ires_old=0
+#ifdef WHAM_RUN
+ do i=1,nres
+ do j=1,5
+ itype(i,j)=0
+ enddo
+ enddo
+#endif
nres=0
iii=0
lsecondary=.false.
nhfrag=0
nbfrag=0
+ do j=1,5
+ nres_molec(j)=0
+ enddo
+
+
!-----------------------------
allocate(hfrag(2,maxres/3)) !(2,maxres/3)
allocate(bfrag(4,maxres/3)) !(4,maxres/3)
-
+ if(.not. allocated(istype)) allocate(istype(maxres))
do i=1,100000
read (ipdbin,'(a80)',end=10) card
! write (iout,'(a)') card
! nres_molec(molecule)=nres_molec(molecule)+1
else
molecule=2
- itype(ires,molecule)=rescode(ires,res(2:4),0,molecule)
+ itype(ires,molecule)=rescode(ires,res(2:3),0,molecule)
! nres_molec(molecule)=nres_molec(molecule)+1
read (card(19:19),'(a1)') sugar
isugar=sugarcode(sugar,ires)
! print *,ires,istype(ires)
endif
if (unres_pdb) then
+ molecule=2
+! print *,"nres_molec(molecule)",nres_molec(molecule),ires
read(card(31:54),'(3f8.3)') (c(j,ires),j=1,3)
+ nres_molec(molecule)=nres_molec(molecule)+1
+ print *,"nres_molec(molecule)",nres_molec(molecule),ires
+
else
iii=iii+1
read(card(31:54),'(3f8.3)') (sccor(j,iii),j=1,3)
endif
+ else if ((atom.eq."C1'").and.unres_pdb) then
+ iii=iii+1
+ read(card(31:54),'(3f8.3)') (sccor(j,iii),j=1,3)
! write (*,*) card(23:27),ires,itype(ires,1)
else if (atom.ne.'O'.and.atom(1:1).ne.'H' .and. &
atom.ne.'N' .and. atom.ne.'C' .and. &
molecule=5
nres_molec(molecule)=nres_molec(molecule)+1
print *,"HERE",nres_molec(molecule)
- itype(ires,molecule)=rescode(ires,res(2:4),0,molecule)
+ res=res(2:3)//' '
+ itype(ires,molecule)=rescode(ires,res,0,molecule)
read(card(31:54),'(3f8.3)') (c(j,ires),j=1,3)
endif
endif !atom
! Calculate dummy residue coordinates inside the "chain" of a multichain
! system
nres=ires
- if ((ires_old.ne.ires).and.(molecule.ne.5)) &
+ if (((ires_old.ne.ires).and.(molecule.ne.5)) &
+ .and.(.not.unres_pdb)) &
nres_molec(molecule)=nres_molec(molecule)-2
-! print *,'I have', nres_molec(:)
+ print *,'I have',nres, nres_molec(:)
do k=1,4 ! ions are without dummy
if (nres_molec(k).eq.0) cycle
! NOW LETS ROCK! SORTING
allocate(c_temporary(3,2*nres))
allocate(itype_temporary(nres,5))
- allocate(molnum(nres+1))
+ if (.not.allocated(molnum)) allocate(molnum(nres+1))
+ if (.not.allocated(istype)) write(iout,*) &
+ "SOMETHING WRONG WITH ISTYTPE"
allocate(istype_temp(nres))
itype_temporary(:,:)=0
seqalingbegin=1