Commit Adam 6/29/2014
authorAdam Liwo <jal47@matrix.chem.cornell.edu>
Sun, 29 Jun 2014 09:35:23 +0000 (05:35 -0400)
committerAdam Liwo <jal47@matrix.chem.cornell.edu>
Sun, 29 Jun 2014 09:35:23 +0000 (05:35 -0400)
110 files changed:
PARAM/scinter_GB_ext.parm
source/cluster/wham/src-restraint/readrtns.F
source/unres/src_MD-M-newcorr/energy_p_new-sep_barrier.F
source/unres/src_MD-M-newcorr/energy_p_new_barrier.F
source/unres/src_MD-M-newcorr/geomout.F
source/wham/src-M-NEWCORR/DIMENSIONS.FREE
source/wham/src-M-NEWCORR/Makefile-ifort-MPICH
source/wham/src-M-NEWCORR/enecalc1.F
source/wham/src-M-NEWCORR/energy_p_new.F
source/wham/src-M-NEWCORR/geomout.F
source/wham/src-M-NEWCORR/parmread.F
source/wham/src-M/Makefile [changed from file to symlink]
source/wham/src-M/tmptmp [deleted file]
source/wham/src-NEWSC-NEWCORR/energy_p_new.F
source/wham/src-NEWSC-NEWCORR/parmread.F
source/wham/src-NEWSC/CMakeLists.txt [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.ALLPARM [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.CHAIN [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.COMPAR [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.CONTACTS1 [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.CONTROL [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.CONTROL.org [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.EMP [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.ENEPS [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.ENERGIES [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.FREE [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.IOUNITS [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.MPI [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.OBCINKA [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.PEPTCONT [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.PROT [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.PROTFILES [changed mode: 0755->0644]
source/wham/src-NEWSC/COMMON.VAR [changed mode: 0755->0644]
source/wham/src-NEWSC/DIMENSIONS [changed mode: 0755->0644]
source/wham/src-NEWSC/DIMENSIONS.COMPAR [changed mode: 0755->0644]
source/wham/src-NEWSC/DIMENSIONS.FREE [changed mode: 0755->0644]
source/wham/src-NEWSC/DIMENSIONS.FREE.old [changed mode: 0755->0644]
source/wham/src-NEWSC/DIMENSIONS.ZSCOPT [changed mode: 0755->0644]
source/wham/src-NEWSC/Makefile [changed from file to symlink]
source/wham/src-NEWSC/Makefile-pgi [changed mode: 0755->0644]
source/wham/src-NEWSC/Makefile1_jump [changed mode: 0755->0644]
source/wham/src-NEWSC/Makefile_MPICH_ifort [changed mode: 0755->0644]
source/wham/src-NEWSC/Makefile_jubl [changed mode: 0755->0644]
source/wham/src-NEWSC/Makefile_jump [changed mode: 0755->0644]
source/wham/src-NEWSC/Makefile_matrix [changed mode: 0755->0644]
source/wham/src-NEWSC/Makefile_matrix_PGI [changed mode: 0755->0644]
source/wham/src-NEWSC/Makefile_matrix_PGI-SCT-oldparm [changed mode: 0755->0644]
source/wham/src-NEWSC/Makefile_matrix_PGI-SCTF-oldparm [changed mode: 0755->0644]
source/wham/src-NEWSC/Makefile_matrix_PGI-oldparm [changed mode: 0755->0644]
source/wham/src-NEWSC/a.sh [changed mode: 0755->0644]
source/wham/src-NEWSC/angnorm.f [changed mode: 0755->0644]
source/wham/src-NEWSC/arcos.f [changed mode: 0755->0644]
source/wham/src-NEWSC/bxread.F [changed mode: 0755->0644]
source/wham/src-NEWSC/cartder.f [changed mode: 0755->0644]
source/wham/src-NEWSC/cartprint.f [changed mode: 0755->0644]
source/wham/src-NEWSC/chainbuild.F [changed mode: 0755->0644]
source/wham/src-NEWSC/chainbuild.f [changed mode: 0755->0644]
source/wham/src-NEWSC/compinfo.c [changed mode: 0755->0644]
source/wham/src-NEWSC/conf_compar.F [changed mode: 0755->0644]
source/wham/src-NEWSC/cont_frag.f [changed mode: 0755->0644]
source/wham/src-NEWSC/contact.f [changed mode: 0755->0644]
source/wham/src-NEWSC/contfunc.f [changed mode: 0755->0644]
source/wham/src-NEWSC/cxread.F [changed mode: 0755->0644]
source/wham/src-NEWSC/cxread.F.org [changed mode: 0755->0644]
source/wham/src-NEWSC/define_pairs.f [changed mode: 0755->0644]
source/wham/src-NEWSC/elecont.f [changed mode: 0755->0644]
source/wham/src-NEWSC/enecalc1.F [changed mode: 0755->0644]
source/wham/src-NEWSC/energy_p_new.F [changed mode: 0755->0644]
source/wham/src-NEWSC/energy_p_new.F.org [changed mode: 0755->0644]
source/wham/src-NEWSC/fitsq.f [changed mode: 0755->0644]
source/wham/src-NEWSC/geomout.F [changed mode: 0755->0644]
source/wham/src-NEWSC/gnmr1.f [changed mode: 0755->0644]
source/wham/src-NEWSC/icant.f [changed mode: 0755->0644]
source/wham/src-NEWSC/initialize_p.F [changed mode: 0755->0644]
source/wham/src-NEWSC/initialize_p.F.org [changed mode: 0755->0644]
source/wham/src-NEWSC/int_from_cart.f [changed mode: 0755->0644]
source/wham/src-NEWSC/intcor.f [changed mode: 0755->0644]
source/wham/src-NEWSC/make_ensemble1.F [changed mode: 0755->0644]
source/wham/src-NEWSC/match_contact.f [changed mode: 0755->0644]
source/wham/src-NEWSC/matmult.f [changed mode: 0755->0644]
source/wham/src-NEWSC/misc.f [changed mode: 0755->0644]
source/wham/src-NEWSC/molread_zs.F [changed mode: 0755->0644]
source/wham/src-NEWSC/mygetenv.F [changed mode: 0755->0644]
source/wham/src-NEWSC/mysort.f [changed mode: 0755->0644]
source/wham/src-NEWSC/odlodc.f [changed mode: 0755->0644]
source/wham/src-NEWSC/openunits.F [changed mode: 0755->0644]
source/wham/src-NEWSC/parmread.F [changed mode: 0755->0644]
source/wham/src-NEWSC/pinorm.f [changed mode: 0755->0644]
source/wham/src-NEWSC/printmat.f [changed mode: 0755->0644]
source/wham/src-NEWSC/proc_cont.f [changed mode: 0755->0644]
source/wham/src-NEWSC/proc_proc.c [changed mode: 0755->0644]
source/wham/src-NEWSC/promienie.f [changed mode: 0755->0644]
source/wham/src-NEWSC/qwolynes.f [changed mode: 0755->0644]
source/wham/src-NEWSC/read_ref_str.F [changed mode: 0755->0644]
source/wham/src-NEWSC/readpdb.f [changed mode: 0755->0644]
source/wham/src-NEWSC/readrtns.F [changed mode: 0755->0644]
source/wham/src-NEWSC/readrtns.F.org [changed mode: 0755->0644]
source/wham/src-NEWSC/readrtns_compar.F [changed mode: 0755->0644]
source/wham/src-NEWSC/rescode.f [changed mode: 0755->0644]
source/wham/src-NEWSC/rmscalc.f [changed mode: 0755->0644]
source/wham/src-NEWSC/secondary.f [changed mode: 0755->0644]
source/wham/src-NEWSC/setup_var.f [changed mode: 0755->0644]
source/wham/src-NEWSC/slices.F [changed mode: 0755->0644]
source/wham/src-NEWSC/store_parm.F [changed mode: 0755->0644]
source/wham/src-NEWSC/timing.F [changed mode: 0755->0644]
source/wham/src-NEWSC/wham_calc1.F [changed mode: 0755->0644]
source/wham/src-NEWSC/wham_calc1.F.safe [changed mode: 0755->0644]
source/wham/src-NEWSC/wham_multparm.F [changed mode: 0755->0644]
source/wham/src-NEWSC/xread.F [changed mode: 0755->0644]
source/wham/src-restraints/enecalc1.F

index bbb6d91..7f3e726 100644 (file)
-           4           6
+4  6
         5.6053537261        6.2200032154        6.2159898496        6.4386968963
         6.2098101231        5.9596374798        5.4310222662        4.8790085257
         5.2638423822        5.4961954124        4.2928124162        4.3582250540
         4.2667755921        3.6813845958        3.5405429647        3.7026985912
         4.7177596156        3.3811992227        3.7936085458        4.5157490585
-        6.2200032154        5.4310222662        5.2638423822        5.2638423822
+        6.2200032154        6.2159898496        5.2638423822        5.2638423822
+
         6.6296746680        6.6717260508        6.8168876945        6.8378960152
         6.3512039986        6.1425192423        5.5200206406        5.4858936024
         4.9382573262        4.2795129166        4.0534857018        4.2086428525
         3.5388086279        3.4209730327        2.7995744193        4.8164268553
         3.8790755071        3.5878262177        4.6457432555        6.6296746680
-        6.1425192423        5.4858936024        5.4858936024
+        6.6717260508        5.4858936024        5.4858936024
+
         6.6424306340        6.9715947250        6.9241225787        6.5291325353
         6.1394821460        5.4415971840        5.2914044780        4.7881880526
         4.1302408718        3.9405275117        3.9022731880        3.6078928145
         3.0809713206        3.0182595342        4.7935507272        3.8711928134
-        3.6826168780        4.4872661030        6.6717260508        6.1394821460
+        3.6826168780        4.4872661030        6.6717260508        6.6424306340
         5.2914044780        5.2914044780
+
         7.3271707934        7.2970176793        7.0494948235        6.2565687662
         5.8133715113        5.8845382769        5.3463553241        4.7146928716
         4.4864793359        4.3092352779        3.6928361281        4.0100566871
         3.6584608489        4.5901676001        4.4681844010        4.6334334282
-        4.9023945082        6.8168876945        6.2565687662        5.8845382769
+        4.9023945082        6.8168876945        6.9715947250        5.8845382769
         5.8845382769
+
         7.0106342493        6.8341607204        6.2047876082        5.5802122247
         5.6716968726        5.2011344932        4.1966522349        4.2383931955
         3.8954073453        3.5679086118        3.1136348127        2.7622561241
         4.5092053374        4.0238412606        3.9799853578        4.8087180377
-        6.8378960152        6.2047876082        5.6716968726        5.6716968726
+        6.8378960152        6.9241225787        5.6716968726        5.6716968726
+
         6.5353606708        5.8844482033        5.1100976261        5.5515360893
         4.9587559238        4.2030790774        4.0351600709        3.6506289806
         3.4640416936        3.1611022087        2.7976192835        4.0422832763
         3.4415952740        3.8620694983        4.5934246009        6.3512039986
-        5.8844482033        5.5515360893        5.5515360893
+        6.5291325353        5.5515360893        5.5515360893
+
         5.2828811325        4.8298466315        4.7575327777        4.7249779042
         3.5656384285        3.5613366567        3.9273045564        3.7664779118
         3.5861699761        3.5523191627        4.6508672463        4.2424308260
-        4.0987727783        4.5079669929        6.1425192423        5.2828811325
+        4.0987727783        4.5079669929        6.1425192423        6.1394821460
         4.7575327777        4.7575327777
-        4.2222645754        4.1627149417        3.9786372270        3.1623319201
+
+        4.2222645754        4.1627149417        3.9786372270        3.1623319201 
         2.9379696734        3.1365985188        2.8025851476        2.6576343487
         2.8733395837        3.8785891655        3.4443068252        3.4405132673
-        4.0915305763        5.5200206406        4.8298466315        4.1627149417
+        4.0915305763        5.5200206406        5.4415971840        4.1627149417
         4.1627149417
+
         4.3860654351        3.6520014167        3.0264937881        2.5680579493
         2.5001857370        2.1393094782        1.4707077389        1.7373181916
         3.1045342752        2.0152329038        1.8196209136        3.6395852546
-        5.4858936024        4.7575327777        4.3860654351        4.3860654351
+        5.4858936024        5.2914044780        4.3860654351        4.3860654351
+
         2.5016557935        2.7879606493        2.1424756816        1.0741544747
-        1.3236438850       -0.2712356678        0.7613312181        2.8627348285
-        1.5002127649       -0.2392577636        3.5381128985        4.9382573262
-        4.7249779042        3.6520014167        3.6520014167
+        1.3236438850        -.2712356678         .7613312181        2.8627348285
+        1.5002127649        -.2392577636        3.5381128985        4.9382573262
+        4.7881880526        3.6520014167        3.6520014167
+
         2.2903847447        2.2466771550        1.5053607856        1.4031797188
-        0.9676209687        1.3075541842        2.8595118604        1.9833053538
-       -0.0085773647        2.9557553666        4.2795129166        3.5656384285
+         .9676209687        1.3075541842        2.8595118604        1.9833053538
+        -.0085773647        2.9557553666        4.2795129166        4.1302408718
         3.0264937881        3.0264937881
-        1.2800038243        0.7689806100        0.9119606366       -0.0744371793
-        0.3669965427        2.4288563200        1.4975482174       -0.2134101897
-        2.9415021479        4.0534857018        3.5613366567        2.5680579493
+
+        1.2800038243         .7689806100         .9119606366        -.0744371793
+         .3669965427        2.4288563200        1.4975482174        -.2134101897
+        2.9415021479        4.0534857018        3.9405275117        2.5680579493
         2.5680579493
-       -0.6792428859        0.4532383239       -0.7590387660       -0.3617034846
-        1.6803275058        0.6775209988       -0.5354837468        2.6208591363
-        4.2086428525        3.9273045564        2.5001857370        2.5001857370
-        0.4136122500       -0.1637152873        0.2212564728        2.1287126020
-        0.3896388275       -0.2354089650        2.3255326077        3.5388086279
-        3.7664779118        2.1393094782        2.1393094782
+
+        -.6792428859         .4532383239        -.7590387660        -.3617034846
+        1.6803275058         .6775209988        -.5354837468        2.6208591363
+        4.2086428525        3.9022731880        2.5001857370        2.5001857370
+
+         .4136122500        -.1637152873         .2212564728        2.1287126020 
+         .3896388275        -.2354089650        2.3255326077        3.5388086279
+        3.6078928145        2.1393094782        2.1393094782
+
        -3.5193531074       -2.0157307929        1.8355926160        2.7489174124
-        2.0098391558        1.7975718667        3.4209730327        3.5861699761
+        2.0098391558        1.7975718667        3.4209730327        3.0809713206
         1.4707077389        1.4707077389
+
        -1.3532688232        2.5504275249        2.8202873790        1.6253609671
-        1.8625091247        2.7995744193        3.5523191627        1.7373181916
+        1.8625091247        2.7995744193        3.0182595342        1.7373181916
         1.7373181916
-        3.7292778697        2.2944436481       -0.0303565255        3.1115776177
-        4.8164268553        4.6508672463        3.1045342752        3.1045342752
-       -0.0827362961       -1.6043113182        2.4439837435        3.8790755071
-        4.2424308260        2.0152329038        2.0152329038
-       -4.3897783280        2.3664634533        3.5878262177        4.0987727783
+
+        3.7292778697        2.2944436481        -.0303565255        3.1115776177
+        4.8164268553        4.7935507272        3.1045342752        3.1045342752
+
+        -.0827362961       -1.6043113182        2.4439837435        3.8790755071
+        3.8711928134        2.0152329038        2.0152329038
+
+       -4.3897783280        2.3664634533        3.5878262177        3.6826168780
         1.8196209136        1.8196209136
-        4.1927969260        4.6457432555        4.5079669929        3.6395852546
+
+        4.1927969260        4.6457432555        4.4872661030        3.6395852546
         3.6395852546
-        6.6296746680        6.1425192423        5.4858936024        5.4858936024
-        5.2828811325        4.7575327777        4.7575327777
+
+        6.6296746680        6.6717260508        5.4858936024        5.4858936024
+
+        6.6424306340        5.2914044780        5.2914044780
+
         4.3860654351        4.3860654351
-        4.3860654351
-        2.9664647229        2.8819636737        3.0210738150        2.8414286152
-        2.4773438660        2.4611943788        2.4653201213        2.4925087371
-        2.5734767751        2.4564026744        2.4847825281        2.4889289233
-        2.5089517645        2.5083338383        2.4220622723        2.2714609770
-        2.4520703089        2.7026129788        4.9272154761        5.1054284230
-        2.8819636737        2.4653201213        2.5734767751        2.5734767751
-        4.2073516165        4.8513972837        2.7848875293        3.5829861634
-        7.8660217576        7.4299209847        1.9625939832        0.7987769569
-        4.0580899681        1.8889021032        3.1987197026        3.2673274538
-        2.6848131904        2.0043027404        6.2446341910        8.1959452095
-       13.4748295858        2.6632376837        0.8699023011        1.0540660014
-        4.8513972837        1.9625939832        4.0580899681        4.0580899681
-        0.9385909298        1.0263274101        1.0835277045        1.0543183886
-        0.7888686996        0.8989305833        1.0039962875        1.2427518128
-        0.8932801724        0.9173928990        1.6157695657        1.4315860373
-        2.0498317879        1.4199615546        0.9933677971        1.4319625600
-       27.4951763288        0.7788025286        0.0103697556        0.0611385674
-        1.0263274101        1.0039962875        0.8932801724        0.8932801724
-        0.0448303346        0.0392831782        0.0854166338        0.0398896619
-        0.0249496569        0.0232410908        0.0861379100       -0.0754794185
-       -0.0266146021       -0.0163429099        0.0572167103       -0.0468608825
-        0.0151048455        0.0084963678        0.0278930397        0.0076922911
-        0.1033536738       -0.0098256036        0.0000000000        0.0000000000
-        0.0392831782        0.0861379100       -0.0266146021       -0.0266146021
+    
+        4.3860654351       
+
+        2.6748060017        2.7338810145        2.9664647229        2.8819636737
+        3.0210738150        2.8414286152        2.4773438660        2.4611943788
+        2.4653201213        2.4925087371        2.5734767751        2.4564026744
+        2.4847825281        2.4889289233        2.5089517645        2.5083338383
+        2.4220622723        2.2714609770        2.4520703089        2.7026129788 
+        2.7338810145        2.9664647229        2.4653201213        2.4653201213 
+
+        4.9272154761        5.1054284230        4.2073516165        4.8513972837
+        2.7848875293        3.5829861634        7.8660217576        7.4299209847
+        1.9625939832         .7987769569        4.0580899681        1.8889021032  
+        3.1987197026        3.2673274538        2.6848131904        2.0043027404
+        6.2446341910        8.1959452095       13.4748295858        2.6632376837
+        5.1054284230        4.2073516165        1.9625939832        1.9625939832
+
+         .8699023011        1.0540660014         .9385909298        1.0263274101
+        1.0835277045        1.0543183886         .7888686996         .8989305833
+        1.0039962875        1.2427518128         .8932801724         .9173928990
+        1.6157695657        1.4315860373        2.0498317879        1.4199615546
+         .9933677971        1.4319625600       27.4951763288         .7788025286
+        1.0540660014         .9385909298        1.0039962875        1.0039962875
+
+         .0103697556         .0611385674         .0448303346         .0392831782
+         .0854166338         .0398896619         .0249496569         .0232410908
+         .0861379100        -.0754794185        -.0266146021        -.0163429099
+         .0572167103        -.0468608825         .0151048455         .0084963678
+         .0278930397         .0076922911         .1033536738        -.0098256036
+         .0611385674         .0448303346         .0861379100         .0861379100
index 7112c47..30f5009 100644 (file)
@@ -861,19 +861,19 @@ c====-------------------------------------------------------------------
 
           model_ki_dist="model"//kic2//".dist"
           model_ki_angle="model"//kic2//".angle"
-        open (ientin,file=model_ki_dist,status='old')
+        open (imol2,file=model_ki_dist,status='old')
         do irec=1,maxdim !petla do czytania wiezow na odleglosc
-          read (ientin,*,end=1401) i, j, odl_temp(i+nnt-1,j+nnt-1,ki),
+          read (imol2,*,end=1401) i, j, odl_temp(i+nnt-1,j+nnt-1,ki),
      &       sigma_odl_temp(i+nnt-1,j+nnt-1,ki)
           odl_temp(j+nnt-1,i+nnt-1,ki)=odl_temp(i+nnt-1,j+nnt-1,ki)
           sigma_odl_temp(j+nnt-1,i+nnt-1,ki)=
      &     sigma_odl_temp(i+nnt-1,j+nnt-1,ki)
         enddo
  1401 continue
-        close (ientin)
-        open (ientin,file=model_ki_angle,status='old')
+        close (imol2)
+        open (imol2,file=model_ki_angle,status='old')
         do irec=1,maxres-3 !petla do czytania wiezow na katy torsyjne
-          read (ientin,*,end=1402) i, j, k,l,dih(ki,i+nnt-1),
+          read (imol2,*,end=1402) i, j, k,l,dih(ki,i+nnt-1),
      &      sigma_dih(ki,i+nnt-1)
           write (iout,*) i, j, k,l,dih(ki,i+nnt-1),
      &      sigma_dih(ki,i+nnt-1)
@@ -881,7 +881,7 @@ c====-------------------------------------------------------------------
           sigma_dih(ki,i+nnt-1)=1.0d0/sigma_dih(ki,i+nnt-1)**2
         enddo
  1402 continue
-        close (ientin)
+        close (imol2)
       enddo
       ii=0
       write (iout,*) "nnt",nnt," nct",nct
index 6592ace..5f9a128 100644 (file)
@@ -1352,7 +1352,8 @@ C-------------------------------------------------------------------------------
       dimension ggg(3),gggp(3),gggm(3),erij(3),dcosb(3),dcosg(3),
      &          erder(3,3),uryg(3,3),urzg(3,3),vryg(3,3),vrzg(3,3)
       double precision acipa(2,2),agg(3,4),aggi(3,4),aggi1(3,4),
-     &    aggj(3,4),aggj1(3,4),a_temp(2,2),muij(4)
+     &    aggj(3,4),aggj1(3,4),a_temp(2,2),muij(4),gmuij1(4),gmuji1(4),
+     &    gmuij2(4),gmuji2(4)
       common /locel/ a_temp,agg,aggi,aggi1,aggj,aggj1,a22,a23,a32,a33,
      &    dxi,dyi,dzi,dx_normi,dy_normi,dz_normi,xmedi,ymedi,zmedi,
      &    num_conti,j1,j2
@@ -1582,6 +1583,14 @@ C
             do l=1,2
               kkk=kkk+1
               muij(kkk)=mu(k,i)*mu(l,j)
+#ifdef NEWCORR
+             gmuij1(kkk)=gtb1(k,i+1)*mu(l,j)
+c             write(iout,*) 'kkk=', gtb1(k,i)*mu(l,j),gtb1(k,i),k,i
+             gmuij2(kkk)=gUb2(k,i)*mu(l,j)
+             gmuji1(kkk)=mu(k,i)*gtb1(l,j+1)
+c             write(iout,*) 'kkk=', gtb1(k,i)*mu(l,j),gtb1(l,j),l,j
+             gmuji2(kkk)=mu(k,i)*gUb2(l,j)
+#endif
             enddo
           enddo  
 cd         write (iout,*) 'EELEC: i',i,' j',j
@@ -1748,7 +1757,40 @@ C Contribution to the local-electrostatic energy coming from the i-j pair
           eel_loc_ij=a22*muij(1)+a23*muij(2)+a32*muij(3)
      &     +a33*muij(4)
 cd          write (iout,*) 'i',i,' j',j,' eel_loc_ij',eel_loc_ij
+C Calculate patrial derivative for theta angle
+#ifdef NEWCORR
+         geel_loc_ij=a22*gmuij1(1)
+     &     +a23*gmuij1(2)
+     &     +a32*gmuij1(3)
+     &     +a33*gmuij1(4)
+c         write(iout,*) "derivative over thatai"
+c         write(iout,*) a22*gmuij1(1), a23*gmuij1(2) ,a32*gmuij1(3),
+c     &   a33*gmuij1(4)
+         gloc(nphi+i,icg)=gloc(nphi+i,icg)+
+     &      geel_loc_ij*wel_loc
+c         write(iout,*) "derivative over thatai-1"
+c         write(iout,*) a22*gmuij2(1), a23*gmuij2(2) ,a32*gmuij2(3),
+c     &   a33*gmuij2(4)
+         geel_loc_ij=a22*gmuij2(1)+a23*gmuij2(2)+a32*gmuij2(3)
+     &     +a33*gmuij2(4)
+         gloc(nphi+i-1,icg)=gloc(nphi+i-1,icg)+
+     &      geel_loc_ij*wel_loc
+         geel_loc_ji=a22*gmuji1(1)+a23*gmuji1(2)+a32*gmuji1(3)
+     &     +a33*gmuji1(4)
+c         write(iout,*) "derivative over thataj"
+c         write(iout,*) a22*gmuji1(1), a23*gmuji1(2) ,a32*gmuji1(3),
+c     &   a33*gmuji1(4)
 
+         gloc(nphi+j,icg)=gloc(nphi+j,icg)+
+     &      geel_loc_ji*wel_loc
+         geel_loc_ji=a22*gmuji2(1)+a23*gmuji2(2)+a32*gmuji2(3)
+     &     +a33*gmuji2(4)
+c         write(iout,*) "derivative over thataj-1"
+c         write(iout,*) a22*gmuji2(1), a23*gmuji2(2) ,a32*gmuji2(3),
+c     &   a33*gmuji2(4)
+         gloc(nphi+j-1,icg)=gloc(nphi+j-1,icg)+
+     &      geel_loc_ji*wel_loc
+#endif
           if (energy_dec) write (iout,'(a6,2i5,0pf7.3)')
      &            'eelloc',i,j,eel_loc_ij
 
index 97c4144..c9140a6 100644 (file)
@@ -710,7 +710,6 @@ c      enddo
         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
@@ -719,7 +718,6 @@ c      enddo
        enddo
       enddo
 #endif
-#undef DEBUG
         do i=1,nres
          do j=1,3
           gloc_scbuf(j,i)=gloc_sc(j,i,icg)
@@ -739,7 +737,6 @@ c      enddo
         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
@@ -748,7 +745,6 @@ c      enddo
        enddo
       enddo
 #endif
-#undef DEBUG
 #ifdef DEBUG
       write (iout,*) "gloc after reduce"
       do i=1,4*nres
@@ -5808,7 +5804,7 @@ c----------------------------------------------------------------------------
       logical lprn
 C Set lprn=.true. for debugging
       lprn=.false.
-c     lprn=.true.
+c      lprn=.true.
       etors=0.0D0
       do i=iphi_start,iphi_end
         if (itype(i-2).eq.ntyp1 .or. itype(i-1).eq.ntyp1 
 C Subtract the constant term
         etors=etors-v0(itori,itori1,iblock)
           if (energy_dec) write (iout,'(a6,i5,0pf7.3)')
-     &         'etor',i,etors_ii-v0(itori,itori1,iblock)
+     &         'etor',i,etors_ii
         if (lprn)
-     &  write (iout,'(2(a3,2x,i3,2x),2i3,6f8.3/26x,6f8.3/)')
+     &  write (iout,'(2(a3,2x,i3,2x),2i3,f10.2,6f8.3/36x,6f8.3/)')
      &  restyp(itype(i-2)),i-2,restyp(itype(i-1)),i-1,itori,itori1,
-     &  (v1(j,itori,itori1,iblock),j=1,6),
-     &  (v2(j,itori,itori1,iblock),j=1,6)
+     &  rad2deg*phii,
+     &  (v1(j,itori,itori1,1),j=1,6),(v2(j,itori,itori1,1),j=1,6)
         gloc(i-3,icg)=gloc(i-3,icg)+wtor*gloci
 c       write (iout,*) 'i=',i,' gloc=',gloc(i-3,icg)
       enddo
index c6a3944..b5d8732 100644 (file)
@@ -206,7 +206,7 @@ c------------------------------------------------------------------------
      & '       Phi','       Dsc','     Alpha','      Omega'
       do i=1,nres
        iti=itype(i)
-        write (iout,'(a3,i4,6f10.3)') restyp(iti),i,vbld(i),
+        write (iout,'(a3,i4,6f10.3)') restyp(iti),i,vbld(i+1),
      &     rad2deg*theta(i),rad2deg*phi(i),vbld(nres+i),rad2deg*alph(i),
      &     rad2deg*omeg(i)
       enddo
index 691d9b2..2ccf317 100644 (file)
@@ -4,7 +4,7 @@
       integer MaxSlice
       parameter (Max_Parm=1)
       parameter (MaxQ=1,MaxQ1=MaxQ+2)
-      parameter(MaxR=1,MaxT_h=32)
+      parameter(MaxR=4,MaxT_h=32)
       parameter(MaxSlice=40)
       integer MaxN
       parameter (MaxN=100)
index 866565f..7abfc9d 100644 (file)
@@ -1,8 +1,8 @@
 INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh
 BIN = /users/adam/unres/bin/wham
 FC= ifort
-#OPT = -mcmodel=medium -O3 -ip -w
-OPT = -mcmodel=medium -g -CA -CB
+OPT = -mcmodel=medium -O3 -ip -w
+#OPT = -mcmodel=medium -g -CA -CB
 FFLAGS = ${OPT} -c -I. -I./include_unres -I$(INSTALL_DIR)/include
 LIBS = -L$(INSTALL_DIR)/lib -lmpich -lpmpich xdrf/libxdrf.a
 
index 8e4fa74..4372c6f 100644 (file)
@@ -33,7 +33,7 @@
       double precision rmsnat,gyrate
       external rmsnat,gyrate
       double precision tole /1.0d-1/
-      integer i,itj,ii,iii,j,k,l,licz
+      integer i,itj,ii,iii,j,k,l,licz,itmp
       integer ir,ib,ipar,iparm
       integer iscor,islice
       real*4 csingle(3,maxres2)
@@ -157,15 +157,23 @@ c     &   " kfac",kfac,"quot",quot," fT",fT
         call etotal(energia(0),fT)
 #ifdef DEBUG
         write (iout,*) "Conformation",i
-          write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
-          write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
+c         write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
+c         write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
         call enerprint(energia(0),fT)
-        write (iout,'(2i5,21f8.2)') i,iparm,(energia(k),k=1,21)
-        write (iout,*) "ftors",ftors
-        call briefout(i,energia(0))
-        temp=1.0d0/(beta_h(ib,ipar)*1.987D-3)
-        write (iout,*) "temp", temp
-        call pdbout(i,temp,energia(0),energia(0),0.0d0,0.0d0)
+c       write (iout,'(2i5,21f8.2)') i,iparm,(energia(k),k=1,21)
+c       write (iout,*) "ftors",ftors
+       itmp=igeom
+       igeom=iout
+       call cartout(i)
+c       call briefout(i,energia(0))
+       igeom=itmp
+       call intout
+c       temp=1.0d0/(beta_h(ib,ipar)*1.987D-3)
+c       write (iout,*) "temp", temp
+       itmp=ipdb
+       ipdb=iout
+       call pdbout(i,temp,energia(0),energia(0),0.0d0,0.0d0)
+       ipdb=itmp
 #endif
         if (energia(0).ge.1.0d20) then
           write (iout,*) "NaNs detected in some of the energy",
@@ -202,10 +210,15 @@ c        call pdbout(ii+1,beta_h(ib,ipar),efree,energia(0),0.0d0,rmsdev)
      &         iii+1,indstart(me1)+iii," T",
      &         1.0d0/(1.987D-3*beta_h(ib,ipar))
 c              call intout
+#ifdef DEBUG
+              itmp=ipdb
+              ipdb=iout
               call pdbout(indstart(me1)+iii,
      & 1.0d0/(1.987D-3*beta_h(ib,ipar)),
      &energia(0),eini,0.0d0,0.0d0)
+              ipdb=itmp
               call enerprint(energia(0),fT)
+#endif
               errmsg_count=errmsg_count+1
               if (errmsg_count.gt.maxerrmsg_count) 
      &          write (iout,*) "Too many warning messages"
index 0dddd7f..917b6a6 100644 (file)
@@ -1718,8 +1718,8 @@ c       write (iout,*) 'theta=', theta(i-1)
           iti1=ntortyp+1
         endif
 cd        write (iout,*) '*******i',i,' iti1',iti
-cd        write (iout,*) 'b1',b1(:,iti)
-cd        write (iout,*) 'b2',b2(:,iti)
+cd        write (iout,*) 'b1',b1(:,i-2)
+cd        write (iout,*) 'b2',b2(:,i-2)
 cd        write (iout,*) 'Ug',Ug(:,:,i-2)
 c        print *,"itilde1 i iti iti1",i,iti,iti1
         if (i .gt. iatel_s+2) then
@@ -4362,7 +4362,6 @@ C-----------------------------------------------------------------------------
       include 'COMMON.IOUNITS'
       include 'COMMON.FFIELD'
       include 'COMMON.TORCNSTR'
-      logical lprn
 C Set lprn=.true. for debugging
       lprn=.false.
 c      lprn=.true.
@@ -4447,10 +4446,11 @@ c------------------------------------------------------------------------------
       include 'COMMON.IOUNITS'
       include 'COMMON.FFIELD'
       include 'COMMON.TORCNSTR'
-      logical lprn
+      logical lprn,energy_dec
 C Set lprn=.true. for debugging
       lprn=.false.
 c      lprn=.true.
+      energy_dec=.false.
       etors=0.0D0
       do i=iphi_start,iphi_end
         if (itype(i-2).eq.ntyp1 .or. itype(i-1).eq.ntyp1
@@ -4465,6 +4465,7 @@ c      lprn=.true.
         itori1=itortyp(itype(i-1))
         phii=phi(i)
         gloci=0.0D0
+        etors_ii=0.0d0
 C Regular cosine and sine terms
         do j=1,nterm(itori,itori1,iblock)
           v1ij=v1(j,itori,itori1,iblock)
@@ -4472,6 +4473,8 @@ C Regular cosine and sine terms
           cosphi=dcos(j*phii)
           sinphi=dsin(j*phii)
           etors=etors+v1ij*cosphi+v2ij*sinphi
+          if (energy_dec) etors_ii=etors_ii+
+     &      v1ij*cosphi+v2ij*sinphi
           gloci=gloci+j*(v2ij*cosphi-v1ij*sinphi)
         enddo
 C Lorentz terms
           pom=vl2ij*cosphi+vl3ij*sinphi
           pom1=1.0d0/(pom*pom+1.0d0)
           etors=etors+vl1ij*pom1
-c          if (energy_dec) etors_ii=etors_ii+
-c     &                vl1ij*pom1
+          if (energy_dec) etors_ii=etors_ii+
+     &                vl1ij*pom1
           pom=-pom*pom1*pom1
           gloci=gloci+vl1ij*(vl3ij*cosphi-vl2ij*sinphi)*pom
         enddo
 C Subtract the constant term
         etors=etors-v0(itori,itori1,iblock)
+        if (energy_dec) write (iout,'(a6,i5,0pf7.3)')
+     &       'etor',i,etors_ii
         if (lprn)
-     &  write (iout,'(2(a3,2x,i3,2x),2i3,6f8.3/26x,6f8.3/)')
+     &  write (iout,'(2(a3,2x,i3,2x),2i3,f10.2,6f8.3/36x,6f8.3/)')
      &  restyp(itype(i-2)),i-2,restyp(itype(i-1)),i-1,itori,itori1,
+     &  rad2deg*phii,
      &  (v1(j,itori,itori1,1),j=1,6),(v2(j,itori,itori1,1),j=1,6)
         gloc(i-3,icg)=gloc(i-3,icg)+wtor*fact*gloci
 c       write (iout,*) 'i=',i,' gloc=',gloc(i-3,icg)
@@ -4550,8 +4556,8 @@ C 6/23/01 Compute double torsional energy
       include 'COMMON.TORCNSTR'
       logical lprn
 C Set lprn=.true. for debugging
-      lprn=.false.
-c     lprn=.true.
+c      lprn=.false.
+      lprn=.true.
       etors_d=0.0D0
       do i=iphi_start,iphi_end-1
         if (itype(i-2).eq.ntyp1.or. itype(i-1).eq.ntyp1
index 0f729e4..28e1fa7 100644 (file)
@@ -156,9 +156,9 @@ c---------------------------------------------------------------------------
       include 'COMMON.SBRIDGE'
       print '(a,i5)',intname,igeom
 #if defined(AIX) || defined(PGI)
-      open (igeom,file=intname,position='append')
+c      open (igeom,file=intname,position='append')
 #else
-      open (igeom,file=intname,access='append')
+c      open (igeom,file=intname,access='append')
 #endif
       iii=igeom
       igeom=iout
@@ -175,9 +175,37 @@ c     if (nvar.gt.nphi+ntheta) then
         write (igeom,200) (rad2deg*alph(i),i=2,nres-1)
         write (igeom,200) (rad2deg*omeg(i),i=2,nres-1)
 c     endif
-      close(igeom)
+c      close(igeom)
   180 format (I5,F12.3,I2,9(1X,2I3))
   190 format (3X,11(1X,2I3))
   200 format (8F10.4)
       return
       end
+c----------------------------------------------------------------
+      subroutine cartout(i)
+      implicit real*8 (a-h,o-z)
+      include 'DIMENSIONS'
+      include 'DIMENSIONS.ZSCOPT'
+      include 'COMMON.CHAIN'
+      include 'COMMON.INTERACT'
+      include 'COMMON.NAMES'
+      include 'COMMON.IOUNITS'
+      include 'COMMON.HEADER'
+      include 'COMMON.SBRIDGE'
+      double precision time
+#if defined(AIX) || defined(PGI)
+c      open(igeom,file=cartname,position="append")
+#else
+c      open(igeom,file=cartname,access="append")
+#endif
+      write (igeom,'("Conformation",i10)') i
+      write (igeom,'(i4,$)')
+     &   nss,(ihpb(j),jhpb(j),j=1,nss)
+      write(igeom,*) 
+      write (igeom,'(8f10.5)')
+     & ((c(k,j),k=1,3),j=1,nres),
+     & ((c(k,j+nres),k=1,3),j=nnt,nct)
+c      close(igeom)
+      return
+      end
+
index 34d68d1..3a6b14c 100644 (file)
@@ -917,7 +917,7 @@ c        write(iout,*) "TU DOCHODZE"
       enddo
 c      lprint=.true.
       if (lprint) then
-      do i=1,nloctyp
+      do i=0,nloctyp-1
         write (iout,*) 'Type',i
         write (iout,*) 'BNEW1(1)'
         write (iout,*) (BNEW1(ii,1,i),ii=1,3)
deleted file mode 100644 (file)
index 11aac6cf3b4f47049e6928b97a7d991fd5ad38fe..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,76 +0,0 @@
-INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh
-BIN = ../bin
-CC = cc
-FC = ifort
-#OPT = -O3 -ip -w
-OPT = -g -CB
-FFLAGS = -c ${OPT} -I. -I./include_unres -I$(INSTALL_DIR)/include
-#FFLAGS = -c -g -C -I. -I./include_unres -I$(INSTALL_DIR)/include
-LIBS = -L$(INSTALL_DIR)/lib -lmpich xdrf/libxdrf.a 
-#LIBS = -L$(INSTALL_DIR)/lib_pgi -lmpich -lpmpich -Vaxlib
-#CPPFLAGS = -DMPI -DLINUX -DUNRES -DMOMENT -DCHECKGRAD -DPGI
-#CPPFLAGS = -DMPI -DLINUX -DUNRES -DCHECKGRAD -DPGI -DMYGETENV
-CPPFLAGS = -DMPI -DLINUX -DUNRES -DSPLITELE -DPROCOR -DPGI -DCRYST_BOND -DCRYST_SC -DCRYST_THETA 
-#CPPFLAGS = -DMPI -DLINUX -DUNRES -DPGI
-#CPPFLAGS = -DMPI -DLINUX -DUNRES
-
-.f.o:
-       ${FC} ${FFLAGS} $*.f
-
-.F.o:
-       ${FC} ${FFLAGS} ${CPPFLAGS} $*.F
-
-all: make_dbase
-
-objects = \
-       wham_multparm.o \
-       bxread.o \
-       xread.o \
-       cxread.o \
-       enecalc1.o \
-       energy_p_new.o \
-       gnmr1.o \
-       initialize_p.o \
-       molread_zs.o \
-       openunits.o \
-       readrtns.o \
-       read_dist_constr.o \
-       arcos.o \
-       cartder.o \
-       cartprint.o \
-       chainbuild.o \
-       geomout.o \
-       icant.o \
-       intcor.o \
-       int_from_cart.o \
-       make_ensemble1.o \
-       matmult.o \
-       misc.o \
-       mygetenv.o \
-       parmread.o \
-       pinorm.o \
-       printmat.o \
-       proc_proc.o \
-       rescode.o \
-       setup_var.o \
-       slices.o \
-       store_parm.o \
-       timing.o \
-       wham_calc1.o
-
-objects_compar = \
-        readrtns_compar.o \
-        readpdb.o permut.o fitsq.o contact.o \
-        elecont.o contfunc.o cont_frag.o conf_compar.o match_contact.o \
-        angnorm.o odlodc.o promienie.o qwolynes.o read_ref_str.o \
-        rmscalc.o secondary.o proc_cont.o define_pairs.o mysort.o
-
-make_dbase: ${objects} ${objects_compar}
-       cc -o compinfo compinfo.c
-       ./compinfo
-       ${FC} -c ${FFLAGS} cinfo.f
-       $(FC) ${OPT} ${objects} ${objects_compar} cinfo.o \
-       ${LIBS} -o ${BIN}/wham_multparm-D-sccor-oldparm
-
-clean:
-       /bin/rm *.o
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..70181571ae803c25b54897fdc075b569de9e9610
--- /dev/null
@@ -0,0 +1 @@
+Makefile-ifort-MPICH
\ No newline at end of file
diff --git a/source/wham/src-M/tmptmp b/source/wham/src-M/tmptmp
deleted file mode 100644 (file)
index fb6f043..0000000
+++ /dev/null
@@ -1 +0,0 @@
-aks255
index 0ee066f..b847313 100644 (file)
           iti1=ntortyp+1
         endif
 cd        write (iout,*) '*******i',i,' iti1',iti
-cd        write (iout,*) 'b1',b1(:,iti)
-cd        write (iout,*) 'b2',b2(:,iti)
+cd        write (iout,*) 'b1',b1(:,i-2)
+cd        write (iout,*) 'b2',b2(:,i-2)
 cd        write (iout,*) 'Ug',Ug(:,:,i-2)
         if (i .gt. iatel_s+2) then
-          call matvec2(Ug(1,1,i-2),b2(1,iti),Ub2(1,i-2))
+          call matvec2(Ug(1,1,i-2),b2(1,i-2),Ub2(1,i-2))
           call matmat2(EE(1,1,iti),Ug(1,1,i-2),EUg(1,1,i-2))
           call matmat2(CC(1,1,iti),Ug(1,1,i-2),CUg(1,1,i-2))
           call matmat2(DD(1,1,iti),Ug(1,1,i-2),DUg(1,1,i-2))
@@ -3430,7 +3430,7 @@ cd        write (iout,*) 'Ug',Ug(:,:,i-2)
             enddo
           enddo
         endif
-        call matvec2(Ugder(1,1,i-2),b2(1,iti),Ub2der(1,i-2))
+        call matvec2(Ugder(1,1,i-2),b2(1,i-2),Ub2der(1,i-2))
         call matmat2(EE(1,1,iti),Ugder(1,1,i-2),EUgder(1,1,i-2))
         call matmat2(CC(1,1,iti1),Ugder(1,1,i-2),CUgder(1,1,i-2))
         call matmat2(DD(1,1,iti),Ugder(1,1,i-2),DUgder(1,1,i-2))
@@ -3446,10 +3446,10 @@ cd        write (iout,*) 'Ug',Ug(:,:,i-2)
           iti1=ntortyp+1
         endif
         do k=1,2
-          mu(k,i-2)=Ub2(k,i-2)+b1(k,iti1)
+          mu(k,i-2)=Ub2(k,i-2)+b1(k,i-1)
         enddo
 C Vectors and matrices dependent on a single virtual-bond dihedral.
-        call matvec2(DD(1,1,iti),b1tilde(1,iti1),auxvec(1))
+        call matvec2(DD(1,1,iti),b1tilde(1,i-1),auxvec(1))
         call matvec2(Ug2(1,1,i-2),auxvec(1),Ug2Db1t(1,i-2)) 
         call matvec2(Ug2der(1,1,i-2),auxvec(1),Ug2Db1tder(1,i-2)) 
         call matvec2(CC(1,1,iti1),Ub2(1,i-2),CUgb2(1,i-2))
@@ -4346,10 +4346,10 @@ cd        call checkint_turn4(i,a_temp,eello_turn4_num)
         call transpose2(Eug(1,1,i+3),e3t(1,1))
         call matmat2(e1t(1,1),a_temp(1,1),e1a(1,1))
         call matvec2(e1a(1,1),Ub2(1,i+3),auxvec(1))
-        s1=scalar2(b1(1,iti2),auxvec(1))
+        s1=scalar2(b1(1,i+2),auxvec(1))
         call matmat2(a_temp(1,1),e3t(1,1),ae3(1,1))
         call matvec2(ae3(1,1),Ub2(1,i+2),auxvec(1)) 
-        s2=scalar2(b1(1,iti1),auxvec(1))
+        s2=scalar2(b1(1,i+1),auxvec(1))
         call matmat2(ae3(1,1),e2t(1,1),ae3e2(1,1))
         call matmat2(ae3e2(1,1),e1t(1,1),pizda(1,1))
         s3=0.5d0*(pizda(1,1)+pizda(2,2))
@@ -4361,14 +4361,14 @@ C Derivatives in gamma(i)
         call transpose2(EUgder(1,1,i+1),e1tder(1,1))
         call matmat2(e1tder(1,1),a_temp(1,1),auxmat(1,1))
         call matvec2(auxmat(1,1),Ub2(1,i+3),auxvec(1))
-        s1=scalar2(b1(1,iti2),auxvec(1))
+        s1=scalar2(b1(1,i+2),auxvec(1))
         call matmat2(ae3e2(1,1),e1tder(1,1),pizda(1,1))
         s3=0.5d0*(pizda(1,1)+pizda(2,2))
         gel_loc_turn4(i)=gel_loc_turn4(i)-(s1+s3)
 C Derivatives in gamma(i+1)
         call transpose2(EUgder(1,1,i+2),e2tder(1,1))
         call matvec2(ae3(1,1),Ub2der(1,i+2),auxvec(1)) 
-        s2=scalar2(b1(1,iti1),auxvec(1))
+        s2=scalar2(b1(1,i+1),auxvec(1))
         call matmat2(ae3(1,1),e2tder(1,1),auxmat(1,1))
         call matmat2(auxmat(1,1),e1t(1,1),pizda(1,1))
         s3=0.5d0*(pizda(1,1)+pizda(2,2))
@@ -4376,10 +4376,10 @@ C Derivatives in gamma(i+1)
 C Derivatives in gamma(i+2)
         call transpose2(EUgder(1,1,i+3),e3tder(1,1))
         call matvec2(e1a(1,1),Ub2der(1,i+3),auxvec(1))
-        s1=scalar2(b1(1,iti2),auxvec(1))
+        s1=scalar2(b1(1,i+2),auxvec(1))
         call matmat2(a_temp(1,1),e3tder(1,1),auxmat(1,1))
         call matvec2(auxmat(1,1),Ub2(1,i+2),auxvec(1)) 
-        s2=scalar2(b1(1,iti1),auxvec(1))
+        s2=scalar2(b1(1,i+1),auxvec(1))
         call matmat2(auxmat(1,1),e2t(1,1),auxmat(1,1))
         call matmat2(auxmat(1,1),e1t(1,1),pizda(1,1))
         s3=0.5d0*(pizda(1,1)+pizda(2,2))
@@ -4394,10 +4394,10 @@ C Derivatives of this turn contributions in DC(i+2)
             a_temp(2,2)=agg(l,4)
             call matmat2(e1t(1,1),a_temp(1,1),e1a(1,1))
             call matvec2(e1a(1,1),Ub2(1,i+3),auxvec(1))
-            s1=scalar2(b1(1,iti2),auxvec(1))
+            s1=scalar2(b1(1,i+2),auxvec(1))
             call matmat2(a_temp(1,1),e3t(1,1),ae3(1,1))
             call matvec2(ae3(1,1),Ub2(1,i+2),auxvec(1)) 
-            s2=scalar2(b1(1,iti1),auxvec(1))
+            s2=scalar2(b1(1,i+1),auxvec(1))
             call matmat2(ae3(1,1),e2t(1,1),ae3e2(1,1))
             call matmat2(ae3e2(1,1),e1t(1,1),pizda(1,1))
             s3=0.5d0*(pizda(1,1)+pizda(2,2))
@@ -4413,10 +4413,10 @@ C Remaining derivatives of this turn contribution
           a_temp(2,2)=aggi(l,4)
           call matmat2(e1t(1,1),a_temp(1,1),e1a(1,1))
           call matvec2(e1a(1,1),Ub2(1,i+3),auxvec(1))
-          s1=scalar2(b1(1,iti2),auxvec(1))
+          s1=scalar2(b1(1,i+2),auxvec(1))
           call matmat2(a_temp(1,1),e3t(1,1),ae3(1,1))
           call matvec2(ae3(1,1),Ub2(1,i+2),auxvec(1)) 
-          s2=scalar2(b1(1,iti1),auxvec(1))
+          s2=scalar2(b1(1,i+1),auxvec(1))
           call matmat2(ae3(1,1),e2t(1,1),ae3e2(1,1))
           call matmat2(ae3e2(1,1),e1t(1,1),pizda(1,1))
           s3=0.5d0*(pizda(1,1)+pizda(2,2))
@@ -4427,10 +4427,10 @@ C Remaining derivatives of this turn contribution
           a_temp(2,2)=aggi1(l,4)
           call matmat2(e1t(1,1),a_temp(1,1),e1a(1,1))
           call matvec2(e1a(1,1),Ub2(1,i+3),auxvec(1))
-          s1=scalar2(b1(1,iti2),auxvec(1))
+          s1=scalar2(b1(1,i+2),auxvec(1))
           call matmat2(a_temp(1,1),e3t(1,1),ae3(1,1))
           call matvec2(ae3(1,1),Ub2(1,i+2),auxvec(1)) 
-          s2=scalar2(b1(1,iti1),auxvec(1))
+          s2=scalar2(b1(1,i+1),auxvec(1))
           call matmat2(ae3(1,1),e2t(1,1),ae3e2(1,1))
           call matmat2(ae3e2(1,1),e1t(1,1),pizda(1,1))
           s3=0.5d0*(pizda(1,1)+pizda(2,2))
@@ -4441,10 +4441,10 @@ C Remaining derivatives of this turn contribution
           a_temp(2,2)=aggj(l,4)
           call matmat2(e1t(1,1),a_temp(1,1),e1a(1,1))
           call matvec2(e1a(1,1),Ub2(1,i+3),auxvec(1))
-          s1=scalar2(b1(1,iti2),auxvec(1))
+          s1=scalar2(b1(1,i+2),auxvec(1))
           call matmat2(a_temp(1,1),e3t(1,1),ae3(1,1))
           call matvec2(ae3(1,1),Ub2(1,i+2),auxvec(1)) 
-          s2=scalar2(b1(1,iti1),auxvec(1))
+          s2=scalar2(b1(1,i+1),auxvec(1))
           call matmat2(ae3(1,1),e2t(1,1),ae3e2(1,1))
           call matmat2(ae3e2(1,1),e1t(1,1),pizda(1,1))
           s3=0.5d0*(pizda(1,1)+pizda(2,2))
@@ -4455,10 +4455,10 @@ C Remaining derivatives of this turn contribution
           a_temp(2,2)=aggj1(l,4)
           call matmat2(e1t(1,1),a_temp(1,1),e1a(1,1))
           call matvec2(e1a(1,1),Ub2(1,i+3),auxvec(1))
-          s1=scalar2(b1(1,iti2),auxvec(1))
+          s1=scalar2(b1(1,i+2),auxvec(1))
           call matmat2(a_temp(1,1),e3t(1,1),ae3(1,1))
           call matvec2(ae3(1,1),Ub2(1,i+2),auxvec(1)) 
-          s2=scalar2(b1(1,iti1),auxvec(1))
+          s2=scalar2(b1(1,i+1),auxvec(1))
           call matmat2(ae3(1,1),e2t(1,1),ae3e2(1,1))
           call matmat2(ae3e2(1,1),e1t(1,1),pizda(1,1))
           s3=0.5d0*(pizda(1,1)+pizda(2,2))
@@ -7013,10 +7013,10 @@ C---------------------------------------------------------------------------
       do iii=1,2
         dipi(iii,1)=Ub2(iii,i)
         dipderi(iii)=Ub2der(iii,i)
-        dipi(iii,2)=b1(iii,iti1)
+        dipi(iii,2)=b1(iii,i+1)
         dipj(iii,1)=Ub2(iii,j)
         dipderj(iii)=Ub2der(iii,j)
-        dipj(iii,2)=b1(iii,itj1)
+        dipj(iii,2)=b1(iii,j+1)
       enddo
       kkk=0
       do iii=1,2
@@ -7195,26 +7195,26 @@ C They are needed only when the fifth- or the sixth-order cumulants are
 C indluded.
         IF (wcorr5.gt.0.0d0 .or. wcorr6.gt.0.0d0) THEN
         call transpose2(AEA(1,1,1),auxmat(1,1))
-        call matvec2(auxmat(1,1),b1(1,iti),AEAb1(1,1,1))
+        call matvec2(auxmat(1,1),b1(1,i),AEAb1(1,1,1))
         call matvec2(auxmat(1,1),Ub2(1,i),AEAb2(1,1,1))
         call matvec2(auxmat(1,1),Ub2der(1,i),AEAb2derg(1,2,1,1))
         call transpose2(AEAderg(1,1,1),auxmat(1,1))
-        call matvec2(auxmat(1,1),b1(1,iti),AEAb1derg(1,1,1))
+        call matvec2(auxmat(1,1),b1(1,i),AEAb1derg(1,1,1))
         call matvec2(auxmat(1,1),Ub2(1,i),AEAb2derg(1,1,1,1))
-        call matvec2(AEA(1,1,1),b1(1,itk1),AEAb1(1,2,1))
-        call matvec2(AEAderg(1,1,1),b1(1,itk1),AEAb1derg(1,2,1))
+        call matvec2(AEA(1,1,1),b1(1,k+1),AEAb1(1,2,1))
+        call matvec2(AEAderg(1,1,1),b1(1,k+1),AEAb1derg(1,2,1))
         call matvec2(AEA(1,1,1),Ub2(1,k+1),AEAb2(1,2,1))
         call matvec2(AEAderg(1,1,1),Ub2(1,k+1),AEAb2derg(1,1,2,1))
         call matvec2(AEA(1,1,1),Ub2der(1,k+1),AEAb2derg(1,2,2,1))
         call transpose2(AEA(1,1,2),auxmat(1,1))
-        call matvec2(auxmat(1,1),b1(1,itj),AEAb1(1,1,2))
+        call matvec2(auxmat(1,1),b1(1,j),AEAb1(1,1,2))
         call matvec2(auxmat(1,1),Ub2(1,j),AEAb2(1,1,2))
         call matvec2(auxmat(1,1),Ub2der(1,j),AEAb2derg(1,2,1,2))
         call transpose2(AEAderg(1,1,2),auxmat(1,1))
-        call matvec2(auxmat(1,1),b1(1,itj),AEAb1derg(1,1,2))
+        call matvec2(auxmat(1,1),b1(1,j),AEAb1derg(1,1,2))
         call matvec2(auxmat(1,1),Ub2(1,j),AEAb2derg(1,1,1,2))
-        call matvec2(AEA(1,1,2),b1(1,itl1),AEAb1(1,2,2))
-        call matvec2(AEAderg(1,1,2),b1(1,itl1),AEAb1derg(1,2,2))
+        call matvec2(AEA(1,1,2),b1(1,l+1),AEAb1(1,2,2))
+        call matvec2(AEAderg(1,1,2),b1(1,l+1),AEAb1derg(1,2,2))
         call matvec2(AEA(1,1,2),Ub2(1,l+1),AEAb2(1,2,2))
         call matvec2(AEAderg(1,1,2),Ub2(1,l+1),AEAb2derg(1,1,2,2))
         call matvec2(AEA(1,1,2),Ub2der(1,l+1),AEAb2derg(1,2,2,2))
@@ -7223,20 +7223,20 @@ C Calculate the Cartesian derivatives of the vectors.
           do kkk=1,5
             do lll=1,3
               call transpose2(AEAderx(1,1,lll,kkk,iii,1),auxmat(1,1))
-              call matvec2(auxmat(1,1),b1(1,iti),
+              call matvec2(auxmat(1,1),b1(1,i),
      &          AEAb1derx(1,lll,kkk,iii,1,1))
               call matvec2(auxmat(1,1),Ub2(1,i),
      &          AEAb2derx(1,lll,kkk,iii,1,1))
-              call matvec2(AEAderx(1,1,lll,kkk,iii,1),b1(1,itk1),
+              call matvec2(AEAderx(1,1,lll,kkk,iii,1),b1(1,k+1),
      &          AEAb1derx(1,lll,kkk,iii,2,1))
               call matvec2(AEAderx(1,1,lll,kkk,iii,1),Ub2(1,k+1),
      &          AEAb2derx(1,lll,kkk,iii,2,1))
               call transpose2(AEAderx(1,1,lll,kkk,iii,2),auxmat(1,1))
-              call matvec2(auxmat(1,1),b1(1,itj),
+              call matvec2(auxmat(1,1),b1(1,j),
      &          AEAb1derx(1,lll,kkk,iii,1,2))
               call matvec2(auxmat(1,1),Ub2(1,j),
      &          AEAb2derx(1,lll,kkk,iii,1,2))
-              call matvec2(AEAderx(1,1,lll,kkk,iii,2),b1(1,itl1),
+              call matvec2(AEAderx(1,1,lll,kkk,iii,2),b1(1,l+1),
      &          AEAb1derx(1,lll,kkk,iii,2,2))
               call matvec2(AEAderx(1,1,lll,kkk,iii,2),Ub2(1,l+1),
      &          AEAb2derx(1,lll,kkk,iii,2,2))
@@ -7333,26 +7333,26 @@ C indluded.
         IF (wcorr5.gt.0.0d0 .or. wcorr6.gt.0.0d0 .or.
      &    (wturn6.gt.0.0d0 .and. j.eq.i+4 .and. l.eq.i+3)) THEN
         call transpose2(AEA(1,1,1),auxmat(1,1))
-        call matvec2(auxmat(1,1),b1(1,iti),AEAb1(1,1,1))
+        call matvec2(auxmat(1,1),b1(1,i),AEAb1(1,1,1))
         call matvec2(auxmat(1,1),Ub2(1,i),AEAb2(1,1,1))
         call matvec2(auxmat(1,1),Ub2der(1,i),AEAb2derg(1,2,1,1))
         call transpose2(AEAderg(1,1,1),auxmat(1,1))
-        call matvec2(auxmat(1,1),b1(1,iti),AEAb1derg(1,1,1))
+        call matvec2(auxmat(1,1),b1(1,i),AEAb1derg(1,1,1))
         call matvec2(auxmat(1,1),Ub2(1,i),AEAb2derg(1,1,1,1))
-        call matvec2(AEA(1,1,1),b1(1,itk1),AEAb1(1,2,1))
-        call matvec2(AEAderg(1,1,1),b1(1,itk1),AEAb1derg(1,2,1))
+        call matvec2(AEA(1,1,1),b1(1,k+1),AEAb1(1,2,1))
+        call matvec2(AEAderg(1,1,1),b1(1,k+1),AEAb1derg(1,2,1))
         call matvec2(AEA(1,1,1),Ub2(1,k+1),AEAb2(1,2,1))
         call matvec2(AEAderg(1,1,1),Ub2(1,k+1),AEAb2derg(1,1,2,1))
         call matvec2(AEA(1,1,1),Ub2der(1,k+1),AEAb2derg(1,2,2,1))
         call transpose2(AEA(1,1,2),auxmat(1,1))
-        call matvec2(auxmat(1,1),b1(1,itj1),AEAb1(1,1,2))
+        call matvec2(auxmat(1,1),b1(1,j+1),AEAb1(1,1,2))
         call matvec2(auxmat(1,1),Ub2(1,l),AEAb2(1,1,2))
         call matvec2(auxmat(1,1),Ub2der(1,l),AEAb2derg(1,2,1,2))
         call transpose2(AEAderg(1,1,2),auxmat(1,1))
-        call matvec2(auxmat(1,1),b1(1,itl),AEAb1(1,1,2))
+        call matvec2(auxmat(1,1),b1(1,l),AEAb1(1,1,2))
         call matvec2(auxmat(1,1),Ub2(1,l),AEAb2derg(1,1,1,2))
-        call matvec2(AEA(1,1,2),b1(1,itj1),AEAb1(1,2,2))
-        call matvec2(AEAderg(1,1,2),b1(1,itj1),AEAb1derg(1,2,2))
+        call matvec2(AEA(1,1,2),b1(1,j+1),AEAb1(1,2,2))
+        call matvec2(AEAderg(1,1,2),b1(1,j+1),AEAb1derg(1,2,2))
         call matvec2(AEA(1,1,2),Ub2(1,j),AEAb2(1,2,2))
         call matvec2(AEAderg(1,1,2),Ub2(1,j),AEAb2derg(1,1,2,2))
         call matvec2(AEA(1,1,2),Ub2der(1,j),AEAb2derg(1,2,2,2))
@@ -7361,20 +7361,20 @@ C Calculate the Cartesian derivatives of the vectors.
           do kkk=1,5
             do lll=1,3
               call transpose2(AEAderx(1,1,lll,kkk,iii,1),auxmat(1,1))
-              call matvec2(auxmat(1,1),b1(1,iti),
+              call matvec2(auxmat(1,1),b1(1,i),
      &          AEAb1derx(1,lll,kkk,iii,1,1))
               call matvec2(auxmat(1,1),Ub2(1,i),
      &          AEAb2derx(1,lll,kkk,iii,1,1))
-              call matvec2(AEAderx(1,1,lll,kkk,iii,1),b1(1,itk1),
+              call matvec2(AEAderx(1,1,lll,kkk,iii,1),b1(1,k+1),
      &          AEAb1derx(1,lll,kkk,iii,2,1))
               call matvec2(AEAderx(1,1,lll,kkk,iii,1),Ub2(1,k+1),
      &          AEAb2derx(1,lll,kkk,iii,2,1))
               call transpose2(AEAderx(1,1,lll,kkk,iii,2),auxmat(1,1))
-              call matvec2(auxmat(1,1),b1(1,itl),
+              call matvec2(auxmat(1,1),b1(1,l),
      &          AEAb1derx(1,lll,kkk,iii,1,2))
               call matvec2(auxmat(1,1),Ub2(1,l),
      &          AEAb2derx(1,lll,kkk,iii,1,2))
-              call matvec2(AEAderx(1,1,lll,kkk,iii,2),b1(1,itj1),
+              call matvec2(AEAderx(1,1,lll,kkk,iii,2),b1(1,j+1),
      &          AEAb1derx(1,lll,kkk,iii,2,2))
               call matvec2(AEAderx(1,1,lll,kkk,iii,2),Ub2(1,j),
      &          AEAb2derx(1,lll,kkk,iii,2,2))
@@ -7679,7 +7679,7 @@ C Contribution from graph II
       call matmat2(auxmat(1,1),AEA(1,1,1),pizda(1,1))
       vv(1)=pizda(1,1)+pizda(2,2)
       vv(2)=pizda(2,1)-pizda(1,2)
-      eello5_2=scalar2(AEAb1(1,2,1),b1(1,itk))
+      eello5_2=scalar2(AEAb1(1,2,1),b1(1,k))
      & -0.5d0*scalar2(vv(1),Ctobr(1,k))
       if (calc_grad) then
 C Explicit gradient in virtual-dihedral angles.
@@ -7690,11 +7690,11 @@ C Explicit gradient in virtual-dihedral angles.
       vv(2)=pizda(2,1)-pizda(1,2)
       if (l.eq.j+1) then
         g_corr5_loc(l-1)=g_corr5_loc(l-1)
-     &   +ekont*(scalar2(AEAb1derg(1,2,1),b1(1,itk))
+     &   +ekont*(scalar2(AEAb1derg(1,2,1),b1(1,k))
      &   -0.5d0*scalar2(vv(1),Ctobr(1,k)))
       else
         g_corr5_loc(j-1)=g_corr5_loc(j-1)
-     &   +ekont*(scalar2(AEAb1derg(1,2,1),b1(1,itk))
+     &   +ekont*(scalar2(AEAb1derg(1,2,1),b1(1,k))
      &   -0.5d0*scalar2(vv(1),Ctobr(1,k)))
       endif
 C Cartesian gradient
@@ -7706,7 +7706,7 @@ C Cartesian gradient
             vv(1)=pizda(1,1)+pizda(2,2)
             vv(2)=pizda(2,1)-pizda(1,2)
             derx(lll,kkk,iii)=derx(lll,kkk,iii)
-     &       +scalar2(AEAb1derx(1,lll,kkk,iii,2,1),b1(1,itk))
+     &       +scalar2(AEAb1derx(1,lll,kkk,iii,2,1),b1(1,k))
      &       -0.5d0*scalar2(vv(1),Ctobr(1,k))
           enddo
         enddo
@@ -7764,7 +7764,7 @@ cd1110    continue
         call matmat2(auxmat(1,1),AEA(1,1,2),pizda(1,1))
         vv(1)=pizda(1,1)+pizda(2,2)
         vv(2)=pizda(2,1)-pizda(1,2)
-        eello5_4=scalar2(AEAb1(1,2,2),b1(1,itl))
+        eello5_4=scalar2(AEAb1(1,2,2),b1(1,l))
      &   -0.5d0*scalar2(vv(1),Ctobr(1,l))
         if (calc_grad) then
 C Explicit gradient in virtual-dihedral angles.
@@ -7774,7 +7774,7 @@ C Explicit gradient in virtual-dihedral angles.
         vv(1)=pizda(1,1)+pizda(2,2)
         vv(2)=pizda(2,1)-pizda(1,2)
         g_corr5_loc(k-1)=g_corr5_loc(k-1)
-     &   +ekont*(scalar2(AEAb1derg(1,2,2),b1(1,itl))
+     &   +ekont*(scalar2(AEAb1derg(1,2,2),b1(1,l))
      &   -0.5d0*scalar2(vv(1),Ctobr(1,l)))
 C Cartesian gradient
         do iii=1,2
@@ -7785,7 +7785,7 @@ C Cartesian gradient
               vv(1)=pizda(1,1)+pizda(2,2)
               vv(2)=pizda(2,1)-pizda(1,2)
               derx(lll,kkk,iii)=derx(lll,kkk,iii)
-     &         +scalar2(AEAb1derx(1,lll,kkk,iii,2,2),b1(1,itl))
+     &         +scalar2(AEAb1derx(1,lll,kkk,iii,2,2),b1(1,l))
      &         -0.5d0*scalar2(vv(1),Ctobr(1,l))
             enddo
           enddo
@@ -7841,7 +7841,7 @@ C Contribution from graph IV
         call matmat2(auxmat(1,1),AEA(1,1,2),pizda(1,1))
         vv(1)=pizda(1,1)+pizda(2,2)
         vv(2)=pizda(2,1)-pizda(1,2)
-        eello5_4=scalar2(AEAb1(1,2,2),b1(1,itj))
+        eello5_4=scalar2(AEAb1(1,2,2),b1(1,j))
      &   -0.5d0*scalar2(vv(1),Ctobr(1,j))
         if (calc_grad) then
 C Explicit gradient in virtual-dihedral angles.
@@ -7851,7 +7851,7 @@ C Explicit gradient in virtual-dihedral angles.
         vv(1)=pizda(1,1)+pizda(2,2)
         vv(2)=pizda(2,1)-pizda(1,2)
         g_corr5_loc(k-1)=g_corr5_loc(k-1)
-     &   +ekont*(scalar2(AEAb1derg(1,2,2),b1(1,itj))
+     &   +ekont*(scalar2(AEAb1derg(1,2,2),b1(1,j))
      &   -0.5d0*scalar2(vv(1),Ctobr(1,j)))
 C Cartesian gradient
         do iii=1,2
@@ -7862,7 +7862,7 @@ C Cartesian gradient
               vv(1)=pizda(1,1)+pizda(2,2)
               vv(2)=pizda(2,1)-pizda(1,2)
               derx(lll,kkk,3-iii)=derx(lll,kkk,3-iii)
-     &         +scalar2(AEAb1derx(1,lll,kkk,iii,2,2),b1(1,itj))
+     &         +scalar2(AEAb1derx(1,lll,kkk,iii,2,2),b1(1,j))
      &         -0.5d0*scalar2(vv(1),Ctobr(1,j))
             enddo
           enddo
@@ -8127,8 +8127,8 @@ CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
       vv1(1)=pizda1(1,1)-pizda1(2,2)
       vv1(2)=pizda1(1,2)+pizda1(2,1)
       s4=0.5d0*scalar2(vv1(1),Dtobr2(1,i))
-      vv(1)=AEAb1(1,2,imat)*b1(1,itk)-AEAb1(2,2,imat)*b1(2,itk)
-      vv(2)=AEAb1(1,2,imat)*b1(2,itk)+AEAb1(2,2,imat)*b1(1,itk)
+      vv(1)=AEAb1(1,2,imat)*b1(1,k)-AEAb1(2,2,imat)*b1(2,k)
+      vv(2)=AEAb1(1,2,imat)*b1(2,k)+AEAb1(2,2,imat)*b1(1,k)
       s5=scalar2(vv(1),Dtobr2(1,i))
 cd      write (2,*) 's1',s1,' s2',s2,' s3',s3,' s4', s4,' s5',s5
       eello6_graph1=-0.5d0*(s1+s2+s3+s4+s5)
@@ -8142,8 +8142,8 @@ cd      write (2,*) 's1',s1,' s2',s2,' s3',s3,' s4', s4,' s5',s5
       call matmat2(AEAderg(1,1,imat),auxmat(1,1),pizda1(1,1))
       vv1(1)=pizda1(1,1)-pizda1(2,2)
       vv1(2)=pizda1(1,2)+pizda1(2,1)
-      vv(1)=AEAb1derg(1,2,imat)*b1(1,itk)-AEAb1derg(2,2,imat)*b1(2,itk)
-      vv(2)=AEAb1derg(1,2,imat)*b1(2,itk)+AEAb1derg(2,2,imat)*b1(1,itk)
+      vv(1)=AEAb1derg(1,2,imat)*b1(1,k)-AEAb1derg(2,2,imat)*b1(2,k)
+      vv(2)=AEAb1derg(1,2,imat)*b1(2,k)+AEAb1derg(2,2,imat)*b1(1,k)
       if (l.eq.j+1) then
         g_corr6_loc(l-1)=g_corr6_loc(l-1)
      & +ekont*(-0.5d0*(scalar2(AEAb1derg(1,2,imat),CUgb2(1,i))
@@ -8182,10 +8182,10 @@ cd      write (2,*) 's1',s1,' s2',s2,' s3',s3,' s4', s4,' s5',s5
             vv1(1)=pizda1(1,1)-pizda1(2,2)
             vv1(2)=pizda1(1,2)+pizda1(2,1)
             s4=0.5d0*scalar2(vv1(1),Dtobr2(1,i))
-            vv(1)=AEAb1derx(1,lll,kkk,iii,2,imat)*b1(1,itk)
-     &       -AEAb1derx(2,lll,kkk,iii,2,imat)*b1(2,itk)
-            vv(2)=AEAb1derx(1,lll,kkk,iii,2,imat)*b1(2,itk)
-     &       +AEAb1derx(2,lll,kkk,iii,2,imat)*b1(1,itk)
+            vv(1)=AEAb1derx(1,lll,kkk,iii,2,imat)*b1(1,k)
+     &       -AEAb1derx(2,lll,kkk,iii,2,imat)*b1(2,k)
+            vv(2)=AEAb1derx(1,lll,kkk,iii,2,imat)*b1(2,k)
+     &       +AEAb1derx(2,lll,kkk,iii,2,imat)*b1(1,k)
             s5=scalar2(vv(1),Dtobr2(1,i))
             derx(lll,kkk,ind)=derx(lll,kkk,ind)-0.5d0*(s1+s2+s3+s4+s5)
           enddo
@@ -8428,10 +8428,10 @@ C           energy moment and not to the cluster cumulant.
 #ifdef MOMENT
       s1=dip(4,jj,i)*dip(4,kk,k)
 #endif
-      call matvec2(AECA(1,1,1),b1(1,itk1),auxvec(1))
-      s2=0.5d0*scalar2(b1(1,itk),auxvec(1))
-      call matvec2(AECA(1,1,2),b1(1,itl1),auxvec(1))
-      s3=0.5d0*scalar2(b1(1,itj1),auxvec(1))
+      call matvec2(AECA(1,1,1),b1(1,k+1),auxvec(1))
+      s2=0.5d0*scalar2(b1(1,k),auxvec(1))
+      call matvec2(AECA(1,1,2),b1(1,l+1),auxvec(1))
+      s3=0.5d0*scalar2(b1(1,j+1),auxvec(1))
       call transpose2(EE(1,1,itk),auxmat(1,1))
       call matmat2(auxmat(1,1),AECA(1,1,1),pizda(1,1))
       vv(1)=pizda(1,1)+pizda(2,2)
@@ -8446,13 +8446,13 @@ cd      write (2,*) 'eello6_graph3:','s1',s1,' s2',s2,' s3',s3,' s4',s4
 c      eello6_graph3=-s4
       if (.not. calc_grad) return
 C Derivatives in gamma(k-1)
-      call matvec2(AECAderg(1,1,2),b1(1,itl1),auxvec(1))
-      s3=0.5d0*scalar2(b1(1,itj1),auxvec(1))
+      call matvec2(AECAderg(1,1,2),b1(1,l+1),auxvec(1))
+      s3=0.5d0*scalar2(b1(1,j+1),auxvec(1))
       s4=-0.25d0*scalar2(vv(1),Ctobrder(1,k))
       g_corr6_loc(k-1)=g_corr6_loc(k-1)-ekont*(s3+s4)
 C Derivatives in gamma(l-1)
-      call matvec2(AECAderg(1,1,1),b1(1,itk1),auxvec(1))
-      s2=0.5d0*scalar2(b1(1,itk),auxvec(1))
+      call matvec2(AECAderg(1,1,1),b1(1,k+1),auxvec(1))
+      s2=0.5d0*scalar2(b1(1,k),auxvec(1))
       call matmat2(auxmat(1,1),AECAderg(1,1,1),pizda(1,1))
       vv(1)=pizda(1,1)+pizda(2,2)
       vv(2)=pizda(2,1)-pizda(1,2)
@@ -8469,12 +8469,12 @@ C Cartesian derivatives.
               s1=dip(4,jj,i)*dipderx(lll,kkk,4,kk,k)
             endif
 #endif
-            call matvec2(AECAderx(1,1,lll,kkk,iii,1),b1(1,itk1),
+            call matvec2(AECAderx(1,1,lll,kkk,iii,1),b1(1,k+1),
      &        auxvec(1))
-            s2=0.5d0*scalar2(b1(1,itk),auxvec(1))
-            call matvec2(AECAderx(1,1,lll,kkk,iii,2),b1(1,itl1),
+            s2=0.5d0*scalar2(b1(1,k),auxvec(1))
+            call matvec2(AECAderx(1,1,lll,kkk,iii,2),b1(1,l+1),
      &        auxvec(1))
-            s3=0.5d0*scalar2(b1(1,itj1),auxvec(1))
+            s3=0.5d0*scalar2(b1(1,j+1),auxvec(1))
             call matmat2(auxmat(1,1),AECAderx(1,1,lll,kkk,iii,1),
      &        pizda(1,1))
             vv(1)=pizda(1,1)+pizda(2,2)
@@ -8563,11 +8563,11 @@ cd     & ' itl',itl,' itl1',itl1
       call matvec2(AECA(1,1,imat),Ub2(1,k),auxvec(1))
       s2=0.5d0*scalar2(Ub2(1,i),auxvec(1))
       if (j.eq.l+1) then
-        call matvec2(ADtEA1(1,1,3-imat),b1(1,itj1),auxvec1(1))
-        s3=-0.5d0*scalar2(b1(1,itj),auxvec1(1))
+        call matvec2(ADtEA1(1,1,3-imat),b1(1,j+1),auxvec1(1))
+        s3=-0.5d0*scalar2(b1(1,j),auxvec1(1))
       else
-        call matvec2(ADtEA1(1,1,3-imat),b1(1,itl1),auxvec1(1))
-        s3=-0.5d0*scalar2(b1(1,itl),auxvec1(1))
+        call matvec2(ADtEA1(1,1,3-imat),b1(1,l+1),auxvec1(1))
+        s3=-0.5d0*scalar2(b1(1,l),auxvec1(1))
       endif
       call transpose2(EUg(1,1,k),auxmat(1,1))
       call matmat2(AECA(1,1,imat),auxmat(1,1),pizda(1,1))
@@ -8592,11 +8592,11 @@ C Derivatives in gamma(i-1)
 #endif
         s2=0.5d0*scalar2(Ub2der(1,i),auxvec(1))
         if (j.eq.l+1) then
-          call matvec2(ADtEA1derg(1,1,1,3-imat),b1(1,itj1),auxvec1(1))
-          s3=-0.5d0*scalar2(b1(1,itj),auxvec1(1))
+          call matvec2(ADtEA1derg(1,1,1,3-imat),b1(1,j+1),auxvec1(1))
+          s3=-0.5d0*scalar2(b1(1,j),auxvec1(1))
         else
-          call matvec2(ADtEA1derg(1,1,1,3-imat),b1(1,itl1),auxvec1(1))
-          s3=-0.5d0*scalar2(b1(1,itl),auxvec1(1))
+          call matvec2(ADtEA1derg(1,1,1,3-imat),b1(1,l+1),auxvec1(1))
+          s3=-0.5d0*scalar2(b1(1,l),auxvec1(1))
         endif
         s4=0.25d0*scalar2(vv(1),Dtobr2der(1,i))
         if (wturn6.gt.0.0d0 .and. k.eq.l+4 .and. i.eq.j+2) then
@@ -8625,11 +8625,11 @@ C Derivatives in gamma(k-1)
       call matvec2(AECA(1,1,imat),Ub2der(1,k),auxvec1(1))
       s2=0.5d0*scalar2(Ub2(1,i),auxvec1(1))
       if (j.eq.l+1) then
-        call matvec2(ADtEA1derg(1,1,2,3-imat),b1(1,itj1),auxvec1(1))
-        s3=-0.5d0*scalar2(b1(1,itj),auxvec1(1))
+        call matvec2(ADtEA1derg(1,1,2,3-imat),b1(1,j+1),auxvec1(1))
+        s3=-0.5d0*scalar2(b1(1,j),auxvec1(1))
       else
-        call matvec2(ADtEA1derg(1,1,2,3-imat),b1(1,itl1),auxvec1(1))
-        s3=-0.5d0*scalar2(b1(1,itl),auxvec1(1))
+        call matvec2(ADtEA1derg(1,1,2,3-imat),b1(1,l+1),auxvec1(1))
+        s3=-0.5d0*scalar2(b1(1,tl),auxvec1(1))
       endif
       call transpose2(EUgder(1,1,k),auxmat1(1,1))
       call matmat2(AECA(1,1,imat),auxmat1(1,1),pizda(1,1))
@@ -8695,12 +8695,12 @@ C Cartesian derivatives.
             s2=0.5d0*scalar2(Ub2(1,i),auxvec(1))
             if (j.eq.l+1) then
               call matvec2(ADtEA1derx(1,1,lll,kkk,iii,3-imat),
-     &          b1(1,itj1),auxvec(1))
-              s3=-0.5d0*scalar2(b1(1,itj),auxvec(1))
+     &          b1(1,j+1),auxvec(1))
+              s3=-0.5d0*scalar2(b1(1,j),auxvec(1))
             else
               call matvec2(ADtEA1derx(1,1,lll,kkk,iii,3-imat),
-     &          b1(1,itl1),auxvec(1))
-              s3=-0.5d0*scalar2(b1(1,itl),auxvec(1))
+     &          b1(1,l+1),auxvec(1))
+              s3=-0.5d0*scalar2(b1(1,l),auxvec(1))
             endif
             call matmat2(AECAderx(1,1,lll,kkk,iii,imat),auxmat(1,1),
      &        pizda(1,1))
@@ -8797,14 +8797,14 @@ cd      write (2,*) 'eello6_5',eello6_5
 #ifdef MOMENT
       call transpose2(AEA(1,1,1),auxmat(1,1))
       call matmat2(EUg(1,1,i+1),auxmat(1,1),auxmat(1,1))
-      ss1=scalar2(Ub2(1,i+2),b1(1,itl))
+      ss1=scalar2(Ub2(1,i+2),b1(1,l))
       s1 = (auxmat(1,1)+auxmat(2,2))*ss1
 #else
       s1 = 0.0d0
 #endif
-      call matvec2(EUg(1,1,i+2),b1(1,itl),vtemp1(1))
+      call matvec2(EUg(1,1,i+2),b1(1,l),vtemp1(1))
       call matvec2(AEA(1,1,1),vtemp1(1),vtemp1(1))
-      s2 = scalar2(b1(1,itk),vtemp1(1))
+      s2 = scalar2(b1(1,k),vtemp1(1))
 #ifdef MOMENT
       call transpose2(AEA(1,1,2),atemp(1,1))
       call matmat2(atemp(1,1),EUg(1,1,i+4),atemp(1,1))
@@ -8821,7 +8821,7 @@ cd      write (2,*) 'eello6_5',eello6_5
       call matmat2(achuj_temp(1,1),EUg(1,1,i+2),gtemp(1,1))
       call matmat2(gtemp(1,1),EUg(1,1,i+3),gtemp(1,1)) 
       call matvec2(a_chuj(1,1,jj,i),Ub2(1,i+4),vtemp4(1)) 
-      ss13 = scalar2(b1(1,itk),vtemp4(1))
+      ss13 = scalar2(b1(1,k),vtemp4(1))
       s13 = (gtemp(1,1)+gtemp(2,2))*ss13
 #else
       s13=0.0d0
@@ -8858,14 +8858,14 @@ C Derivatives in gamma(i+3)
 #ifdef MOMENT
       call transpose2(AEA(1,1,1),auxmatd(1,1))
       call matmat2(EUg(1,1,i+1),auxmatd(1,1),auxmatd(1,1))
-      ss1d=scalar2(Ub2der(1,i+2),b1(1,itl))
+      ss1d=scalar2(Ub2der(1,i+2),b1(1,l))
       s1d = (auxmatd(1,1)+auxmatd(2,2))*ss1d
 #else
       s1d=0.0d0
 #endif
-      call matvec2(EUgder(1,1,i+2),b1(1,itl),vtemp1d(1))
+      call matvec2(EUgder(1,1,i+2),b1(1,l),vtemp1d(1))
       call matvec2(AEA(1,1,1),vtemp1d(1),vtemp1d(1))
-      s2d = scalar2(b1(1,itk),vtemp1d(1))
+      s2d = scalar2(b1(1,k),vtemp1d(1))
 #ifdef MOMENT
       call matvec2(Ug2der(1,1,i+2),dd(1,1,itk1),vtemp2d(1))
       s8d = -(atemp(1,1)+atemp(2,2))*scalar2(cc(1,1,itl),vtemp2d(1))
@@ -8919,9 +8919,9 @@ C Derivatives in gamma(i+5)
 #else
       s1d = 0.0d0
 #endif
-      call matvec2(EUg(1,1,i+2),b1(1,itl),vtemp1d(1))
+      call matvec2(EUg(1,1,i+2),b1(1,l),vtemp1d(1))
       call matvec2(AEAderg(1,1,1),vtemp1d(1),vtemp1d(1))
-      s2d = scalar2(b1(1,itk),vtemp1d(1))
+      s2d = scalar2(b1(1,k),vtemp1d(1))
 #ifdef MOMENT
       call transpose2(AEA(1,1,2),atempd(1,1))
       call matmat2(atempd(1,1),EUgder(1,1,i+4),atempd(1,1))
@@ -8933,7 +8933,7 @@ C Derivatives in gamma(i+5)
       s12d = scalar2(Ub2(1,i+2),vtemp3d(1))
 #ifdef MOMENT
       call matvec2(a_chuj(1,1,jj,i),Ub2der(1,i+4),vtemp4d(1)) 
-      ss13d = scalar2(b1(1,itk),vtemp4d(1))
+      ss13d = scalar2(b1(1,k),vtemp4d(1))
       s13d = (gtemp(1,1)+gtemp(2,2))*ss13d
 #else
       s13d = 0.0d0
@@ -8961,10 +8961,10 @@ C Cartesian derivatives
 #else
             s1d = 0.0d0
 #endif
-            call matvec2(EUg(1,1,i+2),b1(1,itl),vtemp1(1))
+            call matvec2(EUg(1,1,i+2),b1(1,l),vtemp1(1))
             call matvec2(AEAderx(1,1,lll,kkk,iii,1),vtemp1(1),
      &          vtemp1d(1))
-            s2d = scalar2(b1(1,itk),vtemp1d(1))
+            s2d = scalar2(b1(1,k),vtemp1d(1))
 #ifdef MOMENT
             call transpose2(AEAderx(1,1,lll,kkk,iii,2),atempd(1,1))
             call matmat2(atempd(1,1),EUg(1,1,i+4),atempd(1,1))
@@ -9010,7 +9010,7 @@ c      s13d=0.0d0
           derx_turn(lll,kkk,2) = derx_turn(lll,kkk,2)-0.5d0*s13d
           call matvec2(a_chuj_der(1,1,lll,kkk,jj,i),Ub2(1,i+4),
      &      vtemp4d(1)) 
-          ss13d = scalar2(b1(1,itk),vtemp4d(1))
+          ss13d = scalar2(b1(1,k),vtemp4d(1))
           s13d = (gtemp(1,1)+gtemp(2,2))*ss13d
           derx_turn(lll,kkk,1) = derx_turn(lll,kkk,1)-0.5d0*s13d
         enddo
index ba6ec3e..43a24b8 100644 (file)
@@ -694,10 +694,10 @@ C
         EEold(2,2,i)=-b(10,i)+b(11,i)
         EEold(2,1,i)= b(12,i)-b(13,i)
         EEold(1,2,i)= b(12,i)+b(13,i)
-        EEold(1,1,-i)= b(10,i)+b(11,i)
-        EEold(2,2,-i)=-b(10,i)+b(11,i)
-        EEold(2,1,-i)=-b(12,i)+b(13,i)
-        EEold(1,2,-i)=-b(12,i)-b(13,i)
+c        EEold(1,1,-i)= b(10,i)+b(11,i)
+c        EEold(2,2,-i)=-b(10,i)+b(11,i)
+c        EEold(2,1,-i)=-b(12,i)+b(13,i)
+c        EEold(1,2,-i)=-b(12,i)-b(13,i)
 #else
         EE(1,1,i)= b(10,i)+b(11,i)
         EE(2,2,i)=-b(10,i)+b(11,i)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
deleted file mode 100755 (executable)
index 8b92f5764d6f91de5bbd491e486f1c480a6ba6ec..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,89 +0,0 @@
-INSTALL_DIR = /users/local/mpi64/mpich-1.2.7p1
-BIN = /users/adam/bin
-FC= ifort
-OPT = -mcmodel=medium -O3 -ip -w
-#OPT = -mcmodel=medium -g -CA -CB
-FFLAGS = ${OPT} -c -I. -I./include_unres -I$(INSTALL_DIR)/include
-LIBS = -L$(INSTALL_DIR)/lib -lmpich -lpmpich xdrf/libxdrf.a
-
-.f.o:
-       ${FC} ${FFLAGS} $*.f
-
-.F.o:
-       ${FC} ${FFLAGS} ${CPPFLAGS} $*.F
-
-objects = \
-       wham_multparm.o \
-       bxread.o \
-       xread.o \
-       cxread.o \
-       enecalc1.o \
-       energy_p_new.o \
-       gnmr1.o \
-       initialize_p.o \
-       molread_zs.o \
-       openunits.o \
-       readrtns.o \
-       arcos.o \
-       cartder.o \
-       cartprint.o \
-       chainbuild.o \
-       geomout.o \
-       icant.o \
-       intcor.o \
-       int_from_cart.o \
-       make_ensemble1.o \
-       matmult.o \
-       misc.o \
-       mygetenv.o \
-       parmread.o \
-       pinorm.o \
-       printmat.o \
-       proc_proc.o \
-       rescode.o \
-       setup_var.o \
-       slices.o \
-       store_parm.o \
-       timing.o \
-       wham_calc1.o
-
-objects_compar = \
-        readrtns_compar.o \
-        readpdb.o fitsq.o contact.o \
-        elecont.o contfunc.o cont_frag.o conf_compar.o match_contact.o \
-        angnorm.o odlodc.o promienie.o qwolynes.o read_ref_str.o \
-        rmscalc.o secondary.o proc_cont.o define_pairs.o mysort.o
-
-GABs: CPPFLAGS = -DMPI -DLINUX -DUNRES -DSPLITELE -DPROCOR -DPGI -DISNAN -DAMD64 \
-       -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DSCALREP
-GABs: ${objects} ${objects_compar} xdrf/libxdrf.a
-       cc -o compinfo compinfo.c
-       ./compinfo
-       ${FC} -c ${FFLAGS} cinfo.f
-       $(FC) ${OPT} ${objects} ${objects_compar} cinfo.o \
-       ${LIBS} -static-intel -o ${BIN}/wham_ifort_MPICH_MM-KN-DEBUG-scalrep.exe
-
-GAB: CPPFLAGS = -DMPI -DLINUX -DUNRES -DSPLITELE -DPROCOR -DPGI -DISNAN -DAMD64 \
-       -DCRYST_BOND -DCRYST_THETA -DCRYST_SC
-GAB: ${objects} ${objects_compar} xdrf/libxdrf.a
-       cc -o compinfo compinfo.c
-       ./compinfo
-       ${FC} -c ${FFLAGS} cinfo.f
-       $(FC) ${OPT} ${objects} ${objects_compar} cinfo.o \
-       ${LIBS} -static-intel -o ${BIN}/wham_ifort_MPICH_MM-KN-DEBUG.exe
-
-E0LL2Y: CPPFLAGS = -DMPI -DLINUX -DUNRES -DSPLITELE -DPROCOR -DPGI -DISNAN -DAMD64
-E0LL2Y: ${objects} ${objects_compar} xdrf/libxdrf.a
-       cc -o compinfo compinfo.c
-       ./compinfo
-       ${FC} -c ${FFLAGS} cinfo.f
-       $(FC) ${OPT} ${objects} ${objects_compar} cinfo.o \
-       ${LIBS} -static-intel -o ${BIN}/wham_ifort_MPICH_MM-PH.exe
-
-xdrf/libxdrf.a:
-       cd xdrf && make
-
-
-clean:
-       /bin/rm -f *.o && /bin/rm -f compinfo && cd xdrf && make clean
-
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..8453cddeb7b08caf0a886e4bb11a3abc3a14980c
--- /dev/null
@@ -0,0 +1 @@
+Makefile_MPICH_ifort
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 8b92f57..6cd313d
@@ -1,5 +1,5 @@
-INSTALL_DIR = /users/local/mpi64/mpich-1.2.7p1
-BIN = /users/adam/bin
+INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh
+BIN = /users/adam/unres/bin/wham
 FC= ifort
 OPT = -mcmodel=medium -O3 -ip -w
 #OPT = -mcmodel=medium -g -CA -CB
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 113d499..37bd887
@@ -6256,8 +6256,8 @@ c        amino-acid residues.
       include 'COMMON.CONTROL'
       logical lprn
 C Set lprn=.true. for debugging
-      lprn=.false.
-c      lprn=.true.
+c      lprn=.false.
+      lprn=.true.
 c      write (iout,*) "EBACK_SC_COR",itau_start,itau_end,nterm_sccor
       esccor=0.0D0
       do i=itau_start,itau_end
@@ -6289,22 +6289,27 @@ c   3 = SC...Ca...Ca...SCi
         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
+        esccori=0.0d0
         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
+          esccori=esccori+v1ij*cosphi+v2ij*sinphi
           gloci=gloci+j*(v2ij*cosphi-v1ij*sinphi)
         enddo
+        esccor=esccor+esccori
         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,intertyp,itori,itori1),j=1,6)
-     & ,(v2sccor(j,intertyp,itori,itori1),j=1,6)
+        if (lprn) then
+        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,isccori,isccori1,
+     &  (v1sccor(j,intertyp,isccori,isccori1),j=1,6)
+     & ,(v2sccor(j,intertyp,isccori,isccori1),j=1,6)
+        write (iout,*) "esccori",esccori
+        call flush(iout)
+        endif
         gsccor_loc(i-3)=gsccor_loc(i-3)+gloci
        enddo !intertyp
       enddo
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 6c39f6c..3a4a3a3 100644 (file)
@@ -33,7 +33,7 @@
       double precision rmsnat,gyrate
       external rmsnat,gyrate
       double precision tole /1.0d-1/
-      integer i,itj,ii,iii,j,k,l,licz
+      integer i,itj,ii,iii,j,k,l,licz,scme
       integer ir,ib,ipar,iparm
       integer iscor,islice
       real*4 csingle(3,maxres2)
@@ -154,7 +154,6 @@ c     &   " kfac",kfac,"quot",quot," fT",fT
      &      wtor_d,wsccor,wbond
 #endif
         call etotal(energia(0),fT)
-#define DEBUG
 #ifdef DEBUG
         write (iout,*) "Conformation",i
         call enerprint(energia(0),fT)
@@ -162,7 +161,6 @@ c        write (iout,'(2i5,21f8.2)') i,iparm,(energia(k),k=1,21)
 c        write (iout,*) "ftors",ftors
 c        call intout
 #endif
-#undef DEBUG
         if (energia(0).ge.1.0d20) then
           write (iout,*) "NaNs detected in some of the energy",
      &     " components for conformation",ii+1
@@ -275,6 +273,7 @@ c     &   " snk",snk_p(iR,ib,ipar)
       write (iout,*) "Me",me," scount",scount(me)
       call flush(iout)
 c  Master gathers updated numbers of conformations written by all procs.
+      scme = scount(me)
       call MPI_AllGather( scount(me), 1, MPI_INTEGER, scount(0), 1, 
      &  MPI_INTEGER, WHAM_COMM, IERROR)
       indstart(0)=1