Index: source/energy/ecntrl.src =================================================================== --- source/energy/ecntrl.src (revision 579) +++ source/energy/ecntrl.src (working copy) @@ -52,6 +52,7 @@ return endif #endif +#if KEY_BLOCK==1 #if KEY_DOCK==1 if (QDOCK) then #if KEY_DOMDEC==1 @@ -63,6 +64,7 @@ return endif #endif +#endif #if KEY_GENETIC==1 if (nChromos.GT.0) then #if KEY_DOMDEC==1 Index: source/nbonds/enbonda.src =================================================================== --- source/nbonds/enbonda.src (revision 579) +++ source/nbonds/enbonda.src (working copy) @@ -208,7 +208,11 @@ ! REACTANT AND PRODUCT PART CALCULATED BY ! BY SEPARATE ROUTINE (SEE EPERT.SRC) !c +##IF BLOCK IF (TQPSSP.or.QBPSSP) THEN +##ELSE + IF (TQPSSP) THEN +##ENDIF CALL ESSNBA(ENB,EEL,IFRSTA,NATOM,JNB,INBLO,CG,RSCLF,CNBA,CNBB, & MAXROW,IAC,ITC,NATC,IOFF,LELEC,LVDW,LCONS,LSHFT,LVSHFT,LFSWT, & LVFSWT,DX,DY,DZ,X,Y,Z,CTONNB,CTOFNB,EPS,E14FAC, & Index: source/nbonds/enbondg.src =================================================================== --- source/nbonds/enbondg.src (revision 579) +++ source/nbonds/enbondg.src (working copy) @@ -172,7 +172,11 @@ ##IF PERT ! REACTANT AND PRODUCT PART CALCULATED BY ! BY SEPARATE ROUTINE (SEE EPERT.SRC) +##IF BLOCK IF (TQPSSP.or.QBPSSP) THEN !Cc New PBLOCK +##ELSE + IF (TQPSSP) THEN !Cc New PBLOCK +##ENDIF CALL ESSNBG(EEL,ENB,NATOM,NST2,JNBG,INBLOG,CG,RSCLF, & DX,DY,DZ,NGRP,IGPBS,IGPTYP,INB14,IBLO14, & LELEC,LVDW,LCONS,LSHFT,LFSWT, & Index: source/nbonds/pme.src =================================================================== --- source/nbonds/pme.src (revision 579) +++ source/nbonds/pme.src (working copy) @@ -478,6 +478,8 @@ siz_q = 2*nfftdim1*nfftdim2*nfftdim3 #if KEY_BLOCK==1 chfact=one + siz_q = max(2*nfftdim1*nfftdim2*mxyslabs, & + 2*nfftdim1*nfftdim3*mxzslabs) #endif #endif #if KEY_BLOCK==1 @@ -1705,7 +1707,6 @@ endif #endif #endif - #if KEY_BLOCK==1 /*block*/ if (qblock) then DO K2Q = 1, MXZSLABS Index: test/c36test/pme_block.inp =================================================================== --- test/c36test/pme_block.inp (revision 579) +++ test/c36test/pme_block.inp (working copy) @@ -2,6 +2,8 @@ * Test BLOCk module using PME * Author H Kamberaj, 2008 * +if @?lambda eq 0 set lambda = 0.36 +calc onemlambda = 1 - @lambda if ?block .ne. 1 then echo "Test NOT performed." @@ -15,7 +17,7 @@ FASTER ON -prnlev 7 @pnode +!prnlev 7 @pnode ! read topology @@ -33,7 +35,6 @@ read sequ TIP3 216 generate TIP3 warn setup noangle nodihedral - ! -- read coordinates OPEN UNIT 4 FORM READ NAME @0tip216.crd READ COOR CARD UNIT 4 @@ -44,23 +45,255 @@ IMAGE BYRES XCEN 0.0 YCEN 0.0 ZCEN 0.0 SELE ALL END NBONDS IMGFRQ -1 INBFRQ -1 - - ATOM EWALD PMEWALD KAPPA 0.34 FFTX 20 FFTY 20 FFTZ 20 ORDER 6 QCOR 0.0 - ! electrostatic specification -> PMEWALD - FSWITCH CDIE E14FAC 1.0 EPS 1.0 - ! electrostatic - option - specification - VDW VATOM VSHIFT - ! Van der Waals specification - CUTNB 9.0 CTONNB 7.5 CTOFNB 8.0 CUTIM 9.0 - ! Cutoff for non-bounded interactions + ATOM EWALD PMEWALD KAPPA 0.34 - + FFTX 20 FFTY 20 FFTZ 20 ORDER 6 QCOR 0.0 - ! electrostatic specification -> PMEWALD + FSWITCH CDIE E14FAC 1.0 EPS 1.0 - ! electrostatic - option - specification + VDW VATOM Vswitch - ! Van der Waals specification + CUTNB 9.0 CTONNB 7.5 CTOFNB 8.0 CUTIM 9.0 - ! Cutoff for non-bounded interactions WMIN 1.5 WRNMXD 0.5 energy +write psf card name @9/tip.psf +write coor card name @9/tip.crd -BLOCK 1 - CALL 1 select all end - COEF 1 1 0.5 -END +block 3 + call 2 select ires 1:10 end + call 3 select ires 11:20 end + lambda @lambda +end energy +set ewk = ?ewks +set ews = ?ewse +set ewe = ?ewex +set ebase = ?ener +coor force comp +coor init + +read coor card name @9/tip.crd +mini sd nstep 5 nprint 1 + +read coor card name @9/tip.crd +block 3 + lambda 1 +end + +energy +calc ewk = @ewk - @onemlambda * ?ewks +calc ews = @ews - @onemlambda * ?ewse +calc ewe = @ewe - @onemlambda * ?ewex + +calc ebase = @ebase - @onemlambda * ?ener +coor force +coor scale fact @onemlambda +coor diff comp + +coor init +read coor card name @9/tip.crd + +block 3 + lambda 0 +end + +energy +calc ewk = @ewk - @lambda * ?ewks +calc ews = @ews - @lambda * ?ewse +calc ewe = @ewe - @lambda * ?ewex +calc ebase = @ebase - @lambda * ?ener + +if @ebase gt 1e-4 then + echo test one failed - energy + echo ewks @ewk ewse @ews ewex @ewe +else + echo test one passed - energy +endif + +coor force +coor scale fact @lambda +coor diff comp +coor stat +calc err = sqrt ( ?xave * ?xave + ?yave * ?yave + ?zave * ?zave ) +if @err gt 1e-4 then + echo test one failed - forces +else + echo test one passed - forces +endif + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +block + clear +end + +bomlev -1 +delete atom select all end +bomlev 0 +read psf card name @9/tip.psf +read coor card name @9/tip.crd + +replica p nreplica 1 select ires 1:10 end +replica reset +!delete atom select .byres. ( segid p1 .and. resid 1 ) end +print coor select ires 1:10 end +print coor select segid p1 end + +CRYSTAL DEFINE CUBIC 18.856 18.856 18.856 90.0 90.0 90.0 +CRYSTAL BUILD CUTOFF 9.0 NOPERATIONS 0 +IMAGE BYRES XCEN 0.0 YCEN 0.0 ZCEN 0.0 SELE ALL END + +NBONDS IMGFRQ -1 INBFRQ -1 - + ATOM EWALD PMEWALD KAPPA 0.34 - + FFTX 20 FFTY 20 FFTZ 20 ORDER 6 QCOR 0.0 - ! electrostatic specification -> PMEWALD + FSWITCH CDIE E14FAC 1.0 EPS 1.0 - ! electrostatic - option - specification + VDW VATOM Vswitch - ! Van der Waals specification + CUTNB 9.0 CTONNB 7.5 CTOFNB 8.0 CUTIM 9.0 - ! Cutoff for non-bounded interactions + WMIN 1.5 WRNMXD 0.5 + +write psf card name @9/tip.psf +write coor card name @9/tip.crd + +block 3 + call 2 select ires 1:10 end + call 3 select segid p1 end + lambda @lambda +end + +energy +set ebase = ?ener +coor force comp +coor init + +read coor card name @9/tip.crd +block 3 + lambda 1 +end + +energy +calc ebase = @ebase - @onemlambda * ?ener +coor force +coor scale fact @onemlambda +coor diff comp + +coor init +read coor card name @9/tip.crd + +block 3 + lambda 0 +end + +energy +calc ebase = @ebase - @lambda * ?ener + +if @ebase gt 1e-4 then + echo test two failed - energy +else + echo test two passed - energy +endif + +coor force +coor scale fact @lambda +coor diff comp +coor stat +calc err = sqrt ( ?xave * ?xave + ?yave * ?yave + ?zave * ?zave ) +if @err gt 1e-4 then + echo test two failed - forces +else + echo test two passed - forces +endif + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +block + clear +end + +read coor card name @9/tip.crd + +block 3 + call 2 select ires 1:10 end + call 3 select segid p1 end + coeff 1 2 @onemlambda + coeff 2 2 @onemlambda + coeff 1 3 @lambda + coeff 2 3 0 + coeff 3 3 @lambda +end + +energy +set ebase = ?ener +coor force comp +coor init + +read coor card name @9/tip.crd + +block 3 + coeff 1 2 1 + coeff 2 2 1 + coeff 2 3 0 + coeff 1 3 0 + coeff 3 3 0 +end + +energy + +calc ebase = @ebase - @onemlambda * ?ener +coor force +coor scale fact @onemlambda +coor diff comp + +coor init +read coor card name @9/tip.crd + +block 3 + coeff 1 2 0 + coeff 2 2 0 + coeff 2 3 0 + coeff 1 3 1 + coeff 3 3 1 +end + +energy +calc ebase = @ebase - @lambda * ?ener + +if @ebase gt 1e-4 then + echo test three failed - energy +else + echo test three passed - energy +endif + +coor force +coor scale fact @lambda +coor diff comp + +calc err = sqrt ( ?xave * ?xave + ?yave * ?yave + ?zave * ?zave ) +if @err gt 1e-4 then + echo test three failed - forces +else + echo test three passed - forces +endif + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +block + clear +end + +coor init +read coor card name @9/tip.crd + +block 3 + call 2 select ires 1:10 end + call 3 select segid p1 end + coeff 1 2 @onemlambda + coeff 2 2 @onemlambda + coeff 1 3 @lambda + coeff 2 3 0 + coeff 3 3 @lambda +end + +mini sd nstep 5 nprint 1 + STOP