From: Adam Liwo Date: Mon, 18 Jun 2012 14:08:46 +0000 (-0400) Subject: Merge branch 'devel' of mmka.chem.univ.gda.pl:unres into devel X-Git-Tag: v.3.2~80^2~10 X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=commitdiff_plain;h=52187c9365594597457799445140ea830f1141a3;hp=-c;p=unres.git Merge branch 'devel' of mmka.chem.univ.gda.pl:unres into devel merge adam->devel (2nd attempt) Conflicts: .gitignore bin/unres/MD/unres_ifort_MPICH_GAB.exe examples/unres/MD/ff_gab/1L2Y_minim.inp source/cluster/wham/src/DIMENSIONS.COMPAR source/cluster/wham/src/include_unres/COMMON.INTERACT source/cluster/wham/src/include_unres/COMMON.SBRIDGE source/cluster/wham/src/include_unres/COMMON.TORSION source/unres/src_MD/cinfo.f source/unres/src_MIN/Makefile source/xdrfpdb/src-M/xdrf source/xdrfpdb/src/xdrf source/xdrfpdb/src/xdrf2ang.f source/xdrfpdb/src/xdrf2pdb-m.F --- 52187c9365594597457799445140ea830f1141a3 diff --combined .gitignore index 45bb905,8a8f64c..4c3f4f2 --- a/.gitignore +++ b/.gitignore @@@ -1,4 -1,17 +1,24 @@@ ++<<<<<<< HEAD +*.[oa] +*~ +*.swp +*.[eo][0-9][0-9][0-9][0-9]* ++======= + # ignore compiled stuff + *.[oa] + + # ignore texteditors + *.swp + *~ + + + # ignore build dir + build/ + + # ignored dirs form adasko + gradcheck/ + mapcheck/ + run/ + sympcheck/ + ++>>>>>>> aebadf9023e437f497f92dfcf2303c16f60917c1 diff --combined examples/unres/MD/ff_gab/1L2Y_minim.inp index 2830886,b6e6e25..a770a21 --- a/examples/unres/MD/ff_gab/1L2Y_minim.inp +++ b/examples/unres/MD/ff_gab/1L2Y_minim.inp @@@ -1,6 -1,6 +1,11 @@@ 1L2Y ++<<<<<<< HEAD +SEED=-3059743 REFSTR PDBREF MINIMIZE + ++======= + SEED=-3059743 PDBREF ENE + maxmin=1000 ++>>>>>>> aebadf9023e437f497f92dfcf2303c16f60917c1 WLONG=1.35279 WSCP=1.59304 WELEC=0.71534 WBOND=1.00000 WANG=1.13873 & WSCLOC=0.16258 WTOR=1.98599 WTORD=1.57069 WCORRH=0.42887 WCORR5=0.00000 & WCORR6=0.00000 WEL_LOC=0.16036 WTURN3=1.68722 WTURN4=0.66230 WTURN6=0.00000 & diff --combined source/cluster/wham/src/DIMENSIONS.COMPAR index 08e2231,911bd4e..f5d44d1 --- a/source/cluster/wham/src/DIMENSIONS.COMPAR +++ b/source/cluster/wham/src/DIMENSIONS.COMPAR @@@ -2,6 -2,11 +2,14 @@@ * * Array dimensions for level-based conformation comparison program: * ++<<<<<<< HEAD ++======= + * Max. number of conformations in the data set. + * + integer maxconf + PARAMETER (MAXCONF=maxstr_proc) + * ++>>>>>>> aebadf9023e437f497f92dfcf2303c16f60917c1 * Max. number levels of comparison * integer maxlevel diff --combined source/cluster/wham/src/energy_p_new.F index 8e98d39,eac5a1e..bf9c563 --- a/source/cluster/wham/src/energy_p_new.F +++ b/source/cluster/wham/src/energy_p_new.F @@@ -336,7 -336,7 +336,7 @@@ implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'sizesclu.dat' - include "DIMENSIONS.COMPAR" + c include "DIMENSIONS.COMPAR" parameter (accur=1.0d-10) include 'COMMON.GEO' include 'COMMON.VAR' @@@ -497,7 -497,7 +497,7 @@@ implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'sizesclu.dat' - include "DIMENSIONS.COMPAR" + c include "DIMENSIONS.COMPAR" include 'COMMON.GEO' include 'COMMON.VAR' include 'COMMON.LOCAL' @@@ -586,7 -586,7 +586,7 @@@ implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'sizesclu.dat' - include "DIMENSIONS.COMPAR" + c include "DIMENSIONS.COMPAR" include 'COMMON.GEO' include 'COMMON.VAR' include 'COMMON.LOCAL' @@@ -713,7 -713,7 +713,7 @@@ implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'sizesclu.dat' - include "DIMENSIONS.COMPAR" + c include "DIMENSIONS.COMPAR" include 'COMMON.GEO' include 'COMMON.VAR' include 'COMMON.LOCAL' @@@ -844,7 -844,7 +844,7 @@@ implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'sizesclu.dat' - include "DIMENSIONS.COMPAR" + c include "DIMENSIONS.COMPAR" include 'COMMON.GEO' include 'COMMON.VAR' include 'COMMON.LOCAL' @@@ -2794,16 -2794,16 +2794,16 @@@ C Evaluate bridge-strain energy and it C implicit real*8 (a-h,o-z) include 'DIMENSIONS' - include 'sizesclu.dat' include 'COMMON.SBRIDGE' include 'COMMON.CHAIN' include 'COMMON.DERIV' include 'COMMON.VAR' include 'COMMON.INTERACT' + include 'COMMON.IOUNITS' dimension ggg(3) ehpb=0.0D0 -cd print *,'edis: nhpb=',nhpb,' fbr=',fbr -cd print *,'link_start=',link_start,' link_end=',link_end +cd write(iout,*)'edis: nhpb=',nhpb,' fbr=',fbr +cd write(iout,*)'link_start=',link_start,' link_end=',link_end if (link_end.eq.0) return do i=link_start,link_end C If ihpb(i) and jhpb(i) > NRES, this is a SC-SC distance, otherwise a @@@ -2818,85 -2818,43 +2818,85 @@@ C iii and jjj point to the residues fo iii=ii jjj=jj endif +c write (iout,*) "i",i," ii",ii," iii",iii," jj",jj," jjj",jjj, +c & dhpb(i),dhpb1(i),forcon(i) C 24/11/03 AL: SS bridges handled separately because of introducing a specific C distance and angle dependent SS bond potential. if (ii.gt.nres .and. itype(iii).eq.1 .and. itype(jjj).eq.1) then call ssbond_ene(iii,jjj,eij) ehpb=ehpb+2*eij +cd write (iout,*) "eij",eij + else if (ii.gt.nres .and. jj.gt.nres) then +c Restraints from contact prediction + dd=dist(ii,jj) + if (dhpb1(i).gt.0.0d0) then + ehpb=ehpb+2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i)) + fac=forcon(i)*gnmr1prim(dd,dhpb(i),dhpb1(i))/dd +c write (iout,*) "beta nmr", +c & dd,2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i)) + else + dd=dist(ii,jj) + rdis=dd-dhpb(i) +C Get the force constant corresponding to this distance. + waga=forcon(i) +C Calculate the contribution to energy. + ehpb=ehpb+waga*rdis*rdis +c write (iout,*) "beta reg",dd,waga*rdis*rdis +C +C Evaluate gradient. +C + fac=waga*rdis/dd + endif + do j=1,3 + ggg(j)=fac*(c(j,jj)-c(j,ii)) + enddo + do j=1,3 + ghpbx(j,iii)=ghpbx(j,iii)-ggg(j) + ghpbx(j,jjj)=ghpbx(j,jjj)+ggg(j) + enddo + do k=1,3 + ghpbc(k,jjj)=ghpbc(k,jjj)+ggg(k) + ghpbc(k,iii)=ghpbc(k,iii)-ggg(k) + enddo else C Calculate the distance between the two points and its difference from the C target distance. - dd=dist(ii,jj) - rdis=dd-dhpb(i) + dd=dist(ii,jj) + if (dhpb1(i).gt.0.0d0) then + ehpb=ehpb+2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i)) + fac=forcon(i)*gnmr1prim(dd,dhpb(i),dhpb1(i))/dd +c write (iout,*) "alph nmr", +c & dd,2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i)) + else + rdis=dd-dhpb(i) C Get the force constant corresponding to this distance. - waga=forcon(i) + waga=forcon(i) C Calculate the contribution to energy. - ehpb=ehpb+waga*rdis*rdis + ehpb=ehpb+waga*rdis*rdis +c write (iout,*) "alpha reg",dd,waga*rdis*rdis C C Evaluate gradient. C - fac=waga*rdis/dd + fac=waga*rdis/dd + endif cd print *,'i=',i,' ii=',ii,' jj=',jj,' dhpb=',dhpb(i),' dd=',dd, cd & ' waga=',waga,' fac=',fac - do j=1,3 - ggg(j)=fac*(c(j,jj)-c(j,ii)) - enddo + do j=1,3 + ggg(j)=fac*(c(j,jj)-c(j,ii)) + enddo cd print '(i3,3(1pe14.5))',i,(ggg(j),j=1,3) C If this is a SC-SC distance, we need to calculate the contributions to the C Cartesian gradient in the SC vectors (ghpbx). - if (iii.lt.ii) then + if (iii.lt.ii) then do j=1,3 ghpbx(j,iii)=ghpbx(j,iii)-ggg(j) ghpbx(j,jjj)=ghpbx(j,jjj)+ggg(j) enddo - endif - do j=iii,jjj-1 + endif do k=1,3 - ghpbc(k,j)=ghpbc(k,j)+ggg(k) + ghpbc(k,jjj)=ghpbc(k,jjj)+ggg(k) + ghpbc(k,iii)=ghpbc(k,iii)-ggg(k) enddo - enddo endif enddo ehpb=0.5D0*ehpb @@@ -4249,7 -4207,7 +4249,7 @@@ c write (iout,*) 'i=',i,' gloc=', do i=1,ndih_constr itori=idih_constr(i) phii=phi(itori) - difi=phii-phi0(i) + difi=pinorm(phii-phi0(i)) if (difi.gt.drange(i)) then difi=difi-drange(i) edihcnstr=edihcnstr+0.25d0*ftors*difi**4 @@@ -4259,10 -4217,10 +4259,10 @@@ edihcnstr=edihcnstr+0.25d0*ftors*difi**4 gloc(itori-3,icg)=gloc(itori-3,icg)+ftors*difi**3 endif -! write (iout,'(2i5,2f8.3,2e14.5)') i,itori,rad2deg*phii, -! & rad2deg*difi,0.25d0*ftors*difi**4,gloc(itori-3,icg) +c write (iout,'(2i5,2f8.3,2e14.5)') i,itori,rad2deg*phii, +c & rad2deg*difi,0.25d0*ftors*difi**4,gloc(itori-3,icg) enddo -! write (iout,*) 'edihcnstr',edihcnstr + write (iout,*) 'edihcnstr',edihcnstr return end c------------------------------------------------------------------------------ @@@ -4331,26 -4289,24 +4331,26 @@@ c write (iout,*) 'i=',i,' gloc=', enddo ! 6/20/98 - dihedral angle constraints edihcnstr=0.0d0 +c write (iout,*) "Dihedral angle restraint energy" do i=1,ndih_constr - print *,"i",i itori=idih_constr(i) phii=phi(itori) - difi=phii-phi0(i) + difi=pinorm(phii-phi0(i)) +c write (iout,'(2i5,4f8.3,2e14.5)') i,itori,rad2deg*phii, +c & rad2deg*difi,rad2deg*phi0(i),rad2deg*drange(i) if (difi.gt.drange(i)) then difi=difi-drange(i) edihcnstr=edihcnstr+0.25d0*ftors*difi**4 gloc(itori-3,icg)=gloc(itori-3,icg)+ftors*difi**3 +c write (iout,*) 0.25d0*ftors*difi**4 else if (difi.lt.-drange(i)) then difi=difi+drange(i) edihcnstr=edihcnstr+0.25d0*ftors*difi**4 gloc(itori-3,icg)=gloc(itori-3,icg)+ftors*difi**3 +c write (iout,*) 0.25d0*ftors*difi**4 endif -! write (iout,'(2i5,2f8.3,2e14.5)') i,itori,rad2deg*phii, -! & rad2deg*difi,0.25d0*ftors*difi**4,gloc(itori-3,icg) enddo -! write (iout,*) 'edihcnstr',edihcnstr +c write (iout,*) 'edihcnstr',edihcnstr return end c---------------------------------------------------------------------------- @@@ -6239,18 -6195,18 +6239,18 @@@ c-------------------------------------- logical lprn common /kutas/ lprn CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C /l\ /j\ - C / \ / \ - C /| o | | o |\ - C \ j|/k\| / \ |/k\|l / - C \ / \ / \ / \ / - C o o o o - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C /l\ /j\ C + C / \ / \ C + C /| o | | o |\ C + C \ j|/k\| / \ |/k\|l / C + C \ / \ / \ / \ / C + C o o o o C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC itk=itortyp(itype(k)) s1= scalar2(AEAb1(1,2,imat),CUgb2(1,i)) @@@ -6346,18 -6302,18 +6346,18 @@@ c-------------------------------------- logical lprn common /kutas/ lprn CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C \ /l\ /j\ / - C \ / \ / \ / - C o| o | | o |o - C \ j|/k\| \ |/k\|l - C \ / \ \ / \ - C o o - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C \ /l\ /j\ / C + C \ / \ / \ / C + C o| o | | o |o C + C \ j|/k\| \ |/k\|l C + C \ / \ \ / \ C + C o o C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC cd write (2,*) 'eello6_graph2: i,',i,' j',j,' k',k,' l',l C AL 7/4/01 s1 would occur in the sixth-order moment, @@@ -6530,18 -6486,18 +6530,18 @@@ c-------------------------------------- double precision vv(2),pizda(2,2),auxmat(2,2),auxvec(2) logical swap CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C /l\ / \ /j\ - C / \ / \ / \ - C /| o |o o| o |\ - C j|/k\| / |/k\|l / - C / \ / / \ / - C / o / o - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C /l\ / \ /j\ C + C / \ / \ / \ C + C /| o |o o| o |\ C + C j|/k\| / |/k\|l / C + C / \ / / \ / C + C / o / o C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C 4/7/01 AL Component s1 was removed, because it pertains to the respective @@@ -6648,18 -6604,18 +6648,18 @@@ c-------------------------------------- & auxvec1(2),auxmat1(2,2) logical swap CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C /l\ / \ /j\ - C / \ / \ / \ - C /| o |o o| o |\ - C \ j|/k\| \ |/k\|l - C \ / \ \ / \ - C o \ o \ - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C /l\ / \ /j\ C + C / \ / \ / \ C + C /| o |o o| o |\ C + C \ j|/k\| \ |/k\|l C + C \ / \ \ / \ C + C o \ o \ C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C 4/7/01 AL Component s1 was removed, because it pertains to the respective diff --combined source/cluster/wham/src/include_unres/COMMON.INTERACT index 23bfd42,d4a58b5..2545afb --- a/source/cluster/wham/src/include_unres/COMMON.INTERACT +++ b/source/cluster/wham/src/include_unres/COMMON.INTERACT @@@ -19,7 -19,8 +19,15 @@@ C 12/1/95 Array EPS included in the COM & r0d(ntyp,2),rpp(2,2),epp(2,2),elpp6(2,2),elpp3(2,2), & eps_scp(20,2),rscp(20,2),eps_orig(ntyp,ntyp) c 12/5/03 modified 09/18/03 Bond stretching parameters. ++<<<<<<< HEAD + double precision vbldp0,vbldsc0,akp,aksc,abond0 + integer nbondterm + common /stretch/ vbldp0,vbldsc0(maxbondterm,ntyp),akp, + & aksc(maxbondterm,ntyp),abond0(maxbondterm,ntyp),nbondterm(ntyp) ++======= + double precision vbldp0,vbldsc0,akp,aksc,abond0,distchainmax + integer nbondterm + common /stretch/ vbldp0,vbldsc0(maxbondterm,ntyp),akp, + & aksc(maxbondterm,ntyp),abond0(maxbondterm,ntyp), + & distchainmax,nbondterm(ntyp) ++>>>>>>> aebadf9023e437f497f92dfcf2303c16f60917c1 diff --combined source/cluster/wham/src/include_unres/COMMON.SBRIDGE index 7bba010,5c87412..2848b61 --- a/source/cluster/wham/src/include_unres/COMMON.SBRIDGE +++ b/source/cluster/wham/src/include_unres/COMMON.SBRIDGE @@@ -1,10 -1,9 +1,19 @@@ double precision ebr,d0cm,akcm,akth,akct,v1ss,v2ss,v3ss,dhpb, ++<<<<<<< HEAD + & dhpb1,forcon,weidis + integer ns,nss,nfree,iss,ihpb,jhpb,nhpb,link_start,link_end, + & ibecarb + common /sbridge/ ebr,d0cm,akcm,akth,akct,v1ss,v2ss,v3ss,ns,nss, + & nfree,iss(maxss) + common /links/ dhpb(maxdim),dhpb1(maxdim),forcon(maxdim), + & ihpb(maxdim),jhpb(maxdim),ibecarb(maxdim),nhpb ++======= + & forcon,weidis + integer ns,nss,nfree,iss,ihpb,jhpb,nhpb,link_start,link_end + common /sbridge/ ebr,d0cm,akcm,akth,akct,v1ss,v2ss,v3ss,ns,nss, + & nfree,iss(maxss) + common /links/ dhpb(maxdim),forcon(maxdim),ihpb(maxdim), + & jhpb(maxdim),nhpb ++>>>>>>> aebadf9023e437f497f92dfcf2303c16f60917c1 common /restraints/ weidis common /links_split/ link_start,link_end diff --combined source/cluster/wham/src/include_unres/COMMON.TORSION index 8a12451,55cc7f4..957dcff --- a/source/cluster/wham/src/include_unres/COMMON.TORSION +++ b/source/cluster/wham/src/include_unres/COMMON.TORSION @@@ -4,8 -4,8 +4,13 @@@ C Torsional constants of the rotation a common/torsion/v0(maxtor,maxtor),v1(maxterm,maxtor,maxtor), & v2(maxterm,maxtor,maxtor),vlor1(maxlor,maxtor,maxtor), & vlor2(maxlor,maxtor,maxtor),vlor3(maxlor,maxtor,maxtor), ++<<<<<<< HEAD + & itortyp(ntyp),ntortyp,nterm(maxtor,maxtor),nlor(maxtor,maxtor) + & ,nterm_old ++======= + & itortyp(ntyp),ntortyp,nterm(maxtor,maxtor), + & nlor(maxtor,maxtor),nterm_old ++>>>>>>> aebadf9023e437f497f92dfcf2303c16f60917c1 C 6/23/01 - constants for double torsionals double precision v1c,v1s,v2c,v2s integer ntermd_1,ntermd_2 diff --combined source/unres/src_MD-M/unres.F index 127056b,c3e8e23..0039fcc --- a/source/unres/src_MD-M/unres.F +++ b/source/unres/src_MD-M/unres.F @@@ -188,7 -188,6 +188,7 @@@ c-------------------------------------- common /srutu/ icall double precision energy(0:n_ene) double precision energy_long(0:n_ene),energy_short(0:n_ene) + double precision varia(maxvar) if (indpdb.eq.0) call chainbuild time00=MPI_Wtime() call chainbuild_cart @@@ -600,11 -599,11 +600,11 @@@ c Broadcast the order to compute intern write (istat,'(a5,20a12)')"# ", & (wname(print_order(i)),i=1,nprint_ene) write (istat,'("# ",20(1pe12.4))') - (weights(print_order(i)),i=1,nprint_ene) + & (weights(print_order(i)),i=1,nprint_ene) if (refstr) then write (istat,'(a5,20a12)')"# ", & (ename(print_order(i)),i=1,nprint_ene), - & ,"ETOT total","RMSD","nat.contact","nnt.contact" + & "ETOT total","RMSD","nat.contact","nnt.contact" else write (istat,'(a5,14a12)')"# ", & (ename(print_order(i)),i=1,nprint_ene),"ETOT total" diff --combined source/unres/src_MD/Makefile_MPICH_ifort index 89d0b76,d60f106..ec1bcf3 --- a/source/unres/src_MD/Makefile_MPICH_ifort +++ b/source/unres/src_MD/Makefile_MPICH_ifort @@@ -1,9 -1,21 +1,9 @@@ -#-DCRYST_TOR -# -DPROCOR -# -DTSCSC -#-DTIMING \ -# -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -# -DMOMENT -#-DPARVEC -#-DPARINT -DPARINTDER - -#INSTALL_DIR = /users/local/mpi64/mpich-1.2.7p1/ -#INSTALL_DIR = /users/local/mpich2-1.3.1/ INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh -#INSTALL_DIR = /users/software/mpich2.x86_64/ FC= ifort - OPT = -O3 -ip -w + OPT = -g -ip -w -CB FFLAGS = -c ${OPT} -I$(INSTALL_DIR)/include FFLAGS1 = -c -w -g -d2 -CA -CB -I$(INSTALL_DIR)/include diff --combined source/unres/src_MD/cinfo.f index 3438039,9b22a2e..b54ec8c --- a/source/unres/src_MD/cinfo.f +++ b/source/unres/src_MD/cinfo.f @@@ -1,30 -1,29 +1,47 @@@ C DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C ++<<<<<<< HEAD +C 2 5 66 + subroutine cinfo + include 'COMMON.IOUNITS' + write(iout,*)'++++ Compile info ++++' + write(iout,*)'Version 2.5 build 66' + write(iout,*)'compiled Thu Jun 14 06:40:11 2012' + write(iout,*)'compiled by adam@matrix.chem.cornell.edu' ++======= + C 2 5 295 + subroutine cinfo + include 'COMMON.IOUNITS' + write(iout,*)'++++ Compile info ++++' + write(iout,*)'Version 2.5 build 295' + write(iout,*)'compiled Mon Jun 18 05:08:20 2012' + write(iout,*)'compiled by aks255@matrix.chem.cornell.edu' ++>>>>>>> aebadf9023e437f497f92dfcf2303c16f60917c1 write(iout,*)'OS name: Linux ' write(iout,*)'OS release: 2.6.34.9-69.fc13.x86_64 ' write(iout,*)'OS version:', & ' #1 SMP Tue May 3 09:23:03 UTC 2011 ' write(iout,*)'flags:' ++<<<<<<< HEAD + write(iout,*)'FC = ifort' + write(iout,*)'FFLAGS = -c ${OPT} -I$(INSTALL_DIR)/include' ++======= + write(iout,*)'INSTALL_DIR = /users/software/mpich-1.2.7p1_int...' + write(iout,*)'FC= ifort' + write(iout,*)'OPT = -g -ip -w -CB ' + write(iout,*)'FFLAGS = -c ${OPT} -I$(INSTALL_DIR)/include ' ++>>>>>>> aebadf9023e437f497f92dfcf2303c16f60917c1 write(iout,*)'FFLAGS1 = -c -w -g -d2 -CA -CB -I$(INSTALL_DIR)...' - write(iout,*)'FFLAGS2 = -c -w -g -O0 -I$(INSTALL_DIR)/include ' + write(iout,*)'FFLAGS2 = -c -w -g -O0 -I$(INSTALL_DIR)/include' write(iout,*)'FFLAGSE = -c -w -O3 -ipo -ipo_obj -opt_report ...' - write(iout,*)'LIBS = -L$(INSTALL_DIR)/lib -lmpich xdrf/libxdr...' + write(iout,*)'CC = cc' + write(iout,*)'CFLAGS = -DLINUX -DPGI -c' + write(iout,*)'OPT = -O3 -ip -w' + write(iout,*)'LIBS = -Lxdrf -lxdrf' write(iout,*)'ARCH = LINUX' write(iout,*)'PP = /lib/cpp -P' write(iout,*)'object = unres.o arcos.o cartprint.o chainbuild...' write(iout,*)'GAB: CPPFLAGS = -DPROCOR -DLINUX -DPGI -DUNRES ...' - write(iout,*)'GAB: BIN = ../../../bin/unres/MD/unres_ifort_MP...' + write(iout,*)'GAB: BIN = ../../../bin/unres/MD/unres_ifort_si...' write(iout,*)'E0LL2Y: CPPFLAGS = -DPROCOR -DLINUX -DPGI -DUNR...' write(iout,*)'E0LL2Y: BIN = ../../../bin/unres/MD/unres_ifort...' write(iout,*)'++++ End of compile info ++++' diff --combined source/unres/src_MD/energy_p_new_barrier.F index 3feefaa,1a99285..9edadf8 --- a/source/unres/src_MD/energy_p_new_barrier.F +++ b/source/unres/src_MD/energy_p_new_barrier.F @@@ -471,7 -471,7 +471,7 @@@ cMS$ATTRIBUTES C :: proc_pro include 'mpif.h' #endif double precision gradbufc(3,maxres),gradbufx(3,maxres), - & glocbuf(4*maxres),gradbufc_sum(3,maxres) + & glocbuf(4*maxres),gradbufc_sum(3,maxres),gloc_scbuf(3,maxres) include 'COMMON.SETUP' include 'COMMON.IOUNITS' include 'COMMON.FFIELD' @@@ -483,6 -483,7 +483,7 @@@ include 'COMMON.CONTROL' include 'COMMON.TIME1' include 'COMMON.MAXGRAD' + include 'COMMON.SCCOR' #ifdef TIMING #ifdef MPI time01=MPI_Wtime() @@@ -755,7 -756,6 +756,6 @@@ c endd & +wturn3*gel_loc_turn3(i) & +wturn6*gel_loc_turn6(i) & +wel_loc*gel_loc_loc(i) - & +wsccor*gsccor_loc(i) enddo #ifdef DEBUG write (iout,*) "gloc after adding corr" @@@ -774,6 -774,21 +774,21 @@@ do i=1,4*nres glocbuf(i)=gloc(i,icg) enddo + #define DEBUG + #ifdef DEBUG + write (iout,*) "gloc_sc before reduce" + do i=1,nres + do j=1,3 + write (iout,*) i,j,gloc_sc(j,i,icg) + enddo + enddo + #endif + #undef DEBUG + do i=1,nres + do j=1,3 + gloc_scbuf(j,i)=gloc_sc(j,i,icg) + enddo + enddo time00=MPI_Wtime() call MPI_Barrier(FG_COMM,IERR) time_barrier_g=time_barrier_g+MPI_Wtime()-time00 @@@ -784,7 -799,19 +799,19 @@@ & MPI_DOUBLE_PRECISION,MPI_SUM,king,FG_COMM,IERR) call MPI_Reduce(glocbuf(1),gloc(1,icg),4*nres, & MPI_DOUBLE_PRECISION,MPI_SUM,king,FG_COMM,IERR) + call MPI_Reduce(gloc_scbuf(1,1),gloc_sc(1,1,icg),3*nres, + & MPI_DOUBLE_PRECISION,MPI_SUM,king,FG_COMM,IERR) time_reduce=time_reduce+MPI_Wtime()-time00 + #define DEBUG + #ifdef DEBUG + write (iout,*) "gloc_sc after reduce" + do i=1,nres + do j=1,3 + write (iout,*) i,j,gloc_sc(j,i,icg) + enddo + enddo + #endif + #undef DEBUG #ifdef DEBUG write (iout,*) "gloc after reduce" do i=1,4*nres @@@ -1038,7 -1065,7 +1065,7 @@@ C-------------------------------------- & 'ESC= ',1pE16.6,' WEIGHT=',1pD16.6,' (SC local)'/ & 'ETORS= ',1pE16.6,' WEIGHT=',1pD16.6,' (torsional)'/ & 'ETORSD=',1pE16.6,' WEIGHT=',1pD16.6,' (double torsional)'/ - & 'EHBP= ',1pE16.6,' WEIGHT=',1pD16.6, + & 'EHPB= ',1pE16.6,' WEIGHT=',1pD16.6, & ' (SS bridges & dist. cnstr.)'/ & 'ECORR4=',1pE16.6,' WEIGHT=',1pD16.6,' (multi-body)'/ & 'ECORR5=',1pE16.6,' WEIGHT=',1pD16.6,' (multi-body)'/ @@@ -4239,90 -4266,49 +4266,90 @@@ C iii and jjj point to the residues fo iii=ii jjj=jj endif -cd write (iout,*) "i",i," ii",ii," iii",iii," jj",jj," jjj",jjj +c write (iout,*) "i",i," ii",ii," iii",iii," jj",jj," jjj",jjj, +c & dhpb(i),dhpb1(i),forcon(i) C 24/11/03 AL: SS bridges handled separately because of introducing a specific C distance and angle dependent SS bond potential. if (ii.gt.nres .and. itype(iii).eq.1 .and. itype(jjj).eq.1) then call ssbond_ene(iii,jjj,eij) ehpb=ehpb+2*eij cd write (iout,*) "eij",eij + else if (ii.gt.nres .and. jj.gt.nres) then +c Restraints from contact prediction + dd=dist(ii,jj) + if (dhpb1(i).gt.0.0d0) then + ehpb=ehpb+2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i)) + fac=forcon(i)*gnmr1prim(dd,dhpb(i),dhpb1(i))/dd +c write (iout,*) "beta nmr", +c & dd,2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i)) + else + dd=dist(ii,jj) + rdis=dd-dhpb(i) +C Get the force constant corresponding to this distance. + waga=forcon(i) +C Calculate the contribution to energy. + ehpb=ehpb+waga*rdis*rdis +c write (iout,*) "beta reg",dd,waga*rdis*rdis +C +C Evaluate gradient. +C + fac=waga*rdis/dd + endif + do j=1,3 + ggg(j)=fac*(c(j,jj)-c(j,ii)) + enddo + do j=1,3 + ghpbx(j,iii)=ghpbx(j,iii)-ggg(j) + ghpbx(j,jjj)=ghpbx(j,jjj)+ggg(j) + enddo + do k=1,3 + ghpbc(k,jjj)=ghpbc(k,jjj)+ggg(k) + ghpbc(k,iii)=ghpbc(k,iii)-ggg(k) + enddo else C Calculate the distance between the two points and its difference from the C target distance. - dd=dist(ii,jj) - rdis=dd-dhpb(i) + dd=dist(ii,jj) + if (dhpb1(i).gt.0.0d0) then + ehpb=ehpb+2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i)) + fac=forcon(i)*gnmr1prim(dd,dhpb(i),dhpb1(i))/dd +c write (iout,*) "alph nmr", +c & dd,2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i)) + else + rdis=dd-dhpb(i) C Get the force constant corresponding to this distance. - waga=forcon(i) + waga=forcon(i) C Calculate the contribution to energy. - ehpb=ehpb+waga*rdis*rdis + ehpb=ehpb+waga*rdis*rdis +c write (iout,*) "alpha reg",dd,waga*rdis*rdis C C Evaluate gradient. C - fac=waga*rdis/dd + fac=waga*rdis/dd + endif cd print *,'i=',i,' ii=',ii,' jj=',jj,' dhpb=',dhpb(i),' dd=',dd, cd & ' waga=',waga,' fac=',fac - do j=1,3 - ggg(j)=fac*(c(j,jj)-c(j,ii)) - enddo + do j=1,3 + ggg(j)=fac*(c(j,jj)-c(j,ii)) + enddo cd print '(i3,3(1pe14.5))',i,(ggg(j),j=1,3) C If this is a SC-SC distance, we need to calculate the contributions to the C Cartesian gradient in the SC vectors (ghpbx). - if (iii.lt.ii) then + if (iii.lt.ii) then do j=1,3 ghpbx(j,iii)=ghpbx(j,iii)-ggg(j) ghpbx(j,jjj)=ghpbx(j,jjj)+ggg(j) enddo - endif + endif cgrad do j=iii,jjj-1 cgrad do k=1,3 cgrad ghpbc(k,j)=ghpbc(k,j)+ggg(k) cgrad enddo cgrad enddo - do k=1,3 - ghpbc(k,jjj)=ghpbc(k,jjj)+ggg(k) - ghpbc(k,iii)=ghpbc(k,iii)-ggg(k) - enddo + do k=1,3 + ghpbc(k,jjj)=ghpbc(k,jjj)+ggg(k) + ghpbc(k,iii)=ghpbc(k,iii)-ggg(k) + enddo endif enddo ehpb=0.5D0*ehpb @@@ -5691,7 -5677,7 +5718,7 @@@ C Proline-Proline pair is a special cas & restyp(itype(i-2)),i-2,restyp(itype(i-1)),i-1,itori,itori1, & (v1(j,itori,itori1),j=1,6),(v2(j,itori,itori1),j=1,6) gloc(i-3,icg)=gloc(i-3,icg)+wtor*gloci - c write (iout,*) 'i=',i,' gloc=',gloc(i-3,icg) + write (iout,*) 'i=',i,' gloc=',gloc(i-3,icg) enddo ! 6/20/98 - dihedral angle constraints edihcnstr=0.0d0 @@@ -5806,6 -5792,7 +5833,7 @@@ c do i=1,ndih_const else difi=0.0 endif + c write (iout,*) "gloci", gloc(i-3,icg) cd write (iout,'(2i5,4f8.3,2e14.5)') i,itori,rad2deg*phii, cd & rad2deg*phi0(i), rad2deg*drange(i), cd & rad2deg*difi,0.25d0*ftors*difi**4,gloc(itori-3,icg) @@@ -5842,7 -5829,6 +5870,6 @@@ c lprn=.true phii1=phi(i+1) gloci1=0.0D0 gloci2=0.0D0 - C Regular cosine and sine terms do j=1,ntermd_1(itori,itori1,itori2) v1cij=v1c(1,j,itori,itori1,itori2) v1sij=v1s(1,j,itori,itori1,itori2) @@@ -5877,6 -5863,7 +5904,7 @@@ enddo gloc(i-3,icg)=gloc(i-3,icg)+wtor_d*gloci1 gloc(i-2,icg)=gloc(i-2,icg)+wtor_d*gloci2 + c write (iout,*) "gloci", gloc(i-3,icg) enddo return end @@@ -5909,26 -5896,57 +5937,57 @@@ C Set lprn=.true. for debuggin c lprn=.true. c write (iout,*) "EBACK_SC_COR",iphi_start,iphi_end,nterm_sccor esccor=0.0D0 - do i=iphi_start,iphi_end + do i=itau_start,itau_end esccor_ii=0.0D0 - itori=itype(i-2) - itori1=itype(i-1) + isccori=isccortyp(itype(i-2)) + isccori1=isccortyp(itype(i-1)) phii=phi(i) + cccc Added 9 May 2012 + cc Tauangle is torsional engle depending on the value of first digit + c(see comment below) + cc Omicron is flat angle depending on the value of first digit + c(see comment below) + + + do intertyp=1,3 !intertyp + cc Added 09 May 2012 (Adasko) + cc Intertyp means interaction type of backbone mainchain correlation: + c 1 = SC...Ca...Ca...Ca + c 2 = Ca...Ca...Ca...SC + c 3 = SC...Ca...Ca...SCi gloci=0.0D0 - do j=1,nterm_sccor - v1ij=v1sccor(j,itori,itori1) - v2ij=v2sccor(j,itori,itori1) - cosphi=dcos(j*phii) - sinphi=dsin(j*phii) + if (((intertyp.eq.3).and.((itype(i-2).eq.10).or. + & (itype(i-1).eq.10).or.(itype(i-2).eq.21).or. + & (itype(i-1).eq.21))) + & .or. ((intertyp.eq.1).and.((itype(i-2).eq.10) + & .or.(itype(i-2).eq.21))) + & .or.((intertyp.eq.2).and.((itype(i-1).eq.10).or. + & (itype(i-1).eq.21)))) cycle + if ((intertyp.eq.2).and.(i.eq.4).and.(itype(1).eq.21)) cycle + if ((intertyp.eq.1).and.(i.eq.nres).and.(itype(nres).eq.21)) + & cycle + do j=1,nterm_sccor(isccori,isccori1) + v1ij=v1sccor(j,intertyp,isccori,isccori1) + v2ij=v2sccor(j,intertyp,isccori,isccori1) + cosphi=dcos(j*tauangle(intertyp,i)) + sinphi=dsin(j*tauangle(intertyp,i)) esccor=esccor+v1ij*cosphi+v2ij*sinphi gloci=gloci+j*(v2ij*cosphi-v1ij*sinphi) enddo + gloc_sc(intertyp,i-3,icg)=gloc_sc(intertyp,i-3,icg)+wsccor*gloci + c write (iout,*) "WTF",intertyp,i,itype(i),v1ij*cosphi+v2ij*sinphi + c &gloc_sc(intertyp,i-3,icg) if (lprn) & write (iout,'(2(a3,2x,i3,2x),2i3,6f8.3/26x,6f8.3/)') & restyp(itype(i-2)),i-2,restyp(itype(i-1)),i-1,itori,itori1, - & (v1sccor(j,itori,itori1),j=1,6),(v2sccor(j,itori,itori1),j=1,6) + & (v1sccor(j,intertyp,itori,itori1),j=1,6) + & ,(v2sccor(j,intertyp,itori,itori1),j=1,6) gsccor_loc(i-3)=gsccor_loc(i-3)+gloci + enddo !intertyp enddo + c do i=1,nres + c write (iout,*) "W@T@F", gloc_sc(1,i,icg),gloc(i,icg) + c enddo return end c---------------------------------------------------------------------------- @@@ -8035,9 -8053,9 +8094,9 @@@ C Parallel Antiparallel C C o o - C /l\ /j\ - C / \ / \ - C /| o | | o |\ + C /l\ /j\ + C / \ / \ + C /| o | | o |\ C \ j|/k\| / \ |/k\|l / C \ / \ / \ / \ / C o o o o @@@ -8136,18 -8154,18 +8195,18 @@@ c-------------------------------------- logical lprn common /kutas/ lprn CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C \ /l\ /j\ / - C \ / \ / \ / - C o| o | | o |o - C \ j|/k\| \ |/k\|l - C \ / \ \ / \ - C o o - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C \ /l\ /j\ / C + C \ / \ / \ / C + C o| o | | o |o C + C \ j|/k\| \ |/k\|l C + C \ / \ \ / \ C + C o o C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC cd write (2,*) 'eello6_graph2: i,',i,' j',j,' k',k,' l',l C AL 7/4/01 s1 would occur in the sixth-order moment, @@@ -8318,18 -8336,18 +8377,18 @@@ c-------------------------------------- double precision vv(2),pizda(2,2),auxmat(2,2),auxvec(2) logical swap CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C /l\ / \ /j\ - C / \ / \ / \ - C /| o |o o| o |\ - C j|/k\| / |/k\|l / - C / \ / / \ / - C / o / o - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C /l\ / \ /j\ C + C / \ / \ / \ C + C /| o |o o| o |\ C + C j|/k\| / |/k\|l / C + C / \ / / \ / C + C / o / o C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C 4/7/01 AL Component s1 was removed, because it pertains to the respective @@@ -8435,18 -8453,18 +8494,18 @@@ c-------------------------------------- & auxvec1(2),auxmat1(2,2) logical swap CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C /l\ / \ /j\ - C / \ / \ / \ - C /| o |o o| o |\ - C \ j|/k\| \ |/k\|l - C \ / \ \ / \ - C o \ o \ - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C /l\ / \ /j\ C + C / \ / \ / \ C + C /| o |o o| o |\ C + C \ j|/k\| \ |/k\|l C + C \ / \ \ / \ C + C o \ o \ C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C 4/7/01 AL Component s1 was removed, because it pertains to the respective diff --combined source/unres/src_MD/readrtns.F index 34b73d9,abd3911..47850c2 --- a/source/unres/src_MD/readrtns.F +++ b/source/unres/src_MD/readrtns.F @@@ -44,8 -44,7 +44,8 @@@ C Print restraint informatio &write (iout,'(a,i5,a)') "The following",nhpb-nss, & " distance constraints have been imposed" do i=nss+1,nhpb - write (iout,'(3i6,f10.5)') i-nss,ihpb(i),jhpb(i),forcon(i) + write (iout,'(3i6,i2,3f10.5)') i-nss,ihpb(i),jhpb(i), + & ibecarb(i),dhpb(i),dhpb1(i),forcon(i) enddo #ifdef MPI endif @@@ -138,7 -137,7 +138,7 @@@ C Set up the time limit (caution! The t call readi(controlcard,'MAXGEN',maxgen,10000) call readi(controlcard,'MAXOVERLAP',maxoverlap,1000) call readi(controlcard,"KDIAG",kdiag,0) - call readi(controlcard,"RESCALE_MODE",rescale_mode,1) + call readi(controlcard,"RESCALE_MODE",rescale_mode,2) if(me.eq.king .or. .not. out1file .and. fg_rank.eq.0) & write (iout,*) "RESCALE_MODE",rescale_mode split_ene=index(controlcard,'SPLIT_ENE').gt.0 @@@ -1076,6 -1075,11 +1076,6 @@@ czscore call geom_to_var(nvar, enddo call contact(.true.,ncont_ref,icont_ref,co) endif -c write (iout,*) "constr_dist",constr_dist,nstart_sup,nsup - call flush(iout) - if (constr_dist.gt.0) call read_dist_constr -c write (iout,*) "After read_dist_constr nhpb",nhpb - call hpb_partition if(me.eq.king.or..not.out1file) & write (iout,*) 'Contact order:',co if (pdbref) then @@@ -1092,13 -1096,6 +1092,13 @@@ enddo endif endif +c write (iout,*) "constr_dist",constr_dist,nstart_sup,nsup + if (constr_dist.gt.0) then + call read_dist_constr + call hpb_partition + endif +c write (iout,*) "After read_dist_constr nhpb",nhpb +c call flush(iout) if (indpdb.eq.0 .and. modecalc.ne.2 .and. modecalc.ne.4 & .and. modecalc.ne.8 .and. modecalc.ne.9 .and. & modecalc.ne.10) then @@@ -1813,9 -1810,6 +1813,9 @@@ c-------------------------------------- call readi(minimcard,'MINFUN',minfun,maxmin) call reada(minimcard,'TOLF',tolf,1.0D-2) call reada(minimcard,'RTOLF',rtolf,1.0D-4) + print_min_stat=min0(index(minimcard,'PRINT_MIN_STAT'),1) + print_min_res=min0(index(minimcard,'PRINT_MIN_RES'),1) + print_min_ini=min0(index(minimcard,'PRINT_MIN_INI'),1) write (iout,'(/80(1h*)/20x,a/80(1h*))') & 'Options in energy minimization:' write (iout,'(4(a,i5),a,1pe14.5,a,1pe14.5)') @@@ -2086,38 -2080,38 +2086,38 @@@ C Get parameter filenames and open the open (isidep,file=sidename,status='old') #else open(1,file=pref_orig(:ilen(pref_orig))//'.inp',status='old', - & readonly) + &action='read') open (9,file=prefix(:ilen(prefix))//'.intin',status='unknown') C open (18,file=prefix(:ilen(prefix))//'.entin',status='unknown') C Get parameter filenames and open the parameter files. call getenv_loc('BONDPAR',bondname) - open (ibond,file=bondname,status='old',readonly) + open (ibond,file=bondname,status='old',action='read') call getenv_loc('THETPAR',thetname) - open (ithep,file=thetname,status='old',readonly) + open (ithep,file=thetname,status='old',action='read') #ifndef CRYST_THETA call getenv_loc('THETPARPDB',thetname_pdb) print *,"thetname_pdb ",thetname_pdb - open (ithep_pdb,file=thetname_pdb,status='old',readonly) + open (ithep_pdb,file=thetname_pdb,status='old',action='read') print *,ithep_pdb," opened" #endif call getenv_loc('ROTPAR',rotname) - open (irotam,file=rotname,status='old',readonly) + open (irotam,file=rotname,status='old',action='read') #ifndef CRYST_SC call getenv_loc('ROTPARPDB',rotname_pdb) - open (irotam_pdb,file=rotname_pdb,status='old',readonly) + open (irotam_pdb,file=rotname_pdb,status='old',action='read') #endif call getenv_loc('TORPAR',torname) - open (itorp,file=torname,status='old',readonly) + open (itorp,file=torname,status='old',action='read') call getenv_loc('TORDPAR',tordname) - open (itordp,file=tordname,status='old',readonly) + open (itordp,file=tordname,status='old',action='read') call getenv_loc('SCCORPAR',sccorname) - open (isccor,file=sccorname,status='old',readonly) + open (isccor,file=sccorname,status='old',action='read') call getenv_loc('FOURIER',fouriername) - open (ifourier,file=fouriername,status='old',readonly) + open (ifourier,file=fouriername,status='old',action='read') call getenv_loc('ELEPAR',elename) - open (ielep,file=elename,status='old',readonly) + open (ielep,file=elename,status='old',action='read') call getenv_loc('SIDEPAR',sidename) - open (isidep,file=sidename,status='old',readonly) + open (isidep,file=sidename,status='old',action='read') #endif #ifndef OLDSCP C @@@ -2132,7 -2126,7 +2132,7 @@@ #elif (defined G77) open (iscpp,file=scpname,status='old') #else - open (iscpp,file=scpname,status='old',readonly) + open (iscpp,file=scpname,status='old',action='read') #endif #endif call getenv_loc('PATTERN',patname) @@@ -2143,7 -2137,7 +2143,7 @@@ #elif (defined G77) open (icbase,file=patname,status='old') #else - open (icbase,file=patname,status='old',readonly) + open (icbase,file=patname,status='old',action='read') #endif #ifdef MPI C Open output file only for CG processes @@@ -2198,6 -2192,7 +2198,7 @@@ c print *,"Processor",myrank," fg_ #if defined(AIX) || defined(PGI) if (me.eq.king .or. .not. out1file) & open(iout,file=outname,status='unknown') + c#define DEBUG #ifdef DEBUG if (fg_rank.gt.0) then write (liczba,'(i3.3)') myrank/nfgtasks @@@ -2206,6 -2201,7 +2207,7 @@@ & status='unknown') endif #endif + c#undef DEBUG if(me.eq.king) then open(igeom,file=intname,status='unknown',position='append') open(ipdb,file=pdbname,status='unknown') @@@ -2217,14 -2213,17 +2219,17 @@@ c1out open(iout,file=outname,stat #else if (me.eq.king .or. .not.out1file) & open(iout,file=outname,status='unknown') + c#define DEBUG #ifdef DEBUG if (fg_rank.gt.0) then + print "Processor",fg_rank," opening output file" write (liczba,'(i3.3)') myrank/nfgtasks write (ll,'(bz,i3.3)') fg_rank open(iout,file="debug"//liczba(:ilen(liczba))//"."//ll, & status='unknown') endif #endif + c#undef DEBUG if(me.eq.king) then open(igeom,file=intname,status='unknown',access='append') open(ipdb,file=pdbname,status='unknown') @@@ -2407,18 -2406,6 +2412,18 @@@ c write (iout,*) "IPAIR c do i=1,npair_ c write (iout,*) i,ipair_(1,i),ipair_(2,i),wpair_(i) c enddo + if (.not.refstr .and. nfrag.gt.0) then + write (iout,*) + & "ERROR: no reference structure to compute distance restraints" + write (iout,*) + & "Restraints must be specified explicitly (NDIST=number)" + stop + endif + if (nfrag.lt.2 .and. npair.gt.0) then + write (iout,*) "ERROR: Less than 2 fragments specified", + & " but distance restraints between pairs requested" + stop + endif call flush(iout) do i=1,nfrag_ if (ifrag_(1,i).lt.nstart_sup) ifrag_(1,i)=nstart_sup @@@ -2493,29 -2480,21 +2498,29 @@@ c write (iout,*) i,ifrag_(1,i),i endif enddo do i=1,ndist_ - read (inp,*) ihpb(nhpb+1),jhpb(nhpb+1),forcon(nhpb+1) + read (inp,*) ihpb(nhpb+1),jhpb(nhpb+1),dhpb(i),dhpb1(i), + & ibecarb(i),forcon(nhpb+1) if (forcon(nhpb+1).gt.0.0d0) then nhpb=nhpb+1 - dhpb(nhpb)=dist(ihpb(nhpb),jhpb(nhpb)) + if (ibecarb(i).gt.0) then + ihpb(i)=ihpb(i)+nres + jhpb(i)=jhpb(i)+nres + endif + if (dhpb(nhpb).eq.0.0d0) + & dhpb(nhpb)=dist(ihpb(nhpb),jhpb(nhpb)) + endif + enddo #ifdef MPI - if (.not.out1file .or. me.eq.king) - & write (iout,'(a,3i5,f8.2,f10.1)') "+dist.constr ", - & nhpb,ihpb(nhpb),jhpb(nhpb),dhpb(nhpb),forcon(nhpb) -#else - write (iout,'(a,3i5,f8.2,f10.1)') "+dist.constr ", - & nhpb,ihpb(nhpb),jhpb(nhpb),dhpb(nhpb),forcon(nhpb) + if (.not.out1file .or. me.eq.king) then #endif - endif + do i=1,nhpb + write (iout,'(a,3i5,2f8.2,i2,f10.1)') "+dist.constr ", + & i,ihpb(i),jhpb(i),dhpb(i),dhpb1(i),ibecarb(i),forcon(i) enddo call flush(iout) +#ifdef MPI + endif +#endif return end c------------------------------------------------------------------------------- diff --combined source/unres/src_MIN/energy_p_new_barrier.F index cd99bdb,9059c02..3fcf739 --- a/source/unres/src_MIN/energy_p_new_barrier.F +++ b/source/unres/src_MIN/energy_p_new_barrier.F @@@ -629,7 -629,7 +629,7 @@@ c endd gradc(j,i,icg)=gradbufc(j,i)+welec*gelc(j,i)+ & wel_loc*gel_loc(j,i)+ & 0.5d0*(wscp*gvdwc_scpp(j,i)+ - & welec*gelc_long(j,i) + & welec*gelc_long(j,i)+ & wel_loc*gel_loc_long(j,i)+ & wcorr*gcorr_long(j,i)+ & wcorr5*gradcorr5_long(j,i)+ @@@ -1448,7 -1448,7 +1448,7 @@@ logical lprn evdw=0.0D0 ccccc energy_dec=.false. -c print *,'Entering EGB nnt=',nnt,' nct=',nct,' expon=',expon +c write(iout,*) 'Entering EGB nnt=',nnt,' nct=',nct,' expon=',expon evdw=0.0D0 evdw_p=0.0D0 evdw_m=0.0D0 @@@ -7906,18 -7906,18 +7906,18 @@@ c-------------------------------------- logical lprn common /kutas/ lprn CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C /l\ /j\ - C / \ / \ - C /| o | | o |\ - C \ j|/k\| / \ |/k\|l / - C \ / \ / \ / \ / - C o o o o - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C /l\ /j\ C + C / \ / \ C + C /| o | | o |\ C + C \ j|/k\| / \ |/k\|l / C + C \ / \ / \ / \ / C + C o o o o C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC itk=itortyp(itype(k)) s1= scalar2(AEAb1(1,2,imat),CUgb2(1,i)) @@@ -8011,18 -8011,18 +8011,18 @@@ c-------------------------------------- logical lprn common /kutas/ lprn CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C \ /l\ /j\ / - C \ / \ / \ / - C o| o | | o |o - C \ j|/k\| \ |/k\|l - C \ / \ \ / \ - C o o - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C \ /l\ /j\ / C + C \ / \ / \ / C + C o| o | | o |o C + C \ j|/k\| \ |/k\|l C + C \ / \ \ / \ C + C o o C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC cd write (2,*) 'eello6_graph2: i,',i,' j',j,' k',k,' l',l C AL 7/4/01 s1 would occur in the sixth-order moment, @@@ -8193,18 -8193,18 +8193,18 @@@ c-------------------------------------- double precision vv(2),pizda(2,2),auxmat(2,2),auxvec(2) logical swap CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C /l\ / \ /j\ - C / \ / \ / \ - C /| o |o o| o |\ - C j|/k\| / |/k\|l / - C / \ / / \ / - C / o / o - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C /l\ / \ /j\ C + C / \ / \ / \ C + C /| o |o o| o |\ C + C j|/k\| / |/k\|l / C + C / \ / / \ / C + C / o / o C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C 4/7/01 AL Component s1 was removed, because it pertains to the respective @@@ -8310,18 -8310,18 +8310,18 @@@ c-------------------------------------- & auxvec1(2),auxmat1(2,2) logical swap CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C /l\ / \ /j\ - C / \ / \ / \ - C /| o |o o| o |\ - C \ j|/k\| \ |/k\|l - C \ / \ \ / \ - C o \ o \ - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C /l\ / \ /j\ C + C / \ / \ / \ C + C /| o |o o| o |\ C + C \ j|/k\| \ |/k\|l C + C \ / \ \ / \ C + C o \ o \ C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C 4/7/01 AL Component s1 was removed, because it pertains to the respective diff --combined source/wham/src/energy_p_new.F index 4d8977a,0d934eb..dfef8c3 --- a/source/wham/src/energy_p_new.F +++ b/source/wham/src/energy_p_new.F @@@ -2869,16 -2869,16 +2869,16 @@@ C Evaluate bridge-strain energy and it C implicit real*8 (a-h,o-z) include 'DIMENSIONS' - include 'DIMENSIONS.ZSCOPT' include 'COMMON.SBRIDGE' include 'COMMON.CHAIN' include 'COMMON.DERIV' include 'COMMON.VAR' include 'COMMON.INTERACT' + include 'COMMON.IOUNITS' dimension ggg(3) ehpb=0.0D0 -cd print *,'edis: nhpb=',nhpb,' fbr=',fbr -cd print *,'link_start=',link_start,' link_end=',link_end +cd write(iout,*)'edis: nhpb=',nhpb,' fbr=',fbr +cd write(iout,*)'link_start=',link_start,' link_end=',link_end if (link_end.eq.0) return do i=link_start,link_end C If ihpb(i) and jhpb(i) > NRES, this is a SC-SC distance, otherwise a @@@ -2893,85 -2893,43 +2893,85 @@@ C iii and jjj point to the residues fo iii=ii jjj=jj endif +c write (iout,*) "i",i," ii",ii," iii",iii," jj",jj," jjj",jjj, +c & dhpb(i),dhpb1(i),forcon(i) C 24/11/03 AL: SS bridges handled separately because of introducing a specific C distance and angle dependent SS bond potential. if (ii.gt.nres .and. itype(iii).eq.1 .and. itype(jjj).eq.1) then call ssbond_ene(iii,jjj,eij) ehpb=ehpb+2*eij +cd write (iout,*) "eij",eij + else if (ii.gt.nres .and. jj.gt.nres) then +c Restraints from contact prediction + dd=dist(ii,jj) + if (dhpb1(i).gt.0.0d0) then + ehpb=ehpb+2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i)) + fac=forcon(i)*gnmr1prim(dd,dhpb(i),dhpb1(i))/dd +c write (iout,*) "beta nmr", +c & dd,2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i)) + else + dd=dist(ii,jj) + rdis=dd-dhpb(i) +C Get the force constant corresponding to this distance. + waga=forcon(i) +C Calculate the contribution to energy. + ehpb=ehpb+waga*rdis*rdis +c write (iout,*) "beta reg",dd,waga*rdis*rdis +C +C Evaluate gradient. +C + fac=waga*rdis/dd + endif + do j=1,3 + ggg(j)=fac*(c(j,jj)-c(j,ii)) + enddo + do j=1,3 + ghpbx(j,iii)=ghpbx(j,iii)-ggg(j) + ghpbx(j,jjj)=ghpbx(j,jjj)+ggg(j) + enddo + do k=1,3 + ghpbc(k,jjj)=ghpbc(k,jjj)+ggg(k) + ghpbc(k,iii)=ghpbc(k,iii)-ggg(k) + enddo else C Calculate the distance between the two points and its difference from the C target distance. - dd=dist(ii,jj) - rdis=dd-dhpb(i) + dd=dist(ii,jj) + if (dhpb1(i).gt.0.0d0) then + ehpb=ehpb+2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i)) + fac=forcon(i)*gnmr1prim(dd,dhpb(i),dhpb1(i))/dd +c write (iout,*) "alph nmr", +c & dd,2*forcon(i)*gnmr1(dd,dhpb(i),dhpb1(i)) + else + rdis=dd-dhpb(i) C Get the force constant corresponding to this distance. - waga=forcon(i) + waga=forcon(i) C Calculate the contribution to energy. - ehpb=ehpb+waga*rdis*rdis + ehpb=ehpb+waga*rdis*rdis +c write (iout,*) "alpha reg",dd,waga*rdis*rdis C C Evaluate gradient. C - fac=waga*rdis/dd + fac=waga*rdis/dd + endif cd print *,'i=',i,' ii=',ii,' jj=',jj,' dhpb=',dhpb(i),' dd=',dd, cd & ' waga=',waga,' fac=',fac - do j=1,3 - ggg(j)=fac*(c(j,jj)-c(j,ii)) - enddo + do j=1,3 + ggg(j)=fac*(c(j,jj)-c(j,ii)) + enddo cd print '(i3,3(1pe14.5))',i,(ggg(j),j=1,3) C If this is a SC-SC distance, we need to calculate the contributions to the C Cartesian gradient in the SC vectors (ghpbx). - if (iii.lt.ii) then + if (iii.lt.ii) then do j=1,3 ghpbx(j,iii)=ghpbx(j,iii)-ggg(j) ghpbx(j,jjj)=ghpbx(j,jjj)+ggg(j) enddo - endif - do j=iii,jjj-1 + endif do k=1,3 - ghpbc(k,j)=ghpbc(k,j)+ggg(k) + ghpbc(k,jjj)=ghpbc(k,jjj)+ggg(k) + ghpbc(k,iii)=ghpbc(k,iii)-ggg(k) enddo - enddo endif enddo ehpb=0.5D0*ehpb @@@ -6322,18 -6280,18 +6322,18 @@@ c-------------------------------------- logical lprn common /kutas/ lprn CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C /l\ /j\ - C / \ / \ - C /| o | | o |\ - C \ j|/k\| / \ |/k\|l / - C \ / \ / \ / \ / - C o o o o - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C /l\ /j\ C + C / \ / \ C + C /| o | | o |\ C + C \ j|/k\| / \ |/k\|l / C + C \ / \ / \ / \ / C + C o o o o C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC itk=itortyp(itype(k)) s1= scalar2(AEAb1(1,2,imat),CUgb2(1,i)) @@@ -6429,18 -6387,18 +6429,18 @@@ c-------------------------------------- logical lprn common /kutas/ lprn CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C \ /l\ /j\ / - C \ / \ / \ / - C o| o | | o |o - C \ j|/k\| \ |/k\|l - C \ / \ \ / \ - C o o - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C \ /l\ /j\ / C + C \ / \ / \ / C + C o| o | | o |o C + C \ j|/k\| \ |/k\|l C + C \ / \ \ / \ C + C o o C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC cd write (2,*) 'eello6_graph2: i,',i,' j',j,' k',k,' l',l C AL 7/4/01 s1 would occur in the sixth-order moment, @@@ -6613,18 -6571,18 +6613,18 @@@ c-------------------------------------- double precision vv(2),pizda(2,2),auxmat(2,2),auxvec(2) logical swap CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C /l\ / \ /j\ - C / \ / \ / \ - C /| o |o o| o |\ - C j|/k\| / |/k\|l / - C / \ / / \ / - C / o / o - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C /l\ / \ /j\ C + C / \ / \ / \ C + C /| o |o o| o |\ C + C j|/k\| / |/k\|l / C + C / \ / / \ / C + C / o / o C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C 4/7/01 AL Component s1 was removed, because it pertains to the respective @@@ -6731,18 -6689,18 +6731,18 @@@ c-------------------------------------- & auxvec1(2),auxmat1(2,2) logical swap CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - C - C Parallel Antiparallel - C - C o o - C /l\ / \ /j\ - C / \ / \ / \ - C /| o |o o| o |\ - C \ j|/k\| \ |/k\|l - C \ / \ \ / \ - C o \ o \ - C i i - C + C C + C Parallel Antiparallel C + C C + C o o C + C /l\ / \ /j\ C + C / \ / \ / \ C + C /| o |o o| o |\ C + C \ j|/k\| \ |/k\|l C + C \ / \ \ / \ C + C o \ o \ C + C i i C + C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C 4/7/01 AL Component s1 was removed, because it pertains to the respective diff --combined source/xdrfpdb/src-M/xdrf2pdb-m.F index ad4cb10,b665b89..118148a --- a/source/xdrfpdb/src-M/xdrf2pdb-m.F +++ b/source/xdrfpdb/src-M/xdrf2pdb-m.F @@@ -10,18 -10,17 +10,18 @@@ character*3 sequenc(maxres) character*50 tytul character*8 onethree,cfreq,cntraj,citraj + character*3 licz character*8 ucase external ucase - logical oneletter + logical oneletter, iblnk integer rescode external rescode ifreq=1 - if (iargc().lt.3) then + if (iargc().lt.5) then print '(2a)', - & "Usage: xdrf2pdb-m one/three seqfile cxfile [freq] [pdbfile] ", - & " [ntraj] [itraj]" + & "Usage: xdrf2pdb-m one/three seqfile cxfile ntraj itraj", + & " [pdbfile] [freq]" stop endif call getarg(1,onethree) @@@ -40,7 -39,8 +40,8 @@@ 10 continue nres=i i=0 - do while (.not.iblnk(sequenc(i+1)(1:1))) + c do while (.not.iblnk(sequenc(i+1)(1:1))) + do while (.not.(iblnk(sequenc(i+1)(1:1))==0) ) i=i+1 enddo nres=i @@@ -52,7 -52,8 +53,8 @@@ 11 continue nres=i i=0 - do while (.not.iblnk(sequenc(i+1)(1:1))) + c do while (.not.iblnk(sequenc(i+1)(1:1))) + do while (.not.(iblnk(sequenc(i+1)(1:1))==0)) i=i+1 enddo nres=i @@@ -60,7 -61,7 +62,7 @@@ itype(i)=rescode(i,sequenc(i),0) enddo print *,nres - print '(a3,1x)',(sequenc(i),i=1,nres) + print '(20(a3,1x))',(sequenc(i),i=1,nres) endif call getarg(3,arg) iext = index(arg,'.cx') - 1 @@@ -68,21 -69,28 +70,21 @@@ print *,"Error - not a cx file" stop endif - if (iargc().gt.3) then - call getarg(4,cfreq) - read (cfreq,*) ifreq - endif - if (iargc().gt.4) then - call getarg(5,pdbfile) - else - pdbfile=arg(:iext)//'.pdb' - endif + call getarg(4,cntraj) + read (cntraj,*) ntraj + call getarg(5,citraj) + read (citraj,*) itraj if (iargc().gt.5) then - call getarg(6,cntraj) - read (cntraj,*) ntraj + call getarg(6,pdbfile) else - ntraj=1 + write(licz,'(bz,i3.3)') itraj + pdbfile=arg(:iext)//'_'//licz//'.pdb' endif if (iargc().gt.6) then - call getarg(7,citraj) - read (citraj,*) itraj - else - itraj=1 + call getarg(7,cfreq) + read (cfreq,*) ifreq endif - print *,"ifreq",ifreq," ntraj",ntraj," itraj",itraj +c print *,"ifreq",ifreq," ntraj",ntraj," itraj",itraj open(9,file=pdbfile) nnt = 1 if (itype(1).eq.21) nnt = 2 diff --combined source/xdrfpdb/src/Makefile index e379f40,2fd3c2a..747d0c0 --- a/source/xdrfpdb/src/Makefile +++ b/source/xdrfpdb/src/Makefile @@@ -18,14 -18,14 +18,14 @@@ FC=gfortran -BINDIR = ../bin +BINDIR = ../../../bin #OPT = -fast OPT = FFLAGS = -c ${OPT} - CPPFLAGS = -DLINUX -DUNRES -DMP -DMPI -DSPLITELE -DPROCOR -DNEWUNRES + CPPFLAGS = -DNEWUNRES M4 = m4 M4FILE = underscore.m4 diff --combined source/xdrfpdb/src/xdrf2ang.f index 5714f40,a24d75d..f1c8472 --- a/source/xdrfpdb/src/xdrf2ang.f +++ b/source/xdrfpdb/src/xdrf2ang.f @@@ -14,7 -14,7 +14,11 @@@ character*8 onethree,cfreq character*8 ucase external ucase ++<<<<<<< HEAD + logical oneletter,iblnk ++======= + logical oneletter, iblnk ++>>>>>>> aebadf9023e437f497f92dfcf2303c16f60917c1 integer rescode external rescode @@@ -48,6 -48,7 +52,7 @@@ nres=i i=0 do while (.not.iblnk(sequenc(i+1)(1:1))) + c do while (.not.(iblnk(sequenc(i+1)(1:1)) == 0) ) i=i+1 enddo nres=i @@@ -60,6 -61,7 +65,7 @@@ nres=i i=0 do while (.not.iblnk(sequenc(i+1)(1:1))) + c do while (.not.(iblnk(sequenc(i+1)(1:1)) == 0) ) i=i+1 enddo nres=i diff --combined source/xdrfpdb/src/xdrf2pdb-m.F index edbd0d8,a12edb8..1fbf5af --- a/source/xdrfpdb/src/xdrf2pdb-m.F +++ b/source/xdrfpdb/src/xdrf2pdb-m.F @@@ -10,18 -10,17 +10,22 @@@ character*3 sequenc(maxres) character*50 tytul character*8 onethree,cfreq,cntraj,citraj + character*3 licz character*8 ucase external ucase ++<<<<<<< HEAD + logical oneletter,iblnk ++======= + logical oneletter, iblnk ++>>>>>>> aebadf9023e437f497f92dfcf2303c16f60917c1 integer rescode external rescode ifreq=1 - if (iargc().lt.3) then + if (iargc().lt.5) then print '(2a)', - & "Usage: xdrf2pdb-m one/three seqfile cxfile [freq] [pdbfile] ", - & " [ntraj] [itraj]" + & "Usage: xdrf2pdb-m one/three seqfile cxfile ntraj itraj", + & " [pdbfile] [freq]" stop endif call getarg(1,onethree) @@@ -41,6 -40,7 +45,7 @@@ nres=i i=0 do while (.not.iblnk(sequenc(i+1)(1:1))) + c do while (.not.(iblnk(sequenc(i+1)(1:1)) == 0)) i=i+1 enddo nres=i @@@ -53,6 -53,7 +58,7 @@@ nres=i i=0 do while (.not.iblnk(sequenc(i+1)(1:1))) + c do while (.not.(iblnk(sequenc(i+1)(1:1)) == 0)) i=i+1 enddo nres=i @@@ -60,7 -61,7 +66,7 @@@ itype(i)=rescode(i,sequenc(i),0) enddo print *,nres - print '(a3,1x)',(sequenc(i),i=1,nres) + print '(20(a3,1x))',(sequenc(i),i=1,nres) endif call getarg(3,arg) iext = index(arg,'.cx') - 1 @@@ -68,21 -69,28 +74,21 @@@ print *,"Error - not a cx file" stop endif - if (iargc().gt.3) then - call getarg(4,cfreq) - read (cfreq,*) ifreq - endif - if (iargc().gt.4) then - call getarg(5,pdbfile) - else - pdbfile=arg(:iext)//'.pdb' - endif + call getarg(4,cntraj) + read (cntraj,*) ntraj + call getarg(5,citraj) + read (citraj,*) itraj if (iargc().gt.5) then - call getarg(6,cntraj) - read (cntraj,*) ntraj + call getarg(6,pdbfile) else - ntraj=1 + write(licz,'(bz,i3.3)') itraj + pdbfile=arg(:iext)//'_'//licz//'.pdb' endif if (iargc().gt.6) then - call getarg(7,citraj) - read (citraj,*) itraj - else - itraj=1 + call getarg(7,cfreq) + read (cfreq,*) ifreq endif - print *,"ifreq",ifreq," ntraj",ntraj," itraj",itraj +c print *,"ifreq",ifreq," ntraj",ntraj," itraj",itraj open(9,file=pdbfile) nnt = 1 if (itype(1).eq.21) nnt = 2 @@@ -98,9 -106,11 +104,11 @@@ call xdrffloat(ixdrf, potE, iret) call xdrffloat(ixdrf, uconst, iret) call xdrffloat(ixdrf, t_bath, iret) + print *,"potE",potE," uconst",uconst," t_bath",t_bath #ifdef NEWUNRES call xdrffloat(ixdrf, uconst_back, iret) #endif + print *,"uconst_back",uconst_back call xdrfint(ixdrf, nss, iret) do j=1,nss call xdrfint(ixdrf, ihpb(j), iret) @@@ -113,6 -123,7 +121,7 @@@ prec=10000.0 isize=0 + print *," call xdrf3coord" call xdrf3dfcoord(ixdrf, coord, isize, prec, iret)