--- /dev/null
+3.800 500.00 43.0 14.33 5.0 ! peptide group
+1.237 500.00 59.0 19.67 5.0 ! Cys
+2.142 500.00 88.0 29.33 6.2 ! Met
+2.299 500.00 104.0 34.67 6.8 ! Phe
+1.776 500.00 70.0 23.33 6.2 ! Ile
+1.939 500.00 70.0 23.33 6.3 ! Leu
+1.410 500.00 56.0 18.67 5.8 ! Val
+2.605 500.00 143.0 47.67 7.2 ! Trp
+2.484 500.00 120.0 40.00 6.9 ! Tyr
+0.743 500.00 28.0 9.33 4.6 ! Ala
+0.000 500.00 14.0 0.00 3.8 ! Gly
+1.393 500.00 58.0 19.33 5.6 ! Thr
+1.150 500.00 44.0 14.67 4.8 ! Ser
+2.240 500.00 85.0 28.33 6.1 ! Glu
+1.684 500.00 71.0 23.67 5.7 ! Asn
+2.254 500.00 85.0 28.33 6.1 ! Glu
+1.709 500.00 71.0 23.67 5.6 ! Asp
+2.113 500.00 95.0 31.67 6.2 ! His
+3.020 500.00 114.0 38.00 6.8 ! Arg
+2.541 500.00 86.0 28.67 6.3 ! Lys
+1.345 500.00 71.0 23.67 5.6 ! Pro
+2.142 500.00 135.0 45.00 6.2 ! SeMet
+3.799 500.00 149.0 49.67 7.2 ! Dap(Bz)
+0.743 500.00 42.0 14.00 4.7 ! Aib
+1.210 500.00 42.0 14.00 5.6 ! Abu
--- /dev/null
+ 1.0850 0.5544 0.5544 0.9622 ! EPP
+ 5.2739 5.4561 5.4561 5.2261 ! RPP
+ -1.6027 -1.4879 -1.4879 -0.0779 ! ELPP6
+ -0.0444 0.0000 0.0000 0.0137 ! ELPP3
+
--- /dev/null
+ 3 # Number of local interaction types
+Gly
+ 0.000000000000000
+ 0.791965124028570
+ 0.206068961118571
+ 0.000000000000000
+ 0.000000000000000
+ 2.373462483972307
+ -0.927962753087420
+ 0.000000000000000
+ 0.000000000000000
+ 1.329421814829764
+ -0.370576187607876
+ 0.000000000000000
+ 0.000000000000000
+Ala
+ 0.000000000000000
+ 0.500261572719827
+ -0.233786079150650
+ -0.878020534542259
+ 1.501220349138902
+ -2.089734050079038
+ 2.302365702770721
+ -0.532502145482045
+ -1.596421505165690
+ 1.276301651241011
+ 0.399942874780603
+ -0.543778421330412
+ 0.400478498916355
+Pro
+ 0.000000000000000
+ -1.286480000000000
+ 0.031808800000000
+ -0.906628000000000
+ 1.015390000000000
+ -1.548870000000000
+ 1.914370000000000
+ 0.664143000000000
+ -0.454839000000000
+ -0.051291400000000
+ 0.103179000000000
+ 0.316367000000000
+ 0.045277200000000
3 *** Parameters derived by integrating MP2/6-31G** local energy surfaces ***
-1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 2 1 1 0
+1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 2 1 1 0 1
6 0 ** Gly-D-Pro-reg
1 -1.02141E+00 -1.21787E+00
2 2.66194E-03 1.01052E-02
--- /dev/null
+ 4 6
+ 5.605353726100000 6.220003215400000 6.215989849600000 6.438696896300000
+ 6.209810123100000 5.959637479800000 5.431022266200000 4.879008525700000
+ 5.263842382200000 5.496195412400000 4.292812416200000 4.358225054000000
+ 4.266775592100000 3.681384595800000 3.540542964700000 3.702698591200000
+ 4.717759615600000 3.381199222700000 3.793608545800000 4.515749058500000
+ 6.220003215400000 6.215989849600000 5.496195412400000 5.496195412400000
+
+ 6.629674668000000 6.671726050800000 6.816887694500000 6.837896015200000
+ 6.351203998600000 6.142519242300000 5.520020640600000 5.485893602400000
+ 4.938257326200000 4.279512916600000 4.053485701800000 4.208642852500000
+ 3.538808627900000 3.420973032700000 2.799574419300000 4.816426855300000
+ 3.879075507100000 3.587826217700000 4.645743255500000 6.629674668000000
+ 6.671726050800000 5.485893602400000 5.485893602400000
+
+ 5.434261193691611 6.009504353949445 5.751833613689151 4.388369927131041
+ 6.139482146000000 4.432779364180328 3.635448013213493 3.042556269070575
+ 1.858255457238648 3.619846653665197 3.902273188000000 2.840826371233924
+ 1.901219059651194 3.010635482615414 2.681361243261458 3.871192813400000
+ 3.639660062795308 4.487266103000000 6.671726050800000 5.434261193691611
+ 3.635448013213493 3.635448013213493
+
+ 7.144249845164532 5.950132764851209 5.636408114630104 6.256568766200000
+ 4.721753486138623 5.072743940945156 4.725634408062251 3.773513014441411
+ 3.537762800513723 4.309235277900000 4.002278495651890 4.124103654261368
+ 1.771213000543424 3.864752062532702 4.468184401000000 4.481956278333824
+ 4.902394508200000 6.816887694500000 6.009504353949445 5.072743940945156
+ 5.072743940945156
+
+ 5.956274037802311 7.211686591187319 6.204787608200000 5.376059458542183
+ 5.023511032618925 3.156887023825594 2.932344993803476 2.999897908513799
+ 3.895407345300000 2.991138620007669 2.096199593475473 1.780803572610500
+ 3.558049006448599 4.023841260600000 3.682633555857166 4.808718037700000
+ 6.837896015200000 5.751833613689151 5.023511032618925 5.023511032618925
+
+ 5.741243604492526 5.884448203300000 3.398137040446693 5.432746439707773
+ 4.729707784043235 3.970010356404483 3.414577863946629 3.650628980600000
+ 2.605234605568324 2.392978757746573 3.096075853472831 4.009206356643173
+ 3.441595274000000 3.721594130855455 4.593424600900000 6.351203998600000
+ 4.388369927131041 5.432746439707773 5.432746439707773
+
+ 5.282881132500000 4.829846631500000 4.757532777700000 4.724977904200000
+ 3.565638428500000 3.561336656700000 3.927304556400000 3.766477911800000
+ 3.586169976100000 3.552319162700000 4.650867246300000 4.242430826000000
+ 4.098772778300000 4.507966992900000 6.142519242300000 6.139482146000000
+ 4.757532777700000 4.757532777700000
+
+ 4.222264575400000 3.568880377430671 1.710507474941357 0.726915001472055
+ 2.519422404183540 3.136598518800000 2.564808696931206 3.101026335222954
+ 2.213396947938416 3.343125814753411 3.444306825200000 2.416478592751639
+ 4.091530576300000 5.520020640600000 4.432779364180328 1.710507474941357
+ 1.710507474941357
+
+ 4.157487725645439 3.262380685905436 2.953659747759453 1.237209789211462
+ 2.500185737000000 1.984183152198450 1.368828812773212 2.060401072298498
+ 2.863410468895249 2.015232903800000 1.541966676954322 3.639585254600000
+ 5.485893602400000 3.635448013213493 3.262380685905436 3.262380685905436
+
+ 2.501655793500000 2.394681323067151 2.071384505085577 1.074154474700000
+ 0.985099710786774 0.001985439127056 0.921773098679111 5.126752085199419
+ 1.500212764900000 -0.018286801754111 3.538112898500000 4.938257326200000
+ 3.042556269070575 2.501655793500000 2.501655793500000
+
+ 2.248058879145623 2.683627337507786 1.505360785600000 -0.706299059260768
+ 1.284606704482992 1.109202790492530 2.070407759035996 1.983305353800000
+ -0.008577364700000 2.955755366600000 4.279512916600000 1.858255457238648
+ 2.394681323067151 2.394681323067151
+
+ 1.280003824300000 0.768980610000000 0.625889188870640 1.535343520692143
+ 0.574105444778441 1.174671233709513 1.497548217400000 -0.665902088339257
+ 2.941502147900000 4.053485701800000 3.619846653665197 2.071384505085577
+ 2.071384505085577
+
+ -0.679242885900000 0.453238323900000 -0.759038766000000 -0.361703484600000
+ 1.680327505800000 0.677520998800000 -0.535483746800000 2.620859136300000
+ 4.208642852500000 3.902273188000000 1.074154474700000 1.074154474700000
+
+ 0.290068410287431 -0.092399325129687 1.982203632452388 0.078357579868221
+ 0.389638827500000 -0.177470106993247 2.325532607700000 3.538808627900000
+ 2.840826371233924 0.985099710786774 0.985099710786774
+
+ -3.392465857895507 -1.871634582322480 1.071505323254014 2.748917412400000
+ 1.802089391960750 1.797571866700000 3.420973032700000 1.90121905965119
+ 0.001985439127056 0.001985439127056
+
+ -1.397996047062832 0.263585152937208 2.820287379000000 1.642062410367716
+ 1.862509124700000 2.799574419300000 3.010635482615414 0.921773098679111
+ 0.921773098679111
+
+ 3.729277869700000 2.294443648100000 -0.070327972331951 3.111577617700000
+ 4.816426855300000 2.681361243261458 5.126752085199419 5.126752085199419
+
+ -0.082736296100000 -1.604311318200000 2.443983743500000 3.879075507100000
+ 3.871192813400000 1.500212764900000 1.500212764900000
+
+ -3.048709356063184 2.366463453300000 3.587826217700000 3.639660062795308
+ -0.018286801754111 -0.018286801754111
+
+ 4.192796926000000 4.645743255500000 4.487266103000000 3.538112898500000
+ 3.538112898500000
+
+ 6.629674668000000 6.671726050800000 5.485893602400000 5.485893602400000
+
+ 5.434261193691611 3.635448013213493 3.635448013213493
+
+ 2.501655793500000 2.501655793500000
+
+ 2.501655793500000
+
+ 2.674806001700000 2.733881014500000 2.966464722900000 2.881963673700000
+ 3.021073815000000 2.841428615200000 2.477343866000000 2.461194378800000
+ 2.465320121300000 2.492508737100000 2.573476775100000 2.456402674400000
+ 2.484782528100000 2.488928923300000 2.508951764500000 2.508333838300000
+ 2.422062272300000 2.271460977000000 2.452070308900000 2.702612978800000
+ 2.733881014500000 3.239567000000000 2.465320121300000 2.465320121300000
+
+ 4.927215476100000 5.105428423000000 4.207351616500000 4.851397283700000
+ 2.784887529300000 3.582986163400000 7.866021757600000 7.429920984700000
+ 1.962593983200000 0.798776956900000 4.058089968100000 1.888902103200000
+ 3.198719702600000 3.267327453800000 2.684813190400000 2.004302740400000
+ 6.244634191000000 8.195945209500000 13.474829585800000 2.663237683700000
+ 7.005428423000000 4.207351616500000 1.962593983200000 1.888902103200000
+
+ 0.869902301100000 1.054066001400000 0.938590929800000 1.026327410100000
+ 1.083527704500000 1.054318388600000 0.788868699600000 0.898930583300000
+ 1.003996287500000 1.242751812800000 0.893280172400000 0.917392899000000
+ 1.615769565700000 1.431586037300000 2.049831787900000 1.419961554600000
+ 0.993367797100000 1.431962560000000 27.495176328800000 0.778802528600000
+ 1.446666701400000 0.868195759800000 1.000000000000300 0.917392899000000
+
+ 0.010369755600000 0.061138567400000 0.044830334600000 0.039283178200000
+ 0.085416633800000 0.039889661900000 0.024949656900000 0.023241090800000
+ 0.086137910000000 -0.075479418500000 -0.026614602100000 -0.016342909900000
+ 0.057216710300000 -0.046860882500000 0.015104845500000 0.008496367800000
+ 0.027893039700000 0.007692291100000 0.103353673800000 -0.009825603600000
+ 0.061138567400000 0.044830334600000 0.086137910000000 -0.016342909900000
--- /dev/null
+5 *** Parameters derived by pdb statistical analysis by Shelly Rackovsky ***
+4 4 4 4 4 4 4 4 3 1 3 3 3 2 3 2 3 3 3 5 4 4 1 4
+6 0 *********** SCCC-Gly-Gly
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** SCCC-Gly-Asp
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** SCCC-Gly-Ala
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** SCCC-Gly-Cys
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** SCCC-Gly-Pro
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** SCCC-Asp-Gly
+ 1 -2.33674E-01 -5.31358E-01
+ 2 -4.88897E-01 -6.34765E-01
+ 3 -2.68667E-01 5.10088E-02
+ 4 -2.48344E-01 -2.04530E-01
+ 5 7.81149E-02 -9.89275E-04
+ 6 -5.25209E-02 -8.74971E-02
+6 0 *********** SCCC-Asp-Asp
+ 1 -3.67689E-03 -5.55082E-03
+ 2 -4.88763E-01 -4.13346E-01
+ 3 6.74458E-02 -8.94516E-02
+ 4 -1.48843E-01 3.05053E-02
+ 5 -2.32411E-03 6.93140E-02
+ 6 -3.65344E-02 1.18049E-01
+6 0 *********** SCCC-Asp-Ala
+ 1 -1.22253E-01 4.26719E-02
+ 2 -3.75906E-01 -4.76591E-01
+ 3 1.54140E-01 -1.50381E-01
+ 4 -2.79743E-02 3.45637E-02
+ 5 3.70630E-02 -1.80596E-02
+ 6 1.16381E-02 1.31634E-02
+6 0 *********** SCCC-Asp-Cys
+ 1 -3.85111E-01 3.52424E-01
+ 2 -4.08034E-01 -3.49952E-01
+ 3 6.35540E-03 -1.12671E-01
+ 4 -1.02048E-01 7.07537E-02
+ 5 -8.28533E-02 -6.45643E-02
+ 6 7.03106E-02 1.65406E-02
+6 0 *********** SCCC-Asp-Pro
+ 1 -1.50829E+00 -5.79772E-01
+ 2 1.03224E-01 -9.28513E-01
+ 3 -2.17808E-01 1.96654E-01
+ 4 -9.97970E-03 -1.86116E-01
+ 5 9.68333E-02 -3.40002E-04
+ 6 6.76090E-02 -1.60409E-02
+6 0 *********** SCCC-Ala-Gly
+ 1 1.08671E-01 -1.61916E-01
+ 2 -6.75374E-01 -4.41016E-01
+ 3 7.72515E-02 2.21794E-02
+ 4 -1.33440E-01 -3.52702E-02
+ 5 4.07103E-02 -8.30674E-03
+ 6 -3.38734E-02 -2.91658E-02
+6 0 *********** SCCC-Ala-Asp
+ 1 3.30143E-01 -2.37859E-01
+ 2 -5.58337E-01 -5.48182E-01
+ 3 1.59867E-01 -3.10240E-02
+ 4 -4.71581E-02 9.18808E-02
+ 5 7.58630E-03 1.36081E-02
+ 6 -5.18337E-02 1.67623E-02
+6 0 *********** SCCC-Ala-Ala
+ 1 3.01325E-02 -2.05463E-01
+ 2 -4.29621E-01 -4.94204E-01
+ 3 1.48297E-01 -2.46345E-02
+ 4 -6.66014E-02 7.33216E-02
+ 5 -4.61338E-03 9.99319E-03
+ 6 -1.72753E-02 -1.22783E-02
+6 0 *********** SCCC-Ala-Cys
+ 1 -1.89551E-01 -5.29036E-02
+ 2 -4.70536E-01 -5.46659E-01
+ 3 1.24188E-01 -4.54771E-02
+ 4 -9.01686E-02 7.87782E-02
+ 5 4.38317E-02 -1.50550E-02
+ 6 -1.40100E-02 4.48399E-03
+6 0 *********** SCCC-Ala-Pro
+ 1 -1.05516E+00 -8.27122E-01
+ 2 4.04216E-01 -6.30736E-01
+ 3 -5.65139E-02 1.31356E-01
+ 4 8.86212E-02 -1.93137E-02
+ 5 8.30847E-02 7.84107E-02
+ 6 1.09275E-03 -6.69432E-02
+6 0 *********** SCCC-Cys-Gly
+ 1 2.81717E-02 -9.16432E-02
+ 2 -5.80065E-01 -5.41676E-01
+ 3 8.35896E-02 2.32087E-02
+ 4 -2.52554E-02 -1.99537E-02
+ 5 -2.13136E-02 1.36707E-02
+ 6 5.82876E-02 -3.17349E-02
+6 0 *********** SCCC-Cys-Asp
+ 1 -1.56463E-01 -2.26207E-01
+ 2 -5.27000E-01 -6.19820E-01
+ 3 1.91887E-01 6.70580E-03
+ 4 -3.98226E-02 5.89435E-02
+ 5 -3.16575E-02 -1.15483E-02
+ 6 -2.96986E-02 -2.19490E-02
+6 0 *********** SCCC-Cys-Ala
+ 1 -3.36091E-01 -1.76255E-01
+ 2 -4.69818E-01 -5.33704E-01
+ 3 8.61098E-02 7.14942E-02
+ 4 -8.83260E-02 9.91528E-02
+ 5 3.34156E-02 8.38345E-03
+ 6 5.24593E-03 -3.06572E-02
+6 0 *********** SCCC-Cys-Cys
+ 1 -1.22127E-01 -1.71478E-01
+ 2 -6.74690E-01 -6.10165E-01
+ 3 1.73527E-01 -4.21592E-03
+ 4 -3.70829E-02 9.30684E-02
+ 5 -1.00968E-02 -6.23981E-02
+ 6 -8.89396E-03 -3.14081E-02
+6 0 *********** SCCC-Cys-Pro
+ 1 -1.17342E+00 -7.27036E-01
+ 2 6.83690E-01 -1.00092E+00
+ 3 -4.76000E-02 3.72246E-01
+ 4 -2.26563E-02 -1.70297E-01
+ 5 -2.22742E-02 1.16548E-01
+ 6 7.14525E-03 -4.24250E-02
+6 0 *********** SCCC-Pro-Gly
+ 1 4.02585E-01 -3.94531E-01
+ 2 -3.03503E-01 1.01518E+00
+ 3 -4.38168E-01 -3.04473E-01
+ 4 1.31142E-01 -9.95205E-02
+ 5 -3.80295E-02 8.15597E-02
+ 6 1.26077E-01 -2.53458E-02
+6 0 *********** SCCC-Pro-Asp
+ 1 2.49283E-03 -5.49089E-01
+ 2 -7.83933E-01 9.23601E-01
+ 3 -3.39174E-01 -3.82848E-01
+ 4 1.00026E-01 -1.82055E-01
+ 5 -1.75659E-01 -5.49745E-02
+ 6 8.55600E-02 -1.16096E-01
+6 0 *********** SCCC-Pro-Ala
+ 1 -4.15518E-01 -2.91572E-01
+ 2 -6.52264E-01 7.09750E-01
+ 3 -1.64167E-01 -4.41575E-01
+ 4 1.18955E-01 -3.95590E-02
+ 5 -7.92580E-02 -5.98595E-02
+ 6 9.27982E-02 -2.38264E-02
+6 0 *********** SCCC-Pro-Cys
+ 1 -3.26560E-01 4.41125E-02
+ 2 -6.99614E-01 7.59093E-01
+ 3 -2.81678E-01 -3.28174E-01
+ 4 1.31668E-01 -1.75615E-01
+ 5 7.10756E-03 5.43733E-02
+ 6 4.46549E-02 -1.44439E-02
+6 0 *********** SCCC-Pro-Pro
+ 1 -1.28703E+00 3.46321E-01
+ 2 -1.01267E+00 -8.23419E-01
+ 3 -1.57933E-01 -4.68436E-01
+ 4 8.11040E-02 2.82701E-01
+ 5 -9.53347E-02 -1.21811E-01
+ 6 2.61441E-01 9.39812E-02
+6 0 *********** CCCS-Gly-Gly
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** CCCS-Gly-Asp
+ 1 -6.31253E-02 2.38427E-01
+ 2 -1.11407E-01 5.53671E-01
+ 3 7.24875E-02 2.23541E-01
+ 4 6.83969E-03 4.24431E-02
+ 5 1.24417E-02 6.08425E-02
+ 6 6.11012E-02 7.83368E-02
+6 0 *********** CCCS-Gly-Ala
+ 1 -4.37385E-01 1.91403E-01
+ 2 -3.23631E-01 4.02741E-01
+ 3 5.64025E-02 4.08058E-03
+ 4 -5.74258E-02 -7.02841E-02
+ 5 -4.70532E-02 -5.70242E-02
+ 6 -9.28053E-03 4.39361E-02
+6 0 *********** CCCS-Gly-Cys
+ 1 -4.13393E-01 1.65041E-01
+ 2 -1.88107E-01 5.62683E-01
+ 3 5.60016E-02 7.38731E-02
+ 4 -5.95757E-03 -4.64401E-02
+ 5 1.01336E-02 5.56109E-02
+ 6 -2.35731E-03 -3.15908E-02
+6 0 *********** CCCS-Gly-Pro
+ 1 1.76496E+00 1.61351E-02
+ 2 -4.47793E-02 8.85324E-02
+ 3 5.63354E-01 2.17411E-01
+ 4 2.19564E-01 8.87204E-02
+ 5 -5.19152E-02 3.72129E-02
+ 6 -5.31883E-02 1.01306E-01
+6 0 *********** CCCS-Asp-Gly
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** CCCS-Asp-Asp
+ 1 -2.19269E-01 8.49318E-02
+ 2 3.49016E-01 1.09227E-01
+ 3 -1.97832E-02 7.72399E-02
+ 4 5.58331E-02 -3.06730E-02
+ 5 1.18306E-01 -2.23422E-02
+ 6 -4.37173E-03 4.71024E-02
+6 0 *********** CCCS-Asp-Ala
+ 1 -4.41640E-01 -5.72041E-03
+ 2 2.73360E-01 1.76355E-01
+ 3 -1.81199E-02 -4.96490E-03
+ 4 -5.22381E-02 2.83445E-02
+ 5 4.75320E-02 3.90300E-02
+ 6 -1.17571E-02 -2.22279E-02
+6 0 *********** CCCS-Asp-Cys
+ 1 -1.04268E+00 -6.40980E-02
+ 2 4.07555E-01 -8.57275E-02
+ 3 -9.99096E-02 -5.20481E-02
+ 4 6.49643E-03 -2.47447E-02
+ 5 -4.98284E-02 -8.55654E-03
+ 6 9.24429E-02 -3.30342E-02
+6 0 *********** CCCS-Asp-Pro
+ 1 5.12065E-01 -1.44224E+00
+ 2 1.29415E+00 5.67146E-01
+ 3 -7.38956E-02 -3.66674E-01
+ 4 -1.18527E-01 4.00056E-01
+ 5 1.03674E-01 1.46075E-01
+ 6 9.06869E-02 -1.14085E-01
+6 0 *********** CCCS-Ala-Gly
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** CCCS-Ala-Asp
+ 1 -1.18903E-01 1.83145E-01
+ 2 5.83533E-01 1.08640E-01
+ 3 -6.66729E-02 1.76102E-01
+ 4 4.89076E-02 5.31612E-02
+ 5 5.39967E-02 9.45165E-02
+ 6 8.03064E-02 -4.08910E-03
+6 0 *********** CCCS-Ala-Ala
+ 1 -2.92868E-01 -8.19322E-02
+ 2 4.63252E-01 1.35090E-01
+ 3 -9.30834E-02 -6.42975E-02
+ 4 6.48082E-02 5.29183E-02
+ 5 -1.88075E-02 -1.92230E-02
+ 6 -1.51650E-03 2.44986E-02
+6 0 *********** CCCS-Ala-Cys
+ 1 -5.81015E-01 -1.68223E-01
+ 2 6.20247E-01 -2.12253E-01
+ 3 -1.35184E-01 -6.88396E-02
+ 4 6.16762E-02 -2.05756E-02
+ 5 -3.94035E-02 -1.52101E-02
+ 6 2.08621E-02 3.07917E-03
+6 0 *********** CCCS-Ala-Pro
+ 1 9.10026E-01 -1.25074E+00
+ 2 1.42419E+00 1.07825E+00
+ 3 2.96946E-01 -4.44096E-01
+ 4 1.60238E-01 3.80481E-01
+ 5 3.09317E-02 1.68846E-01
+ 6 -1.77411E-01 -1.00691E-01
+6 0 *********** CCCS-Cys-Gly
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** CCCS-Cys-Asp
+ 1 -5.26562E-01 -3.09456E-01
+ 2 5.49368E-01 -1.44823E-01
+ 3 -7.22982E-02 9.84671E-02
+ 4 6.66287E-02 -9.44212E-03
+ 5 1.68578E-03 6.74414E-02
+ 6 3.89759E-02 1.95437E-02
+6 0 *********** CCCS-Cys-Ala
+ 1 -6.56521E-01 -4.61287E-01
+ 2 4.26599E-01 -4.27295E-02
+ 3 -5.80619E-02 -6.82714E-02
+ 4 7.55769E-02 -3.73619E-02
+ 5 -1.25281E-02 -9.43991E-03
+ 6 -2.08379E-02 -1.07485E-02
+6 0 *********** CCCS-Cys-Cys
+ 1 -5.58656E-01 -6.37550E-02
+ 2 6.60644E-01 -4.81978E-01
+ 3 -1.23335E-01 -1.07436E-01
+ 4 9.65717E-02 -4.24652E-02
+ 5 -2.48253E-02 -5.11826E-02
+ 6 6.85820E-05 1.76573E-02
+6 0 *********** CCCS-Cys-Pro
+ 1 4.90723E-01 -1.35625E+00
+ 2 1.67813E+00 1.18718E+00
+ 3 5.22746E-02 -5.00301E-01
+ 4 1.68735E-01 3.93464E-01
+ 5 4.28409E-02 8.91823E-02
+ 6 -1.62951E-02 -2.16810E-02
+6 0 *********** CCCS-Pro-Gly
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** CCCS-Pro-Asp
+ 1 -6.52828E-03 3.66128E-01
+ 2 8.72926E-01 2.83756E-01
+ 3 -6.39242E-02 4.15019E-01
+ 4 5.22042E-02 1.13759E-01
+ 5 3.15281E-02 1.19297E-01
+ 6 2.29414E-01 1.65320E-02
+6 0 *********** CCCS-Pro-Ala
+ 1 -1.92755E-01 -2.59299E-01
+ 2 6.27259E-01 3.23210E-01
+ 3 5.09623E-03 -5.98610E-02
+ 4 2.63549E-01 5.54537E-02
+ 5 1.07979E-02 1.42709E-02
+ 6 3.58365E-02 -1.09028E-02
+6 0 *********** CCCS-Pro-Cys
+ 1 -4.65856E-01 -2.86718E-01
+ 2 8.65762E-01 -1.35677E-01
+ 3 -1.54115E-01 -3.55263E-02
+ 4 8.94026E-02 1.99514E-02
+ 5 -4.23955E-02 6.54068E-02
+ 6 1.37749E-01 3.27344E-04
+6 0 *********** CCCS-Pro-Pro
+ 1 1.04077E+00 -4.87596E-01
+ 2 7.01383E-01 2.48642E+00
+ 3 1.47959E-01 -3.84847E-01
+ 4 1.09403E-02 -6.08211E-02
+ 5 -4.12137E-02 8.77603E-02
+ 6 5.29644E-02 1.44612E-02
+6 0 *********** SCCS-Gly-Gly
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** SCCS-Gly-Asp
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** SCCS-Gly-Ala
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** SCCS-Gly-Cys
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** SCCS-Gly-Pro
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** SCCS-Asp-Gly
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** SCCS-Asp-Asp
+ 1 -1.29367E-01 5.31310E-02
+ 2 2.52177E-01 -4.38233E-01
+ 3 2.89042E-02 -2.12699E-03
+ 4 -5.58810E-02 -1.26169E-01
+ 5 -1.35209E-02 -9.71544E-04
+ 6 -5.55150E-02 1.66374E-02
+6 0 *********** SCCS-Asp-Ala
+ 1 -6.19935E-02 1.46335E-02
+ 2 2.40900E-01 -1.77547E-01
+ 3 2.51822E-02 -5.24041E-02
+ 4 -1.68369E-03 -1.26395E-01
+ 5 -5.14003E-02 -3.09970E-02
+ 6 3.06234E-03 -8.67938E-03
+6 0 *********** SCCS-Asp-Cys
+ 1 4.64551E-01 -1.71287E-01
+ 2 -2.64537E-03 -4.16687E-01
+ 3 -4.88145E-02 -9.31462E-02
+ 4 -5.30998E-02 -6.70922E-02
+ 5 8.75378E-03 1.48263E-02
+ 6 2.66145E-02 -3.62959E-02
+6 0 *********** SCCS-Asp-Pro
+ 1 4.95445E-01 1.54011E+00
+ 2 1.12587E+00 5.33051E-01
+ 3 1.16352E-01 3.06477E-01
+ 4 -1.69937E-01 -8.91254E-02
+ 5 2.99610E-02 -1.99747E-01
+ 6 3.14083E-01 -9.27615E-02
+6 0 *********** SCCS-Ala-Gly
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** SCCS-Ala-Asp
+ 1 -3.03491E-01 -3.20195E-03
+ 2 1.87577E-01 -5.35195E-01
+ 3 -9.22075E-02 -2.45286E-02
+ 4 -5.52959E-02 -7.94812E-02
+ 5 2.30392E-02 -6.72315E-02
+ 6 1.13747E-02 1.06330E-02
+6 0 *********** SCCS-Ala-Ala
+ 1 -1.13071E-01 1.14720E-01
+ 2 1.77018E-01 -3.52529E-01
+ 3 2.53076E-02 -3.20530E-02
+ 4 -5.13892E-02 -8.88139E-02
+ 5 3.40895E-03 -1.14563E-02
+ 6 -3.36404E-02 -4.87838E-03
+6 0 *********** SCCS-Ala-Cys
+ 1 1.87671E-01 8.41887E-02
+ 2 -2.58899E-02 -5.91412E-01
+ 3 -6.02484E-02 -6.83110E-02
+ 4 -6.01972E-02 -7.62475E-02
+ 5 1.66086E-02 1.13310E-02
+ 6 -1.52069E-02 2.08523E-02
+6 0 *********** SCCS-Ala-Pro
+ 1 2.97957E-01 1.43349E+00
+ 2 8.50101E-01 6.28525E-01
+ 3 1.37592E-01 3.21604E-01
+ 4 -1.65330E-01 3.97088E-02
+ 5 -5.87512E-02 1.95385E-01
+ 6 4.59752E-02 5.96600E-02
+6 0 *********** SCCS-Cys-Gly
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** SCCS-Cys-Asp
+ 1 1.54696E-01 2.74801E-01
+ 2 1.75668E-01 -6.02466E-01
+ 3 -3.71949E-02 2.85682E-02
+ 4 -2.23575E-02 -7.93697E-02
+ 5 3.18670E-02 -3.26104E-02
+ 6 3.42890E-03 9.99826E-03
+6 0 *********** SCCS-Cys-Ala
+ 1 3.12256E-01 2.89927E-01
+ 2 1.38469E-01 -4.21609E-01
+ 3 4.30847E-02 8.17844E-03
+ 4 -6.30056E-02 -7.43044E-02
+ 5 -2.42299E-02 -1.05221E-02
+ 6 -2.32065E-02 1.07005E-02
+6 0 *********** SCCS-Cys-Cys
+ 1 5.42115E-02 1.91060E-01
+ 2 -1.45695E-01 -7.74412E-01
+ 3 -2.74454E-02 -6.31361E-03
+ 4 -6.08427E-02 -5.15224E-02
+ 5 -2.37106E-02 3.55272E-02
+ 6 2.34366E-04 1.57237E-02
+6 0 *********** SCCS-Cys-Pro
+ 1 5.25532E-01 1.45831E+00
+ 2 1.23695E+00 9.22229E-01
+ 3 2.26554E-01 3.11519E-01
+ 4 8.04527E-03 1.20234E-01
+ 5 1.10145E-01 -3.76652E-02
+ 6 1.20059E-01 3.98373E-02
+6 0 *********** SCCS-Pro-Gly
+ 1 0.00000E+00 0.00000E+00
+ 2 0.00000E+00 0.00000E+00
+ 3 0.00000E+00 0.00000E+00
+ 4 0.00000E+00 0.00000E+00
+ 5 0.00000E+00 0.00000E+00
+ 6 0.00000E+00 0.00000E+00
+6 0 *********** SCCS-Pro-Asp
+ 1 -4.75566E-01 4.02839E-01
+ 2 -9.91621E-01 -5.27652E-01
+ 3 1.01043E-01 1.27747E-01
+ 4 2.21600E-01 9.83514E-02
+ 5 9.14873E-02 2.88332E-01
+ 6 -8.89657E-02 6.69934E-02
+6 0 *********** SCCS-Pro-Ala
+ 1 9.73371E-02 2.90189E-01
+ 2 -5.61755E-01 -4.03787E-01
+ 3 -1.18288E-01 -1.57214E-01
+ 4 1.33916E-01 1.47170E-01
+ 5 9.77810E-02 6.01187E-02
+ 6 -5.20456E-02 -7.13409E-02
+6 0 *********** SCCS-Pro-Cys
+ 1 2.37390E-01 5.34492E-02
+ 2 -7.98945E-01 -9.34123E-02
+ 3 -2.65067E-02 1.77660E-01
+ 4 9.11318E-02 8.22393E-02
+ 5 5.66528E-02 3.50986E-02
+ 6 -3.68829E-02 1.55213E-02
+6 0 *********** SCCS-Pro-Pro
+ 1 1.33315E+00 3.64948E-01
+ 2 9.40733E-01 -1.29363E+00
+ 3 -8.51267E-01 -3.39368E-01
+ 4 2.81813E-01 -1.68113E-01
+ 5 2.73587E-01 1.92177E-01
+ 6 3.48452E-02 -4.05145E-01
--- /dev/null
+CYS 3 1.237
+ 1.231369021557632E+00 2.113103139518216E+00 -1.476681317527360E+00
+ 1.359878926615624E+00 -3.499432056994118E+00 5.851204123972364E+00
+ 3.459723100501249E+00 1.294798610288682E+00 5.200500561157463E+00
+ 3.392033819970949E-01
+ 1.359527534079732E-01 2.488992224191690E+00 -1.450121802398932E+00
+ 4.725424960615999E+00 -4.418975268235962E+00 6.400484083733093E+00
+ -6.687748468647851E-01 -9.084157935657023E-01 1.046849325214548E+00
+ 7.829019235133238E-01
+ 7.415643590879490E-01 2.792768443976991E+00 -2.326205186615562E+00
+ 3.858922654647919E+00 2.090295355195358E+00 9.478999336121685E+00
+ -6.768263592724760E-01 5.478998925892089E-01 2.772884507615886E+00
+MET 3 2.142
+ 9.722127791633153E-02 2.498757650488667E+00 -1.863073704235900E+00
+ 1.028667973951980E+01 -1.744751696265225E-01 5.698529122809084E+00
+ 1.779878495634811E-01 1.302283396983590E+00 1.645070985258705E+00
+ -1.191702757775135E+00
+ 9.700887295306095E-01 2.538480849432296E+00 -1.687447400950541E+00
+ 2.914503970707226E+00 2.213301785498612E+00 4.010429280441711E+00
+ 2.771061835565503E-01 6.480629170944440E-01 1.679848361209695E+00
+ -1.628221773759656E+00
+ 4.484623269013633E-01 2.864001564043303E+00 7.913014582211814E-02
+ 3.486241945413903E+00 -1.221211083950580E+00 7.313788902870085E+00
+ -1.858364963267348E-01 1.286231122554250E-02 6.005873637331760E-01
+PHE 3 2.299
+ 1.792749228715690E-01 2.445321260587006E+00 -2.205383105485196E-01
+ 2.840049609374177E+00 -1.946074226932073E+00 7.434212815352109E+00
+ -1.325930890710515E+00 -2.222394548566823E+00 4.322358981301695E+00
+ -5.765617699207611E-01
+ 1.413760435690095E+00 1.915812548005232E+00 -1.549456042065778E+00
+ 1.871929323345368E+00 -1.798891416070481E+00 5.582439929847176E+00
+ 3.407720474278349E+00 1.386029650812961E+00 6.458424508347823E+00
+ -5.632243342901979E-01
+ 3.872060168185270E-01 2.551483419092877E+00 -2.909509224769854E+00
+ 2.777352210943400E+00 -1.559466166364287E+00 5.701287306910894E+00
+ 1.333394634883710E+00 1.343599581596888E+00 2.013294785721223E+00
+ILE 2 1.776
+ -8.993392849314651E-01 2.460735301794427E+00 -1.466352275710623E+00
+ 1.335507880308818E+00 3.877163081255017E-01 7.342141116717881E+00
+ 7.646810523407427E-01 4.326452654630720E-01 4.966284208737452E+00
+ -1.666694944219961E+00
+ 6.014239241365417E-01 2.880135719336223E+00 -2.070215098352316E+00
+ 4.161941123865015E+00 1.577137223745539E+00 1.012195032332899E+01
+ -1.627090702085070E-01 6.622334464456527E-01 1.262489404602994E+00
+LEU 2 1.939
+ 3.031139617881610E-01 2.638741044956045E+00 -5.106419445898494E-01
+ 4.831704554331401E+00 -3.697848673560471E+00 7.968578956159185E+00
+ -2.207860346857545E+00 -2.849178555593270E+00 3.258554653312988E+00
+ -6.946793699134425E-01
+ 2.142135800771929E-01 2.646823111812505E+00 -2.164247197286523E+00
+ 2.202765871995703E+00 -3.364828805115636E+00 5.101613190841591E+00
+ 4.613109756437048E-01 1.286816666077665E+00 1.503199199335317E+00
+VAL 3 1.410
+ 7.026604253503660E-01 2.523187735648662E+00 -1.561674989218780E+00
+ 1.683788105084965E+00 -3.290038249451969E+00 4.095279542685026E+00
+ 5.930133788835822E-01 6.799979143850547E-01 3.199690346005689E+00
+ 3.738180412805506E+00
+ 6.527373716823524E-02 2.487070654943019E+00 -1.280466510275925E+00
+ 1.546886613223673E+01 2.797972581686856E-01 1.576935600395508E+01
+ 2.214189328363042E-01 4.509398531501813E+00 1.127082394603407E+01
+ 1.148964981925863E+00
+ 5.111601528759810E-01 2.940400701888451E+00 -1.261593886733134E+00
+ 5.552778496952875E+00 -1.896738804484332E+00 1.304912692852219E+01
+ -3.376435655060783E-02 -5.880574756732890E-02 1.710540585086872E+00
+TRP 3 2.605
+ 3.671385351642817E-01 2.649906086725728E+00 -3.156606077931241E+00
+ 2.690908807161844E+00 -1.026463093825944E+00 5.060483795501765E+00
+ 8.253185580791326E-01 4.742781302323599E-01 1.333408847594917E+00
+ -4.813331350209762E-01
+ 8.486877673687784E-01 1.810301460940188E+00 -1.493282213570890E+00
+ 1.781266347191273E+00 -7.059746291420510E+00 4.646455292590170E+00
+ 7.948414660676448E-02 1.895728288968257E+00 2.603989448457775E+00
+ 8.209173910579813E-02
+ 2.717200429601971E-01 2.400990183711977E+00 -1.577652664504292E-01
+ 2.437028663976406E+00 -8.163339602649062E-01 4.586850127312752E+00
+ -1.081177212503867E-01 -1.493161294053607E+00 2.502481016266474E+00
+TYR 3 2.484
+ 4.028666745713829E-01 2.519003276438601E+00 -2.961640954840339E+00
+ 2.810344165608079E+00 -1.511517003072798E+00 5.824409353060568E+00
+ 1.466134423268518E+00 1.192683001754308E+00 2.100881004969442E+00
+ 4.671201937281126E-01
+ 1.270875009009630E-01 2.394447070478641E+00 -1.827684477015144E-01
+ 2.331550682785130E+00 -1.132358905395797E+00 7.193177319124498E+00
+ -1.022699111580738E+00 -2.721112738727777E+00 4.563594836270955E+00
+ -4.500643586478538E-01
+ 1.225837549981350E+00 1.875587240640277E+00 -1.551335672790210E+00
+ 1.943167657599241E+00 -1.940785649959641E+00 5.993343592431522E+00
+ 3.664991318878045E+00 1.542184195088237E+00 4.927234334893407E+00
+ALA 2 0.743
+ 7.419719809464693E-01 2.573069816683764E+00 -1.445022321790584E+00
+ 2.664034429086210E+00 -9.544541018281457E-01 4.931050451872054E+00
+ -2.252940531751257E-01 1.983979286852417E-01 3.424484598993639E+00
+ 3.302656131123964E+00
+ 6.859966237758021E-02 2.260980778629371E+00 -1.331483284360863E+00
+ 1.364738115017513E+01 -8.146260155599712E-01 1.496299563312356E+01
+ 4.636173064527849E-01 6.629814458423924E+00 1.388312051255217E+01
+GLY 0 0.000
+THR 3 1.393
+ 5.396062211948021E-01 2.896860177830998E+00 -1.216721192952898E+00
+ 4.969075609331727E+00 -2.794491848631561E+00 9.596330753868708E+00
+ -1.409200406451479E-01 1.514851393892751E-02 1.824412748816235E+00
+ 4.594808606971496E-01
+ 4.681166950347075E-01 2.368583199343734E+00 -1.621935088489747E+00
+ 2.081815334126496E+00 -4.883219939543496E+00 4.187512631560888E+00
+ -2.005988215261086E+00 -9.795008722668578E-01 3.729136436139124E+00
+ 2.881914774441310E+00
+ 5.705085647645143E-02 2.477787901184960E+00 -1.294293372963355E+00
+ 1.686093057525384E+01 9.551099284588697E-01 1.603877631675030E+01
+ 6.010996622329809E-01 1.864352621160113E+00 1.251483195843141E+01
+SER 2 1.150
+ -5.497069590255966E-01 1.933816215853224E+00 -1.272066735241571E+00
+ 1.673075066955311E+00 -6.048541008624543E+00 5.568869961886437E+00
+ 4.323468454867889E+00 5.728305342360822E+00 5.505848742322177E+00
+ -1.891146969473795E+00
+ 3.545637604391543E-01 2.516361001755047E+00 -1.405614220460048E+00
+ 2.602024141419324E+00 -3.306262412749110E+00 3.793823815282222E+00
+ -2.711053897830787E-01 -1.110920333229469E-01 1.394289514741237E+00
+GLN 2 2.240
+ 1.027151529129258E-01 2.402194719228994E+00 -1.840526154465306E+00
+ 1.035278504075063E+01 -3.042996004529227E-01 4.694929450977331E+00
+ 2.927121487211625E-01 6.550907667964759E-01 1.724533079288311E+00
+ -1.494517970520823E+00
+ 6.608878200615514E-01 2.641160540899916E+00 -1.786928303175113E+00
+ 2.272091312109362E+00 1.161744050050166E+00 4.382225001869918E+00
+ 1.149209568761504E-01 7.460217105526566E-02 7.426041660239801E-01
+ASN 3 1.684
+ 1.112324703760510E-01 2.528719444818902E+00 -2.379382053772226E+00
+ 3.003367245616277E+00 -3.077709164923569E+00 4.985751975374973E+00
+ 1.071072219163129E+00 1.147015025964058E+00 1.773370257994376E+00
+ -3.534179914231330E-01
+ 4.190831955801756E-01 2.663213595201207E+00 -4.139116465625171E-01
+ 2.538613102403088E+00 -1.602088849778903E+00 6.399612979739945E+00
+ -9.548410606537884E-01 -6.166941633843815E-01 2.325009293208644E+00
+ 1.069207572802126E-01
+ 9.476766747812758E-01 1.986688873032181E+00 -1.477414498295757E+00
+ 1.351726099094456E+00 -1.905998737540555E+00 7.220080605345742E+00
+ 1.203769942930408E+00 8.057677136706265E-01 7.255204499253058E+00
+GLU 2 2.254
+ 6.166174397478329E-01 2.693699329729441E+00 -1.815037701752951E+00
+ 2.362949343214702E+00 6.607299337431395E-02 4.810699687696198E+00
+ -1.797853312829220E-02 1.201102153157729E-01 8.106206358901631E-01
+ 1.007096375122964E+00
+ 9.129006848374797E-02 2.317041280936629E+00 -1.558857025943406E+00
+ 1.011107292999823E+01 -5.328741393611267E-01 3.878173399207487E+00
+ 4.044654587833792E-02 -9.448056425066667E-02 1.885476706933426E+00
+ASP 3 1.709
+ 5.400605786370840E-01 2.657722884515353E+00 -3.385273047058785E-01
+ 2.898083944088662E+00 -1.328273653208097E+00 7.223737735100110E+00
+ -4.157376380045905E-01 -1.072329011263512E+00 3.233263570904083E+00
+ -3.989809665255895E-02
+ -3.109978485378748E-02 2.463994287298199E+00 -2.105677103768799E+00
+ 4.311372565687824E+00 -4.970595023288378E+00 4.950710638274173E+00
+ 1.139208265734643E+00 1.630793464419479E+00 1.639513705335163E+00
+ -3.771887580443609E-01
+ 6.105555660819125E-01 1.970311083953980E+00 -1.441339194531222E+00
+ 1.551018782708743E+00 -2.827531798850897E+00 5.723235709915189E+00
+ -1.078460330524896E+00 7.700956574760588E-01 6.344660213195646E+00
+HIS 3 2.113
+ 1.079338349140086E+00 1.849201182174331E+00 -1.512850967805422E+00
+ 1.712591981224657E+00 -3.158900916348374E+00 5.920842405006604E+00
+ 3.622057782204497E+00 1.817638218496146E+00 5.150761208239930E+00
+ 5.074858225126165E-01
+ 2.573617350357087E-01 2.500706138792129E+00 -2.684315843812017E+00
+ 2.621189104761450E+00 -2.862497001612499E+00 5.338578885081990E+00
+ 1.135581147707634E+00 9.508053123569241E-01 2.080139050567627E+00
+ 3.984094872658914E-01
+ 3.049738507877272E-01 2.487729725733018E+00 -2.164821284296528E-01
+ 2.450893788481603E+00 -1.800558830434274E+00 5.712326383935853E+00
+ -1.294194499599506E+00 -1.225776080654669E+00 3.563351646368943E+00
+ARG 1 3.020
+ 2.658505077963930E-01 2.479884890012459E+00 -2.008958667908643E+00
+ 1.747155103050119E+00 -8.926596092802748E-01 3.301752445174772E+00
+ 1.014462199059906E-01 2.456980356367927E-01 7.408904959852515E-01
+LYS 2 2.541
+ 7.923379070478030E-02 2.425873196105961E+00 -1.733532248623140E+00
+ 1.337559472175678E+01 9.888245505076281E-01 7.031156014718327E+00
+ 3.370494365618861E-01 6.128970418682688E-01 1.383582262184565E+00
+ -1.612492318547635E+00
+ 5.991027320671027E-01 2.605935955764981E+00 -1.747726166038849E+00
+ 2.158191195473436E+00 -8.729452021612440E-01 3.406203674600574E+00
+ 1.472643934438318E-01 1.972139148579855E-01 8.378149787932554E-01
+PRO 2 1.345
+ 5.949257202797159E-01 2.115043062984257E+00 -2.243046587283823E+00
+ 7.864992205907319E+00 -1.166688113704284E+01 1.582629740652047E+01
+ -1.062192417755259E+01 6.919539462773781E+00 5.075035563649993E+00
+ -1.059712366514320E+00
+ 6.598832522023589E-02 1.743404116417184E+00 -1.990010091107989E+00
+ 9.339178673430029E+00 1.583092863327845E-01 9.472694795331311E+00
+ -1.358141183315971E+00 1.090025619396050E+00 4.267614299031873E+00
+SME 3 2.142
+ 9.722127791633153E-02 2.498757650488667E+00 -1.863073704235900E+00
+ 1.028667973951980E+01 -1.744751696265225E-01 5.698529122809084E+00
+ 1.779878495634811E-01 1.302283396983590E+00 1.645070985258705E+00
+ -1.191702757775135E+00
+ 9.700887295306095E-01 2.538480849432296E+00 -1.687447400950541E+00
+ 2.914503970707226E+00 2.213301785498612E+00 4.010429280441711E+00
+ 2.771061835565503E-01 6.480629170944440E-01 1.679848361209695E+00
+ -1.628221773759656E+00
+ 4.484623269013633E-01 2.864001564043303E+00 7.913014582211814E-02
+ 3.486241945413903E+00 -1.221211083950580E+00 7.313788902870085E+00
+ -1.858364963267348E-01 1.286231122554250E-02 6.005873637331760E-01
+DBZ 3 3.799
+ 1.792749228715690E-01 2.445321260587006E+00 -2.205383105485196E-01
+ 2.840049609374177E+00 -1.946074226932073E+00 7.434212815352109E+00
+ -1.325930890710515E+00 -2.222394548566823E+00 4.322358981301695E+00
+ -5.765617699207611E-01
+ 1.413760435690095E+00 1.915812548005232E+00 -1.549456042065778E+00
+ 1.871929323345368E+00 -1.798891416070481E+00 5.582439929847176E+00
+ 3.407720474278349E+00 1.386029650812961E+00 6.458424508347823E+00
+ -5.632243342901979E-01
+ 3.872060168185270E-01 2.551483419092877E+00 -2.909509224769854E+00
+ 2.777352210943400E+00 -1.559466166364287E+00 5.701287306910894E+00
+ 1.333394634883710E+00 1.343599581596888E+00 2.013294785721223E+00
+AIB 2 0.743
+ 7.419719809464693E-01 3.003069816683764E+00 -1.445022321790584E-02
+ 2.664034429086210E+00 -9.544541018281457E-01 4.931050451872054E+00
+ -2.252940531751257E-01 1.983979286852417E-01 3.424484598993639E+00
+ 0.000656131123964E+00
+ 7.419719809464693E-01 3.003069816683764E+00 1.445022321790584E-02
+ 2.664034429086210E+00 -9.544541018281457E-01 4.931050451872054E+00
+ -2.252940531751257E-01 1.983979286852417E-01 3.424484598993639E+00
+ABU 2 1.210
+ -5.497069590255966E-01 1.933816215853224E+00 -1.272066735241571E+00
+ 1.673075066955311E+00 -6.048541008624543E+00 5.568869961886437E+00
+ 4.323468454867889E+00 5.728305342360822E+00 5.505848742322177E+00
+ -1.891146969473795E+00
+ 3.545637604391543E-01 2.516361001755047E+00 -1.405614220460048E+00
+ 2.602024141419324E+00 -3.306262412749110E+00 3.793823815282222E+00
+ -2.711053897830787E-01 -1.110920333229469E-01 1.394289514741237E+00
--- /dev/null
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 CYS
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 MET
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 PHE
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 ILE
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 LEU
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 VAL
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 TRP
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 TYR
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 ALA
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 GLY
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 THR
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 SER
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 GLN
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 ASN
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 GLU
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 ASP
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 HIS
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 ARG
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 LYS
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 PRO
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 SME
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 DBZ
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 AIB
+ -1.5000000000 4.0000000000 -1.5000000000 4.0000000000 ABU
--- /dev/null
+ 2.06465 -0.06831 0.01355 -0.00812 -0.09758 #Cys
+ 29.21370 -34.44846 13.72337 -1.74054
+ 3.09856 1.95857 0.03306
+ 1.63064 0.07168 -0.04257
+ 1.99178 -0.06482 -0.03880 -0.11590 -0.16841 #Met
+ 1019.06154 -1501.20365 733.35985 -118.79055
+ 2.18609 1.57215 0.21806
+ 1.59688 0.05049 -1.05253
+ 2.03448 -0.03722 -0.02796 -0.07020 -0.15794 #Phe
+ 106.86695 -106.89456 27.09324 -0.22643
+ 26.65625 -0.37887 0.32246
+ 1.63105 0.07107 1.25760
+ 2.02718 -0.01708 -0.00960 -0.05401 -0.06189 #Ile
+ -615.59829 969.96424 -507.35634 88.26905
+ 46.70433 0.83300 0.11943
+ 1.62975 0.07455 -0.04858
+ 1.95310 -0.05566 -0.06591 -0.07030 -0.09413 #Leu
+ 1652.27901 -2470.82365 1227.14429 -202.39631
+ 2.36688 1.74318 0.10797
+ 1.60809 0.05629 -1.08576
+ 2.03284 -0.01545 -0.02060 -0.07657 -0.08562 #Val
+ 4761.57404 -6901.80322 3328.45293 -534.03362
+ 33.52089 0.29937 0.20598
+ 1.62521 0.07389 -1.05243
+ 2.06851 -0.03319 0.01965 -0.02164 -0.09654 #Trp
+ 1638.97503 -2411.55013 1180.03365 -191.98736
+ 4.46092 1.98145 0.01623
+ 1.62608 0.06970 1.08159
+ 2.08602 -0.04157 0.01038 -0.03532 -0.13794 #Tyr
+ -107.69022 266.55612 -181.08076 37.35743
+ 4.24066 1.95577 0.01622
+ 1.63390 0.07678 1.19713
+ 1.97815 -0.06321 -0.06208 -0.11214 -0.14326 #Ala
+ 766.38404 -1127.22990 549.33368 -88.68934
+ 4.17259 1.25710 0.26371
+ 1.59573 0.05208 -1.07378
+ 2.13434 -0.05195 0.02396 0.01347 -0.17139 #Gly
+ -753.46517 1044.36067 -481.75066 74.03551
+ 4.05617 1.95337 0.05127
+ 1.64921 0.07842 0.95510
+ 2.10098 -0.02296 -0.01603 -0.03525 -0.07186 #Thr
+ 6549.16222 -9185.31294 4288.04011 -666.27514
+ 72.03562 -1.65111 0.31257
+ 1.64724 0.08296 1.13068
+ 2.09671 -0.01870 -0.02299 -0.04238 -0.06419 #Ser
+ -8004.16591 11403.06948 -5414.06076 856.73824
+ 83.62142 -2.22395 0.33449
+ 1.62636 0.07882 1.08974
+ 1.95803 -0.05083 -0.04893 -0.09656 -0.15217 #Gln
+ 814.31120 -1198.45388 584.79505 -94.59531
+ 3.23590 1.19270 0.31671
+ 1.59853 0.05034 1.11522
+ 1.97198 -0.06385 0.05392 -0.04646 -0.08177 #Asn
+ 291.96891 -449.97314 231.74382 -39.71451
+ 3.55134 1.89287 0.02937
+ 1.63346 0.08123 0.02128
+ 2.03333 -0.01495 -0.00560 -0.06888 -0.10661 #Glu
+ 125.45691 -84.06896 -8.37432 9.53694
+ 38.23766 0.87783 0.12314
+ 1.61268 0.06986 1.09398
+ 2.01204 -0.02209 -0.01758 -0.04489 -0.06184 #Asp
+ 12378.82287 -18291.64504 9002.42074 -1475.68394
+ 21.29358 0.47419 0.23987
+ 1.62195 0.07479 -1.12367
+ 2.03710 -0.04510 0.01242 -0.02475 -0.16309 #His
+ -45.83876 73.82429 -38.51477 6.68058
+ 4.89521 1.88416 0.01213
+ 1.63141 0.08680 0.02961
+ 2.05079 -0.04421 0.01084 -0.01323 -0.15358 #Arg
+ -544.97661 800.57178 -391.37329 63.77070
+ 4.55612 1.91434 0.02113
+ 1.62247 0.07063 0.83511
+ 2.00849 -0.03763 -0.02354 -0.06875 -0.13654 #Lys
+ 1123.12058 -1614.34746 770.07474 -121.86663
+ 83.25740 -7.17128 0.71018
+ 1.61550 0.07052 1.11514
+ 2.03763 0.00079 -0.00355 -0.00406 -0.00869 #Pro
+ -200705.91646 306523.02136 -155888.42030 26402.00623
+ 4.25848 2.02803 0.00189
+ 1.61462 0.07555 -1.06659
+ 1.99178 -0.06482 -0.03880 -0.11590 -0.16841 #MSe
+ 1019.06154 -1501.20365 733.35985 -118.79055
+ 2.18609 1.57215 0.21806
+ 1.59688 0.05049 -1.05253
+ 2.03448 -0.03722 -0.02796 -0.07020 -0.15794 #DBZ
+ 106.86695 -106.89456 27.09324 -0.22643
+ 26.65625 -0.37887 0.32246
+ 1.63105 0.07107 1.25760
+ 2.13434 -0.05195 0.02396 0.01347 -0.17139 #AIB
+ -753.46517 1044.36067 -481.75066 74.03551
+ 4.05617 1.95337 0.05127
+ 1.64921 0.07842 0.95510
+ 1.97815 -0.06321 -0.06208 -0.11214 -0.14326 #ABU
+ 766.38404 -1127.22990 549.33368 -88.68934
+ 4.17259 1.25710 0.26371
+ 1.59573 0.05208 -1.07378
+
& sigc0,dsc,dsc_inv,bsc,censc,gaussc,dsc0,vbl,vblinv,vblinv2,
& vbl_cis,vbl0,vbld_inv
integer nlob,loc_start,loc_end,ithet_start,ithet_end,
- & iphi_start,iphi_end
+ & iphi_start,iphi_end,itau_start,itau_end
C Parameters of the virtual-bond-angle probability distribution
- common /thetas/ a0thet(ntyp),athet(2,ntyp),bthet(2,ntyp),
- & polthet(0:3,ntyp),gthet(3,ntyp),theta0(ntyp),sig0(ntyp),
- & sigc0(ntyp)
+ common /thetas/ a0thet(-ntyp:ntyp),athet(2,-ntyp:ntyp,-1:1,-1:1)
+ & ,bthet(2,-ntyp:ntyp,-1:1,-1:1),
+ & polthet(0:3,-ntyp:ntyp),gthet(3,-ntyp:ntyp),theta0(-ntyp:ntyp),
+ &sig0(-ntyp:ntyp), sigc0(-ntyp:ntyp)
C Parameters of ab initio-derived potential of virtual-bond-angle bending
integer nthetyp,ntheterm,ntheterm2,ntheterm3,nsingle,ndouble,
& ithetyp(ntyp1),nntheterm
& ndouble,nntheterm
C Parameters of the side-chain probability distribution
common /sclocal/ dsc(ntyp1),dsc_inv(ntyp1),bsc(maxlob,ntyp),
- & censc(3,maxlob,ntyp),gaussc(3,3,maxlob,ntyp),dsc0(ntyp1),
+ & censc(3,maxlob,-ntyp:ntyp),gaussc(3,3,maxlob,-ntyp:ntyp),
+ & dsc0(ntyp1),
& nlob(ntyp1)
C Virtual-bond lenghts
common /peptbond/ vbl,vblinv,vblinv2,vbl_cis,vbl0
common /indices/ loc_start,loc_end,ithet_start,ithet_end,
- & iphi_start,iphi_end
+ & iphi_start,iphi_end,itau_start,itau_end
C Inverses of the actual virtual bond lengths
common /invlen/ vbld_inv(maxres2)
- common /names/ restyp(ntyp+1),onelet(ntyp+1)
+ common /names/ restyp(-ntyp1:ntyp1),onelet(-ntyp1:ntyp1)
character*3 restyp
character*1 onelet
character*10 ename,wname
-C Parameters of the SCCOR term
- double precision v1sccor,v2sccor
- integer nterm_sccor
- common/torsion/v1sccor(maxterm_sccor,20,20),
- & v2sccor(maxterm_sccor,20,20),
- & nterm_sccor
+cc Parameters of the SCCOR term
+ double precision v1sccor,v2sccor,vlor1sccor,
+ & vlor2sccor,vlor3sccor,gloc_sc,
+ & dcostau,dsintau,dtauangle,dcosomicron,
+ & domicron,v0sccor
+ integer nterm_sccor,isccortyp,nsccortyp,nlor_sccor
+ common /sccor/ v1sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp),
+ & v2sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp),
+ & v0sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & vlor1sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & vlor2sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & vlor3sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & gloc_sc(3,0:maxres2,10),
+ & dcostau(3,3,3,maxres2),dsintau(3,3,3,maxres2),
+ & dtauangle(3,3,3,maxres2),dcosomicron(3,3,3,maxres2),
+ & domicron(3,3,3,maxres2),
+ & nterm_sccor(-ntyp:ntyp,-ntyp:ntyp),isccortyp(-ntyp:ntyp),
+ & nsccortyp,
+ & nlor_sccor(-ntyp:ntyp,-ntyp:ntyp)
C Torsional constants of the rotation about virtual-bond dihedral angles
double precision v1,v2,vlor1,vlor2,vlor3,v0
integer itortyp,ntortyp,nterm,nlor,nterm_old
- common/torsion/v0(maxtor,maxtor),v1(maxterm,maxtor,maxtor),
- & v2(maxterm,maxtor,maxtor),vlor1(maxlor,maxtor,maxtor),
+ common/torsion/v0(-maxtor:maxtor,-maxtor:maxtor,2),
+ & v1(maxterm,-maxtor:maxtor,-maxtor:maxtor,2),
+ & v2(maxterm,-maxtor:maxtor,-maxtor:maxtor,2),
+ & vlor1(maxlor,maxtor,maxtor),
& vlor2(maxlor,maxtor,maxtor),vlor3(maxlor,maxtor,maxtor),
- & itortyp(ntyp),ntortyp,nterm(maxtor,maxtor),nlor(maxtor,maxtor)
+ & itortyp(-ntyp:ntyp),ntortyp,
+ & nterm(-maxtor:maxtor,-maxtor:maxtor,2),
+ & nlor(-maxtor:maxtor,-maxtor:maxtor,2)
& ,nterm_old
C 6/23/01 - constants for double torsionals
double precision v1c,v1s,v2c,v2s
integer ntermd_1,ntermd_2
- common /torsiond/ v1c(2,maxtermd_1,maxtor,maxtor,maxtor),
- & v1s(2,maxtermd_1,maxtor,maxtor,maxtor),
- & v2c(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor),
- & v2s(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor),
- & ntermd_1(maxtor,maxtor,maxtor),ntermd_2(maxtor,maxtor,maxtor)
+ common /torsiond/
+ &v1c(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ &v1s(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ &v2c(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2),
+ &v2s(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2),
+ & ntermd_1(-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ & ntermd_2(-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2)
C 9/18/99 - added Fourier coeffficients of the expansion of local energy
C surface
double precision b1,b2,cc,dd,ee,ctilde,dtilde,b1tilde
integer nloctyp
- common/fourier/ b1(2,maxtor),b2(2,maxtor),cc(2,2,maxtor),
- & dd(2,2,maxtor),ee(2,2,maxtor),ctilde(2,2,maxtor),
- & dtilde(2,2,maxtor),b1tilde(2,maxtor),nloctyp
+ common/fourier/ b1(2,-maxtor:maxtor),b2(2,-maxtor:maxtor),
+ & cc(2,2,-maxtor:maxtor),
+ & dd(2,2,-maxtor:maxtor),ee(2,2,-maxtor:maxtor),
+ & ctilde(2,2,-maxtor:maxtor),
+ & dtilde(2,2,-maxtor:maxtor),b1tilde(2,-maxtor:maxtor),nloctyp
double precision b
- common /fourier1/ b(13,maxtor)
+ common /fourier1/ b(13,0:maxtor)
integer ntheta,nphi,nside,nvar,ialph,ivar
double precision theta,phi,alph,omeg,vbld,vbld_ref,
& theta_ref,phi_ref,alph_ref,omeg_ref,
- & costtab,sinttab,cost2tab,sint2tab,
+ & costtab,sinttab,cost2tab,sint2tab,tauangle,omicron,
& xxtab,yytab,zztab
common /var/ theta(maxres),phi(maxres),alph(maxres),omeg(maxres),
& vbld(2*maxres),
& costtab(maxres), sinttab(maxres), cost2tab(maxres),
& sint2tab(maxres),xxtab(maxres),yytab(maxres),
& zztab(maxres),
- & ialph(maxres,2),ivar(4*maxres2),ntheta,nphi,nside,nvar
+ & ialph(maxres,2),ivar(4*maxres2),ntheta,nphi,nside,nvar,
+ & omicron(2,maxres),tauangle(3,maxres)
C Angles from experimental structure
common /varref/ vbld_ref(maxres),
& theta_ref(maxres),phi_ref(maxres),
parameter (maxtor=4,maxterm=10,maxlor=3,maxtermd_1=8,maxtermd_2=8)
c Max number of torsional terms in SCCOR
integer maxterm_sccor
- parameter (maxterm_sccor=3)
+ parameter (maxterm_sccor=6)
C Max. number of residue types and parameters in expressions for
C virtual-bond angle bending potentials
integer maxthetyp,maxthetyp1,maxtheterm,maxtheterm2,maxtheterm3,
include 'COMMON.INTERACT'
dimension xx(3)
- dsci=dsc(itype(i))
- dsci_inv=dsc_inv(itype(i))
+ dsci=dsc(iabs(itype(i)))
+ dsci_inv=dsc_inv(iabs(itype(i)))
alphi=alph(i)
omegi=omeg(i)
cosalphi=dcos(alphi)
kkk=3
c print *,'nnt=',nnt,' nct=',nct
do i=nnt+kkk,nct
- iti=itype(i)
+ iti=iabs(itype(i))
do j=nnt,i-kkk
- itj=itype(j)
+ itj=iabs(itype(j))
if (ipot.ne.4) then
c rcomp=sigmaii(iti,itj)+1.0D0
rcomp=facont*sigmaii(iti,itj)
evdw=0.0D0
evdw_t=0.0d0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
cd write (iout,*) 'i=',i,' iint=',iint,' istart=',istart(i,iint),
cd & 'iend=',iend(i,iint)
do j=istart(i,iint),iend(i,iint)
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
evdw=0.0D0
evdw_t=0.0d0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
C
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
c endif
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
dscj_inv=vbld_inv(j+nres)
chi1=chi(itypi,itypj)
chi2=chi(itypj,itypi)
c if (icall.gt.0) lprn=.true.
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
dscj_inv=vbld_inv(j+nres)
sig0ij=sigma(itypi,itypj)
chi1=chi(itypi,itypj)
c if (icall.gt.0) lprn=.true.
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
dscj_inv=vbld_inv(j+nres)
sig0ij=sigma(itypi,itypj)
r0ij=r0(itypi,itypj)
gcorr_loc(i)=0.0d0
enddo
do i=iatel_s,iatel_e
- if (itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
if (itel(i).eq.0) goto 1215
dxi=dc(1,i)
dyi=dc(2,i)
num_conti=0
c write (iout,*) 'i',i,' ielstart',ielstart(i),' ielend',ielend(i)
do j=ielstart(i),ielend(i)
- if (itype(j).eq.21 .or. itype(j+1).eq.21) cycle
+ if (itype(j).eq.ntyp1 .or. itype(j+1).eq.ntyp1) cycle
if (itel(j).eq.0) goto 1216
ind=ind+1
iteli=itel(i)
& +0.5d0*(pizda(1,1)+pizda(2,2))
enddo
endif
- else if (j.eq.i+3 .and. itype(i+2).ne.21) then
+ else if (j.eq.i+3 .and. itype(i+2).ne.ntyp1) then
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C
C Fourth-order contributions
c write (iout,*) 'iatscp_s=',iatscp_s,' iatscp_e=',iatscp_e,
c & ' scal14',scal14
do i=iatscp_s,iatscp_e
- if (itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
iteli=itel(i)
c write (iout,*) "i",i," iteli",iteli," nscp_gr",nscp_gr(i),
c & " iscp",(iscpstart(i,j),iscpend(i,j),j=1,nscp_gr(i))
do iint=1,nscp_gr(i)
do j=iscpstart(i,iint),iscpend(i,iint)
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
C Uncomment following three lines for SC-p interactions
c xj=c(1,nres+j)-xi
c yj=c(2,nres+j)-yi
endif
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
+ if (ii.gt.nres .and. iabs(itype(iii)).eq.1 .and.
+ & iabs(itype(jjj)).eq.1) then
call ssbond_ene(iii,jjj,eij)
ehpb=ehpb+2*eij
else
include 'COMMON.VAR'
include 'COMMON.IOUNITS'
double precision erij(3),dcosom1(3),dcosom2(3),gg(3)
- itypi=itype(i)
+ itypi=iabs(itype(i))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
dyi=dc_norm(2,nres+i)
dzi=dc_norm(3,nres+i)
dsci_inv=dsc_inv(itypi)
- itypj=itype(j)
+ itypj=iabs(itype(j))
dscj_inv=dsc_inv(itypj)
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
logical energy_dec /.false./
double precision u(3),ud(3)
estr=0.0d0
+ estr1=0.0d0
do i=nnt+1,nct
- if (itype(i-1).eq.21 .or. itype(i).eq.21) then
+ if (itype(i-1).eq.ntyp1 .or. itype(i).eq.ntyp1) then
estr1=estr1+gnmr1(vbld(i),-1.0d0,distchainmax)
do j=1,3
gradb(j,i-1)=gnmr1prim(vbld(i),-1.0d0,distchainmax)
endif
enddo
- estr=0.5d0*AKP*estr
+ estr=0.5d0*AKP*estr+estr1
c
c 09/18/07 AL: multimodal bond potential based on AM1 CA-SC PMF's included
c
do i=nnt,nct
- iti=itype(i)
- if (iti.ne.10 .and. iti.ne.21) then
+ iti=iabs(itype(i))
+ if (iti.ne.10 .and. iti.ne.ntyp1) then
nbi=nbondterm(iti)
if (nbi.eq.1) then
diff=vbld(i+nres)-vbldsc0(1,iti)
c write (*,'(a,i2)') 'EBEND ICG=',icg
c write (iout,*) ithet_start,ithet_end
do i=ithet_start,ithet_end
- if (itype(i-1).eq.21) cycle
+ if (itype(i-1).eq.ntyp1) cycle
C Zero the energy function and its derivative at 0 or pi.
call splinthet(theta(i),0.5d0*delta,ss,ssd)
it=itype(i-1)
- if (i.gt.3 .and. itype(i-2).ne.21) then
+ ichir1=isign(1,itype(i-2))
+ ichir2=isign(1,itype(i))
+ if (itype(i-2).eq.10) ichir1=isign(1,itype(i-1))
+ if (itype(i).eq.10) ichir2=isign(1,itype(i-1))
+ if (itype(i-1).eq.10) then
+ itype1=isign(10,itype(i-2))
+ ichir11=isign(1,itype(i-2))
+ ichir12=isign(1,itype(i-2))
+ itype2=isign(10,itype(i))
+ ichir21=isign(1,itype(i))
+ ichir22=isign(1,itype(i))
+ endif
+ if (i.gt.3 .and. itype(i-2).ne.ntyp1) then
#ifdef OSF
phii=phi(i)
icrc=0
y(1)=0.0D0
y(2)=0.0D0
endif
- if (i.lt.nres .and. itype(i).ne.21) then
+ if (i.lt.nres .and. itype(i).ne.ntyp1) then
#ifdef OSF
phii1=phi(i+1)
icrc=0
C In following comments this theta will be referred to as t_c.
thet_pred_mean=0.0d0
do k=1,2
- athetk=athet(k,it)
- bthetk=bthet(k,it)
+ athetk=athet(k,it,ichir1,ichir2)
+ bthetk=bthet(k,it,ichir1,ichir2)
+ if (it.eq.10) then
+ athetk=athet(k,itype1,ichir11,ichir12)
+ bthetk=bthet(k,itype2,ichir21,ichir22)
+ endif
thet_pred_mean=thet_pred_mean+athetk*y(k)+bthetk*z(k)
enddo
c write (iout,*) "thet_pred_mean",thet_pred_mean
thet_pred_mean=thet_pred_mean*ss+a0thet(it)
c write (iout,*) "thet_pred_mean",thet_pred_mean
C Derivatives of the "mean" values in gamma1 and gamma2.
- dthetg1=(-athet(1,it)*y(2)+athet(2,it)*y(1))*ss
- dthetg2=(-bthet(1,it)*z(2)+bthet(2,it)*z(1))*ss
+ dthetg1=(-athet(1,it,ichir1,ichir2)*y(2)
+ &+athet(2,it,ichir1,ichir2)*y(1))*ss
+ dthetg2=(-bthet(1,it,ichir1,ichir2)*z(2)
+ & +bthet(2,it,ichir1,ichir2)*z(1))*ss
+ if (it.eq.10) then
+ dthetg1=(-athet(1,itype1,ichir11,ichir12)*y(2)
+ &+athet(2,itype1,ichir11,ichir12)*y(1))*ss
+ dthetg2=(-bthet(1,itype2,ichir21,ichir22)*z(2)
+ & +bthet(2,itype2,ichir21,ichir22)*z(1))*ss
+ endif
if (theta(i).gt.pi-delta) then
call theteng(pi-delta,thet_pred_mean,theta0(it),f0,fprim0,
& E_tc0)
etheta=0.0D0
c write (iout,*) "ithetyp",(ithetyp(i),i=1,ntyp1)
do i=ithet_start,ithet_end
- if (itype(i-1).eq.21) cycle
+ if (itype(i-1).eq.ntyp1) cycle
dethetai=0.0d0
dephii=0.0d0
dephii1=0.0d0
theti2=0.5d0*theta(i)
- ityp2=ithetyp(itype(i-1))
+CC Ta zmina jest niewlasciwa
+ ityp2=ithetyp(iabs(itype(i-1)))
do k=1,nntheterm
coskt(k)=dcos(k*theti2)
sinkt(k)=dsin(k*theti2)
enddo
- if (i.gt.3 .and. itype(i-2).ne.21) then
+ if (i.gt.3 .and. itype(i-2).ne.ntyp1) then
#ifdef OSF
phii=phi(i)
if (phii.ne.phii) phii=150.0
#else
phii=phi(i)
#endif
- ityp1=ithetyp(itype(i-2))
+ ityp1=ithetyp(iabs(itype(i-2)))
do k=1,nsingle
cosph1(k)=dcos(k*phii)
sinph1(k)=dsin(k*phii)
sinph1(k)=0.0d0
enddo
endif
- if (i.lt.nres .and. itype(i).ne.21) then
+ if (i.lt.nres .and. itype(i).ne.ntyp1) then
#ifdef OSF
phii1=phi(i+1)
if (phii1.ne.phii1) phii1=150.0
#else
phii1=phi(i+1)
#endif
- ityp3=ithetyp(itype(i))
+ ityp3=ithetyp(iabs(itype(i)))
do k=1,nsingle
cosph2(k)=dcos(k*phii1)
sinph2(k)=dsin(k*phii1)
c write (iout,'(a)') 'ESC'
do i=loc_start,loc_end
it=itype(i)
- if (it.eq.21) cycle
+ if (it.eq.ntyp1) cycle
if (it.eq.10) goto 1
- nlobit=nlob(it)
+ nlobit=nlob(iabs(it))
c print *,'i=',i,' it=',it,' nlobit=',nlobit
c write (iout,*) 'i=',i,' ssa=',ssa,' ssad=',ssad
theti=theta(i+1)-pipol
do iii=-1,1
do j=1,nlobit
- expfac=dexp(bsc(j,it)-0.5D0*contr(j,iii)+emin)
+ expfac=dexp(bsc(j,iabs(it))-0.5D0*contr(j,iii)+emin)
cd print *,'j=',j,' expfac=',expfac
escloc_i=escloc_i+expfac
do k=1,3
dersc12=0.0d0
do j=1,nlobit
- expfac=dexp(bsc(j,it)-0.5D0*contr(j)+emin)
+ expfac=dexp(bsc(j,iabs(it))-0.5D0*contr(j)+emin)
escloc_i=escloc_i+expfac
do k=1,2
dersc(k)=dersc(k)+Ax(k,j)*expfac
delta=0.02d0*pi
escloc=0.0D0
do i=loc_start,loc_end
- if (itype(i).eq.21) cycle
+ if (itype(i).eq.ntyp1) cycle
costtab(i+1) =dcos(theta(i+1))
sinttab(i+1) =dsqrt(1-costtab(i+1)*costtab(i+1))
cost2tab(i+1)=dsqrt(0.5d0*(1.0d0+costtab(i+1)))
cosfac=dsqrt(cosfac2)
sinfac2=0.5d0/(1.0d0-costtab(i+1))
sinfac=dsqrt(sinfac2)
- it=itype(i)
+ it=iabs(itype(i))
if (it.eq.10) goto 1
c
C Compute the axes of tghe local cartesian coordinates system; store in
do j = 1,3
xx = xx + x_prime(j)*dc_norm(j,i+nres)
yy = yy + y_prime(j)*dc_norm(j,i+nres)
- zz = zz + z_prime(j)*dc_norm(j,i+nres)
+ zz = zz + dsign(1.0,itype(i))*z_prime(j)*dc_norm(j,i+nres)
enddo
xxtab(i)=xx
C Compute the energy of the ith side cbain
C
c write (2,*) "xx",xx," yy",yy," zz",zz
- it=itype(i)
+ it=iabs(itype(i))
do j = 1,65
x(j) = sc_parmin(j,it)
enddo
c lprn=.true.
etors=0.0D0
do i=iphi_start,iphi_end
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21
- & .or. itype(i).eq.21) cycle
+ if (itype(i-2).eq.ntyp1 .or. itype(i-1).eq.ntyp1
+ & .or. itype(i).eq.ntyp1) cycle
itori=itortyp(itype(i-2))
itori1=itortyp(itype(i-1))
phii=phi(i)
c lprn=.true.
etors=0.0D0
do i=iphi_start,iphi_end
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21
- & .or. itype(i).eq.21) cycle
+ if (itype(i-2).eq.ntyp1 .or. itype(i-1).eq.ntyp1
+ & .or. itype(i).eq.ntyp1) cycle
if (itel(i-2).eq.0 .or. itel(i-1).eq.0) goto 1215
+ if (iabs(itype(i)).eq.20) then
+ iblock=2
+ else
+ iblock=1
+ endif
itori=itortyp(itype(i-2))
itori1=itortyp(itype(i-1))
phii=phi(i)
gloci=0.0D0
C Regular cosine and sine terms
- do j=1,nterm(itori,itori1)
- v1ij=v1(j,itori,itori1)
- v2ij=v2(j,itori,itori1)
+ do j=1,nterm(itori,itori1,iblock)
+ v1ij=v1(j,itori,itori1,iblock)
+ v2ij=v2(j,itori,itori1,iblock)
cosphi=dcos(j*phii)
sinphi=dsin(j*phii)
etors=etors+v1ij*cosphi+v2ij*sinphi
C
cosphi=dcos(0.5d0*phii)
sinphi=dsin(0.5d0*phii)
- do j=1,nlor(itori,itori1)
+ do j=1,nlor(itori,itori1,iblock)
vl1ij=vlor1(j,itori,itori1)
vl2ij=vlor2(j,itori,itori1)
vl3ij=vlor3(j,itori,itori1)
gloci=gloci+vl1ij*(vl3ij*cosphi-vl2ij*sinphi)*pom
enddo
C Subtract the constant term
- etors=etors-v0(itori,itori1)
+ etors=etors-v0(itori,itori1,iblock)
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,
- & (v1(j,itori,itori1),j=1,6),(v2(j,itori,itori1),j=1,6)
+ & (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)
1215 continue
c lprn=.true.
etors_d=0.0D0
do i=iphi_start,iphi_end-1
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21
- & .or. itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i-2).eq.ntyp1 .or. itype(i-1).eq.ntyp1
+ & .or. itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
if (itel(i-2).eq.0 .or. itel(i-1).eq.0 .or. itel(i).eq.0)
& goto 1215
itori=itortyp(itype(i-2))
phii1=phi(i+1)
gloci1=0.0D0
gloci2=0.0D0
+ iblock=1
+ if (iabs(itype(i+1)).eq.20) iblock=2
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)
- v2cij=v1c(2,j,itori,itori1,itori2)
- v2sij=v1s(2,j,itori,itori1,itori2)
+ do j=1,ntermd_1(itori,itori1,itori2,iblock)
+ v1cij=v1c(1,j,itori,itori1,itori2,iblock)
+ v1sij=v1s(1,j,itori,itori1,itori2,iblock)
+ v2cij=v1c(2,j,itori,itori1,itori2,iblock)
+ v2sij=v1s(2,j,itori,itori1,itori2,iblock)
cosphi1=dcos(j*phii)
sinphi1=dsin(j*phii)
cosphi2=dcos(j*phii1)
gloci1=gloci1+j*(v1sij*cosphi1-v1cij*sinphi1)
gloci2=gloci2+j*(v2sij*cosphi2-v2cij*sinphi2)
enddo
- do k=2,ntermd_2(itori,itori1,itori2)
+ do k=2,ntermd_2(itori,itori1,itori2,iblock)
do l=1,k-1
- v1cdij = v2c(k,l,itori,itori1,itori2)
- v2cdij = v2c(l,k,itori,itori1,itori2)
- v1sdij = v2s(k,l,itori,itori1,itori2)
- v2sdij = v2s(l,k,itori,itori1,itori2)
+ v1cdij = v2c(k,l,itori,itori1,itori2,iblock)
+ v2cdij = v2c(l,k,itori,itori1,itori2,iblock)
+ v1sdij = v2s(k,l,itori,itori1,itori2,iblock)
+ v2sdij = v2s(l,k,itori,itori1,itori2,iblock)
cosphi1p2=dcos(l*phii+(k-l)*phii1)
cosphi1m2=dcos(l*phii-(k-l)*phii1)
sinphi1p2=dsin(l*phii+(k-l)*phii1)
c lprn=.true.
c write (iout,*) "EBACK_SC_COR",iphi_start,iphi_end,nterm_sccor
esccor=0.0D0
- do i=iphi_start,iphi_end
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21) cycle
+ do i=itau_start,itau_end
+ if (itype(i-2).eq.ntyp1 .or. itype(i-1).eq.ntyp1) cycle
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)
+ 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)
- esccor=esccor+v1ij*cosphi+v2ij*sinphi
- gloci=gloci+j*(v2ij*cosphi-v1ij*sinphi)
- enddo
+ if (((intertyp.eq.3).and.((itype(i-2).eq.10).or.
+ & (itype(i-1).eq.10).or.(itype(i-2).eq.ntyp1).or.
+ & (itype(i-1).eq.ntyp1)))
+ & .or. ((intertyp.eq.1).and.((itype(i-2).eq.10)
+ & .or.(itype(i-2).eq.ntyp1).or.(itype(i-1).eq.ntyp1)
+ & .or.(itype(i).eq.ntyp1)))
+ & .or.((intertyp.eq.2).and.((itype(i-1).eq.10).or.
+ & (itype(i-1).eq.ntyp1).or.(itype(i-2).eq.ntyp1).or.
+ & (itype(i-3).eq.ntyp1)))) cycle
+ if ((intertyp.eq.2).and.(i.eq.4).and.(itype(1).eq.ntyp1)) cycle
+ if ((intertyp.eq.1).and.(i.eq.nres).and.(itype(nres).eq.ntyp1))
+ & 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
+c gloci=gloci+j*(v2ij*cosphi-v1ij*sinphi)
+ enddo
+c write (iout,*) "EBACK_SC_COR",i,esccor,intertyp
+c gloc_sc(intertyp,i-3)=gloc_sc(intertyp,i-3)+wsccor*gloci
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,1,itori,itori1),j=1,6),
+ & (v2sccor(j,1,itori,itori1),j=1,6)
gsccor_loc(i-3)=gloci
+ enddo !intertyp
enddo
return
end
ires=0
do i=nnt,nct
iti=itype(i)
- if (iti.eq.21) then
+ if (iti.eq.ntyp1) then
ichain=ichain+1
ires=0
write (ipdb,'(a)') 'TER'
enddo
write (ipdb,'(a)') 'TER'
do i=nnt,nct-1
- if (itype(i).eq.21) cycle
- if (itype(i).eq.10 .and. itype(i+1).ne.21) then
+ if (itype(i).eq.ntyp1) cycle
+ if (itype(i).eq.10 .and. itype(i+1).ne.ntyp1) then
write (ipdb,30) ica(i),ica(i+1)
- else if (itype(i).ne.10 .and. itype(i+1).ne.21) then
+ else if (itype(i).ne.10 .and. itype(i+1).ne.ntyp1) then
write (ipdb,30) ica(i),ica(i+1),ica(i)+1
- else if (itype(i).ne.10 .and. itype(i+1).eq.21) then
+ else if (itype(i).ne.10 .and. itype(i+1).eq.ntyp1) then
write (ipdb,30) ica(i),ica(i)+1
endif
enddo
rr0(i)=0.0D0
a0thet(i)=0.0D0
do j=1,2
- athet(j,i)=0.0D0
- bthet(j,i)=0.0D0
+ do ichir1=-1,1
+ do ichir2=-1,1
+ athet(j,i,ichir1,ichir2)=0.0D0
+ bthet(j,i,ichir1,ichir2)=0.0D0
+ enddo
+ enddo
enddo
do j=0,3
polthet(j,i)=0.0D0
enddo
nlob(ntyp1)=0
dsc(ntyp1)=0.0D0
- do i=1,maxtor
+ do i=-maxtor,maxtor
itortyp(i)=0
- do j=1,maxtor
- do k=1,maxterm
- v1(k,j,i)=0.0D0
- v2(k,j,i)=0.0D0
- enddo
- enddo
+ do iblock=1,2
+ do j=-maxtor,maxtor
+ do k=1,maxterm
+ v1(k,j,i,iblock)=0.0D0
+ v2(k,j,i,iblock)=0.0D0
+ enddo
+ enddo
+ enddo
enddo
+ do iblock=1,2
+ do i=-maxtor,maxtor
+ do j=-maxtor,maxtor
+ do k=-maxtor,maxtor
+ do l=1,maxtermd_1
+ v1c(1,l,i,j,k,iblock)=0.0D0
+ v1s(1,l,i,j,k,iblock)=0.0D0
+ v1c(2,l,i,j,k,iblock)=0.0D0
+ v1s(2,l,i,j,k,iblock)=0.0D0
+ enddo !l
+ do l=1,maxtermd_2
+ do m=1,maxtermd_2
+ v2c(m,l,i,j,k,iblock)=0.0D0
+ v2s(m,l,i,j,k,iblock)=0.0D0
+ enddo !m
+ enddo !l
+ enddo !k
+ enddo !j
+ enddo !i
+ enddo !iblock
do i=1,maxres
itype(i)=0
itel(i)=0
include 'COMMON.NAMES'
include 'COMMON.FFIELD'
data restyp /
+ &'DD','DPR','DLY','DAR','DHI','DAS','DGL','DSG','DGN','DSN','DTH',
+ &'DYY','DAL','DTY','DTR','DVA','DLE','DIL','DPN','MED','DCY','ZER',
&'CYS','MET','PHE','ILE','LEU','VAL','TRP','TYR','ALA','GLY','THR',
&'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO','D'/
data onelet /
+ &'z','p','k','r','h','d','e','n','q','s','t','g',
+ &'a','y','w','v','l','i','f','m','c','x',
&'C','M','F','I','L','V','W','Y','A','G','T',
&'S','Q','N','E','D','H','R','K','P','X'/
data potname /'LJ','LJK','BP','GB','GBV'/
call int_bounds(nct-nnt-2,iphi_start,iphi_end)
iphi_start=iphi_start+nnt+2
iphi_end=iphi_end+nnt+2
+ call int_bounds(nres-3,itau_start,itau_end)
+ itau_start=itau_start+3
+ itau_end=itau_end+3
if (lprint) then
write (iout,*) 'Processor:',MyID,
& ' loc_start',loc_start,' loc_end',loc_end,
ithet_end=nres
iphi_start=nnt+3
iphi_end=nct
+ itau_start=4
+ itau_end=nres
#endif
return
end
enddo
be=0.0D0
if (i.gt.2) phi(i+1)=beta(i-2,i-1,i,i+1)
+ if (i.gt.2) tauangle(3,i+1)=beta(i+nres-1,i-1,i,i+nres)
+ if (i.gt.2) tauangle(1,i+1)=beta(i-1+nres,i-1,i,i+1)
+ if (i.gt.2) tauangle(2,i+1)=beta(i-2,i-1,i,i+nres)
omeg(i)=beta(nres+i,i,maxres2,i+1)
theta(i+1)=alpha(i-1,i,i+1)
alph(i)=alpha(nres+i,i,maxres2)
include 'COMMON.SCCOR'
include 'COMMON.SCROT'
character*1 t1,t2,t3
- character*1 onelett(4) /"G","A","P","D"/
+ character*1 onelett(-2:2) /"p","a","G","A","P"/
logical lprint
dimension blower(3,3,maxlob)
double precision ip,mp
C of the virtual-bond valence angles theta
C
do i=1,ntyp
- read (ithep,*) a0thet(i),(athet(j,i),j=1,2),(bthet(j,i),j=1,2)
+ read (ithep,*) a0thet(i),(athet(j,i,1,1),j=1,2),
+ & (bthet(j,i,1,1),j=1,2)
read (ithep,*) (polthet(j,i),j=0,3)
read (ithep,*) (gthet(j,i),j=1,3)
read (ithep,*) theta0(i),sig0(i),sigc0(i)
sigc0(i)=sigc0(i)**2
enddo
+ do i=1,ntyp
+ athet(1,i,1,-1)=athet(1,i,1,1)
+ athet(2,i,1,-1)=athet(2,i,1,1)
+ bthet(1,i,1,-1)=-bthet(1,i,1,1)
+ bthet(2,i,1,-1)=-bthet(2,i,1,1)
+ athet(1,i,-1,1)=-athet(1,i,1,1)
+ athet(2,i,-1,1)=-athet(2,i,1,1)
+ bthet(1,i,-1,1)=bthet(1,i,1,1)
+ bthet(2,i,-1,1)=bthet(2,i,1,1)
+ enddo
+ do i=-ntyp,-1
+ a0thet(i)=a0thet(-i)
+ athet(1,i,-1,-1)=athet(1,-i,1,1)
+ athet(2,i,-1,-1)=-athet(2,-i,1,1)
+ bthet(1,i,-1,-1)=bthet(1,-i,1,1)
+ bthet(2,i,-1,-1)=-bthet(2,-i,1,1)
+ athet(1,i,-1,1)=athet(1,-i,1,1)
+ athet(2,i,-1,1)=-athet(2,-i,1,1)
+ bthet(1,i,-1,1)=-bthet(1,-i,1,1)
+ bthet(2,i,-1,1)=bthet(2,-i,1,1)
+ athet(1,i,1,-1)=-athet(1,-i,1,1)
+ athet(2,i,1,-1)=athet(2,-i,1,1)
+ bthet(1,i,1,-1)=bthet(1,-i,1,1)
+ bthet(2,i,1,-1)=-bthet(2,-i,1,1)
+ theta0(i)=theta0(-i)
+ sig0(i)=sig0(-i)
+ sigc0(i)=sigc0(-i)
+ do j=0,3
+ polthet(j,i)=polthet(j,-i)
+ enddo
+ do j=1,3
+ gthet(j,i)=gthet(j,-i)
+ enddo
+ enddo
close (ithep)
if (lprint) then
c write (iout,'(a)')
& ' b1*10^1 ',' b2*10^1 '
do i=1,ntyp
write(iout,'(a3,1h&,2x,5(f8.3,1h&))') restyp(i),
- & a0thet(i),(100*athet(j,i),j=1,2),(10*bthet(j,i),j=1,2)
+ & a0thet(i),(100*athet(j,i,1,1),j=1,2),
+ & (10*bthet(j,i,1,1),j=1,2)
enddo
write (iout,'(/a/9x,5a/79(1h-))')
& 'Parameters of the expression for sigma(theta_c):',
enddo
bsc(1,i)=0.0D0
read(irotam,*)(censc(k,1,i),k=1,3),((blower(k,l,1),l=1,k),k=1,3)
+ censc(1,1,-i)=censc(1,1,i)
+ censc(2,1,-i)=censc(2,1,i)
+ censc(3,1,-i)=-censc(3,1,i)
do j=2,nlob(i)
read (irotam,*) bsc(j,i)
read (irotam,*) (censc(k,j,i),k=1,3),
& ((blower(k,l,j),l=1,k),k=1,3)
+ censc(1,j,-i)=censc(1,j,i)
+ censc(2,j,-i)=censc(2,j,i)
+ censc(3,j,-i)=-censc(3,j,i)
+C BSC is amplitude of Gaussian
enddo
do j=1,nlob(i)
do k=1,3
enddo
gaussc(k,l,j,i)=akl
gaussc(l,k,j,i)=akl
+ if (((k.eq.3).and.(l.ne.3))
+ & .or.((l.eq.3).and.(k.ne.3))) then
+ gaussc(k,l,j,-i)=-akl
+ gaussc(l,k,j,-i)=-akl
+ else
+ gaussc(k,l,j,-i)=akl
+ gaussc(l,k,j,-i)=akl
+ endif
enddo
enddo
enddo
read (itorp,*) ntortyp
read (itorp,*) (itortyp(i),i=1,ntyp)
write (iout,*) 'ntortyp',ntortyp
- do i=1,ntortyp
- do j=1,ntortyp
- read (itorp,*) nterm(i,j),nlor(i,j)
+ do iblock=1,2
+ do i=-ntyp,-1
+ itortyp(i)=-itortyp(-i)
+ enddo
+c write (iout,*) 'ntortyp',ntortyp
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ read (itorp,*) nterm(i,j,iblock),
+ & nlor(i,j,iblock)
+ nterm(-i,-j,iblock)=nterm(i,j,iblock)
+ nlor(-i,-j,iblock)=nlor(i,j,iblock)
v0ij=0.0d0
si=-1.0d0
- do k=1,nterm(i,j)
- read (itorp,*) kk,v1(k,i,j),v2(k,i,j)
- v0ij=v0ij+si*v1(k,i,j)
+ do k=1,nterm(i,j,iblock)
+ read (itorp,*) kk,v1(k,i,j,iblock),
+ & v2(k,i,j,iblock)
+ v1(k,-i,-j,iblock)=v1(k,i,j,iblock)
+ v2(k,-i,-j,iblock)=-v2(k,i,j,iblock)
+ v0ij=v0ij+si*v1(k,i,j,iblock)
si=-si
enddo
- do k=1,nlor(i,j)
- read (itorp,*) kk,vlor1(k,i,j),vlor2(k,i,j),vlor3(k,i,j)
+ do k=1,nlor(i,j,iblock)
+ read (itorp,*) kk,vlor1(k,i,j),
+ & vlor2(k,i,j),vlor3(k,i,j)
v0ij=v0ij+vlor1(k,i,j)/(1+vlor3(k,i,j)**2)
enddo
- v0(i,j)=v0ij
+ v0(i,j,iblock)=v0ij
+ v0(-i,-j,iblock)=v0ij
enddo
enddo
+ enddo
close (itorp)
if (lprint) then
write (iout,'(/a/)') 'Torsional constants:'
do j=1,ntortyp
write (iout,*) 'ityp',i,' jtyp',j
write (iout,*) 'Fourier constants'
- do k=1,nterm(i,j)
- write (iout,'(2(1pe15.5))') v1(k,i,j),v2(k,i,j)
+ do k=1,nterm(i,j,iblock)
+ write (iout,'(2(1pe15.5))') v1(k,i,j,iblock),
+ & v2(k,i,j,iblock)
enddo
write (iout,*) 'Lorenz constants'
- do k=1,nlor(i,j)
+ do k=1,nlor(i,j,iblock)
write (iout,'(3(1pe15.5))')
& vlor1(k,i,j),vlor2(k,i,j),vlor3(k,i,j)
enddo
C
C 6/23/01 Read parameters for double torsionals
C
- do i=1,ntortyp
- do j=1,ntortyp
- do k=1,ntortyp
+ do iblock=1,2
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ do k=-ntortyp+1,ntortyp-1
read (itordp,'(3a1)') t1,t2,t3
if (t1.ne.onelett(i) .or. t2.ne.onelett(j)
& .or. t3.ne.onelett(k)) then
& i,j,k,t1,t2,t3
stop "Error in double torsional parameter file"
endif
- read (itordp,*) ntermd_1(i,j,k),ntermd_2(i,j,k)
- read (itordp,*) (v1c(1,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) (v1s(1,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) (v1c(2,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) (v1s(2,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) ((v2c(l,m,i,j,k),v2c(m,l,i,j,k),
- & v2s(l,m,i,j,k),v2s(m,l,i,j,k),m=1,l-1),l=1,ntermd_2(i,j,k))
- enddo
- enddo
- enddo
+ read (itordp,*) ntermd_1(i,j,k,iblock),
+ & ntermd_2(i,j,k,iblock)
+ ntermd_1(-i,-j,-k,iblock)=ntermd_1(i,j,k,iblock)
+ ntermd_2(-i,-j,-k,iblock)=ntermd_2(i,j,k,iblock)
+ read (itordp,*) (v1c(1,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*) (v1s(1,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*) (v1c(2,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*) (v1s(2,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+C Martix of D parameters for one dimesional foureir series
+ do l=1,ntermd_1(i,j,k,iblock)
+ v1c(1,l,-i,-j,-k,iblock)=v1c(1,l,i,j,k,iblock)
+ v1s(1,l,-i,-j,-k,iblock)=-v1s(1,l,i,j,k,iblock)
+ v1c(2,l,-i,-j,-k,iblock)=v1c(2,l,i,j,k,iblock)
+ v1s(2,l,-i,-j,-k,iblock)=-v1s(2,l,i,j,k,iblock)
+c write(iout,*) "whcodze" ,
+c & v1s(2,l,-i,-j,-k,iblock),v1s(2,l,i,j,k,iblock)
+ enddo
+ read (itordp,*) ((v2c(l,m,i,j,k,iblock),
+ & v2c(m,l,i,j,k,iblock),v2s(l,m,i,j,k,iblock),
+ & v2s(m,l,i,j,k,iblock),
+ & m=1,l-1),l=1,ntermd_2(i,j,k,iblock))
+C Martix of D parameters for two dimesional fourier series
+ do l=1,ntermd_2(i,j,k,iblock)
+ do m=1,l-1
+ v2c(l,m,-i,-j,-k,iblock)=v2c(l,m,i,j,k,iblock)
+ v2c(m,l,-i,-j,-k,iblock)=v2c(m,l,i,j,k,iblock)
+ v2s(l,m,-i,-j,-k,iblock)=-v2s(l,m,i,j,k,iblock)
+ v2s(m,l,-i,-j,-k,iblock)=-v2s(m,l,i,j,k,iblock)
+ enddo!m
+ enddo!l
+ enddo!k
+ enddo!j
+ enddo!i
+ enddo!iblock
if (lprint) then
write (iout,*)
write (iout,*) 'Constants for double torsionals'
- do i=1,ntortyp
- do j=1,ntortyp
- do k=1,ntortyp
+ do iblock=1,2
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ do k=-ntortyp+1,ntortyp-1
write (iout,*) 'ityp',i,' jtyp',j,' ktyp',k,
- & ' nsingle',ntermd_1(i,j,k),' ndouble',ntermd_2(i,j,k)
+ & ' nsingle',ntermd_1(i,j,k,iblock),
+ & ' ndouble',ntermd_2(i,j,k,iblock)
write (iout,*)
write (iout,*) 'Single angles:'
- do l=1,ntermd_1(i,j,k)
- write (iout,'(i5,2f10.5,5x,2f10.5)') l,
- & v1c(1,l,i,j,k),v1s(1,l,i,j,k),
- & v1c(2,l,i,j,k),v1s(2,l,i,j,k)
+ do l=1,ntermd_1(i,j,k,iblock)
+ write (iout,'(i5,2f10.5,5x,2f10.5,5x,2f10.5)') l,
+ & v1c(1,l,i,j,k,iblock),v1s(1,l,i,j,k,iblock),
+ & v1c(2,l,i,j,k,iblock),v1s(2,l,i,j,k,iblock),
+ & v1s(1,l,-i,-j,-k,iblock),v1s(2,l,-i,-j,-k,iblock)
enddo
write (iout,*)
write (iout,*) 'Pairs of angles:'
- write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k))
- do l=1,ntermd_2(i,j,k)
- write (iout,'(i5,20f10.5)')
- & l,(v2c(l,m,i,j,k),m=1,ntermd_2(i,j,k))
+ write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k,iblock))
+ do l=1,ntermd_2(i,j,k,iblock)
+ write (iout,'(i5,20f10.5)')
+ & l,(v2c(l,m,i,j,k,iblock),m=1,ntermd_2(i,j,k,iblock))
enddo
write (iout,*)
- write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k))
- do l=1,ntermd_2(i,j,k)
- write (iout,'(i5,20f10.5)')
- & l,(v2s(l,m,i,j,k),m=1,ntermd_2(i,j,k))
+ write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k,iblock))
+ do l=1,ntermd_2(i,j,k,iblock)
+ write (iout,'(i5,20f10.5)')
+ & l,(v2s(l,m,i,j,k,iblock),m=1,ntermd_2(i,j,k,iblock)),
+ & (v2s(l,m,-i,-j,-k,iblock),m=1,ntermd_2(i,j,k,iblock))
enddo
write (iout,*)
enddo
enddo
enddo
+ enddo
endif
#endif
C
-C 5/21/07 (AL) Read coefficients of the backbone-local sidechain-local
-C correlation energies.
-C
- read (isccor,*) nterm_sccor
- do i=1,20
- do j=1,20
- read (isccor,'(a)')
- do k=1,nterm_sccor
- read (isccor,*)
- & kk,v1sccor(k,i,j),v2sccor(k,i,j)
+C Read of Side-chain backbone correlation parameters
+C Modified 11 May 2012 by Adasko
+CCC
+ read (isccor,*) nsccortyp
+ read (isccor,*) (isccortyp(i),i=1,ntyp)
+ do i=-ntyp,-1
+ isccortyp(i)=-isccortyp(-i)
+ enddo
+ iscprol=isccortyp(20)
+c write (iout,*) 'ntortyp',ntortyp
+ maxinter=3
+cc maxinter is maximum interaction sites
+ do l=1,maxinter
+ do i=1,nsccortyp
+ do j=1,nsccortyp
+ read (isccor,*)
+ &nterm_sccor(i,j),nlor_sccor(i,j)
+ v0ijsccor=0.0d0
+ v0ijsccor1=0.0d0
+ v0ijsccor2=0.0d0
+ v0ijsccor3=0.0d0
+ si=-1.0d0
+ nterm_sccor(-i,j)=nterm_sccor(i,j)
+ nterm_sccor(-i,-j)=nterm_sccor(i,j)
+ nterm_sccor(i,-j)=nterm_sccor(i,j)
+ do k=1,nterm_sccor(i,j)
+ read (isccor,*) kk,v1sccor(k,l,i,j)
+ & ,v2sccor(k,l,i,j)
+ if (j.eq.iscprol) then
+ if (i.eq.isccortyp(10)) then
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ else
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)*0.5d0
+ & +v2sccor(k,l,i,j)*dsqrt(0.75d0)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)*0.5d0
+ & +v1sccor(k,l,i,j)*dsqrt(0.75d0)
+ v1sccor(k,l,-i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,-j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,-j)
+ endif
+ else
+ if (i.eq.isccortyp(10)) then
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ else
+ if (j.eq.isccortyp(10)) then
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,j)
+ else
+ v1sccor(k,l,i,-j)=-v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,-j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,-j)
+ endif
+ endif
+ endif
+ v0ijsccor=v0ijsccor+si*v1sccor(k,l,i,j)
+ v0ijsccor1=v0ijsccor+si*v1sccor(k,l,-i,j)
+ v0ijsccor2=v0ijsccor+si*v1sccor(k,l,i,-j)
+ v0ijsccor3=v0ijsccor+si*v1sccor(k,l,-i,-j)
+ si=-si
+ enddo
+ do k=1,nlor_sccor(i,j)
+ read (isccor,*) kk,vlor1sccor(k,i,j),
+ & vlor2sccor(k,i,j),vlor3sccor(k,i,j)
+ v0ijsccor=v0ijsccor+vlor1sccor(k,i,j)/
+ &(1+vlor3sccor(k,i,j)**2)
enddo
+ v0sccor(l,i,j)=v0ijsccor
+ v0sccor(l,-i,j)=v0ijsccor1
+ v0sccor(l,i,-j)=v0ijsccor2
+ v0sccor(l,-i,-j)=v0ijsccor3
+ enddo
enddo
enddo
close (isccor)
if (lprint) then
write (iout,'(/a/)') 'Torsional constants of SCCORR:'
- do i=1,20
- do j=1,20
+ do i=1,nsccortyp
+ do j=1,nsccortyp
write (iout,*) 'ityp',i,' jtyp',j
- do k=1,nterm_sccor
- write (iout,'(2(1pe15.5))') v1sccor(k,i,j),v2sccor(k,i,j)
+ write (iout,*) 'Fourier constants'
+ do k=1,nterm_sccor(i,j)
+ write (iout,'(2(1pe15.5))')
+ & v1sccor(k,l,i,j),v2sccor(k,l,i,j)
+ enddo
+ write (iout,*) 'Lorenz constants'
+ do k=1,nlor_sccor(i,j)
+ write (iout,'(3(1pe15.5))')
+ & vlor1sccor(k,i,j),vlor2sccor(k,i,j),vlor3sccor(k,i,j)
enddo
enddo
enddo
C interaction energy of the Gly, Ala, and Pro prototypes.
C
read (ifourier,*) nloctyp
- do i=1,nloctyp
+ do i=0,nloctyp-1
read (ifourier,*)
read (ifourier,*) (b(ii,i),ii=1,13)
if (lprint) then
endif
B1(1,i) = b(3,i)
B1(2,i) = b(5,i)
+ B1(1,-i) = b(3,i)
+ B1(2,-i) = -b(5,i)
B1tilde(1,i) = b(3,i)
B1tilde(2,i) =-b(5,i)
+ B1tilde(1,-i) =-b(3,i)
+ B1tilde(2,-i) =b(5,i)
B2(1,i) = b(2,i)
B2(2,i) = b(4,i)
+ B2(1,-i) =b(2,i)
+ B2(2,-i) =-b(4,i)
CC(1,1,i)= b(7,i)
CC(2,2,i)=-b(7,i)
CC(2,1,i)= b(9,i)
CC(1,2,i)= b(9,i)
+ CC(1,1,-i)= b(7,i)
+ CC(2,2,-i)=-b(7,i)
+ CC(2,1,-i)=-b(9,i)
+ CC(1,2,-i)=-b(9,i)
Ctilde(1,1,i)=b(7,i)
Ctilde(1,2,i)=b(9,i)
Ctilde(2,1,i)=-b(9,i)
Ctilde(2,2,i)=b(7,i)
+ Ctilde(1,1,-i)=b(7,i)
+ Ctilde(1,2,-i)=-b(9,i)
+ Ctilde(2,1,-i)=b(9,i)
+ Ctilde(2,2,-i)=b(7,i)
DD(1,1,i)= b(6,i)
DD(2,2,i)=-b(6,i)
DD(2,1,i)= b(8,i)
DD(1,2,i)= b(8,i)
+ DD(1,1,-i)= b(6,i)
+ DD(2,2,-i)=-b(6,i)
+ DD(2,1,-i)=-b(8,i)
+ DD(1,2,-i)=-b(8,i)
Dtilde(1,1,i)=b(6,i)
Dtilde(1,2,i)=b(8,i)
Dtilde(2,1,i)=-b(8,i)
Dtilde(2,2,i)=b(6,i)
+ Dtilde(1,1,-i)=b(6,i)
+ Dtilde(1,2,-i)=-b(8,i)
+ Dtilde(2,1,-i)=b(8,i)
+ Dtilde(2,2,-i)=b(6,i)
EE(1,1,i)= b(10,i)+b(11,i)
EE(2,2,i)=-b(10,i)+b(11,i)
EE(2,1,i)= b(12,i)-b(13,i)
EE(1,2,i)= b(12,i)+b(13,i)
+ EE(1,1,-i)= b(10,i)+b(11,i)
+ EE(2,2,-i)=-b(10,i)+b(11,i)
+ EE(2,1,-i)=-b(12,i)+b(13,i)
+ EE(1,2,-i)=-b(12,i)-b(13,i)
enddo
if (lprint) then
do i=1,nloctyp
enddo
do j=nnt,nct
itj=itype(j)
- if (itype(j).ne.10 .and. (vbld(nres+j)-dsc(itj)).gt.2.0d0) then
+ if (itype(j).ne.10 .and. (vbld(nres+j)-dsc(iabs(itj))).gt.2.0d0)
+ & then
write (iout,*) "Conformation",jjj,jj+1
write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j)
write (iout,*) "The Cartesian geometry is:"
else if (card(:3).eq.'TER') then
C End current chain
ires_old=ires+1
- itype(ires_old)=21
+ itype(ires_old)=ntyp1
ibeg=2
c write (iout,*) "Chain ended",ires,ishift,ires_old
call sccenter(ires,iii,sccor)
ishift=ires-1
if (res.ne.'GLY' .and. res.ne. 'ACE') then
ishift=ishift-1
- itype(1)=21
+ itype(1)=ntyp1
endif
c write (iout,*) "ires",ires," ibeg",ibeg," ishift",ishift
ibeg=0
nres=ires
do i=2,nres-1
c write (iout,*) i,itype(i)
- if (itype(i).eq.21) then
+ if (itype(i).eq.ntyp1) then
c write (iout,*) "dummy",i,itype(i)
do j=1,3
c(j,i)=((c(j,i-1)+c(j,i+1))/2+2*c(j,i-1)-c(j,i-2))/2
nstart_sup=1
if (itype(nres).ne.10) then
nres=nres+1
- itype(nres)=21
+ itype(nres)=ntyp1
do j=1,3
dcj=c(j,nres-2)-c(j,nres-3)
c(j,nres)=c(j,nres-1)+dcj
c(j,nres+1)=c(j,1)
c(j,2*nres)=c(j,nres)
enddo
- if (itype(1).eq.21) then
+ if (itype(1).eq.ntyp1) then
nsup=nsup-1
nstart_sup=2
do j=1,3
call reada(weightcard,'WTURN4',wturn4,1.0D0)
call reada(weightcard,'WTURN6',wturn6,1.0D0)
call reada(weightcard,'WSTRAIN',wstrain,1.0D0)
+ call reada(weightcard,'WSCCOR',wsccor,1.0D0)
call reada(weightcard,'WBOND',wbond,1.0D0)
call reada(weightcard,'WTOR',wtor,1.0D0)
call reada(weightcard,'WTORD',wtor_d,1.0D0)
weights(16)=wvdwpp
weights(17)=wbond
weights(18)=scal14
+ weights(19)=wsccor
write (iout,10) wsc,wscp,welec,wvdwpp,wbond,wang,wscloc,wtor,
& wtor_d,wstrain,wel_loc,wcorr,wcorr5,wcorr6,wturn3,
- & wturn4,wturn6
+ & wturn4,wturn6,wsccor
10 format (/'Energy-term weights (unscaled):'//
& 'WSCC= ',f10.6,' (SC-SC)'/
& 'WSCP= ',f10.6,' (SC-p)'/
& 'WCORR6= ',f10.6,' (multi-body 6th order)'/
& 'WTURN3= ',f10.6,' (turns, 3rd order)'/
& 'WTURN4= ',f10.6,' (turns, 4th order)'/
- & 'WTURN6= ',f10.6,' (turns, 6th order)')
+ & 'WTURN6= ',f10.6,' (turns, 6th order)'/
+ & 'WSCCOR= ',f10.6,' (SC-backbone torsinal correalations)')
+
if (wcorr4.gt.0.0d0) then
write (iout,'(/2a/)') 'Local-electrostatic type correlation ',
& 'between contact pairs of peptide groups'
do i=1,nres
#ifdef PROCOR
- if (itype(i).eq.21 .or. itype(i+1).eq.21) then
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) then
#else
- if (itype(i).eq.21) then
+ if (itype(i).eq.ntyp1) then
#endif
itel(i)=0
#ifdef PROCOR
- else if (itype(i+1).ne.20) then
+ else if (iabs(itype(i+1)).ne.20) then
#else
- else if (itype(i).ne.20) then
+ else if (iabs(itype(i)).ne.20) then
#endif
itel(i)=1
else
nnt=1
nct=nres
print *,'NNT=',NNT,' NCT=',NCT
- if (itype(1).eq.21) nnt=2
- if (itype(nres).eq.21) nct=nct-1
+ if (itype(1).eq.ntyp1) nnt=2
+ if (itype(nres).eq.ntyp1) nct=nct-1
if (nstart.lt.nnt) nstart=nnt
if (nend.gt.nct .or. nend.eq.0) nend=nct
write (iout,*) "nstart",nstart," nend",nend
if (itype.eq.0) then
- do i=1,ntyp1
+ do i=-ntyp1,ntyp1
if (ucase(nam).eq.restyp(i)) then
rescode=i
return
else
- do i=1,ntyp1
+ do i=-ntyp1,ntyp1
if (nam(1:1).eq.onelet(i)) then
rescode=i
return
integer nlob,loc_start,loc_end,ithet_start,ithet_end,
& iphi_start,iphi_end,itau_start,itau_end
C Parameters of the virtual-bond-angle probability distribution
- common /thetas/ a0thet(ntyp),athet(2,ntyp),bthet(2,ntyp),
- & polthet(0:3,ntyp),gthet(3,ntyp),theta0(ntyp),sig0(ntyp),
- & sigc0(ntyp)
+ common /thetas/ a0thet(-ntyp:ntyp),athet(2,-ntyp:ntyp,-1:1,-1:1)
+ & ,bthet(2,-ntyp:ntyp,-1:1,-1:1),
+ & polthet(0:3,-ntyp:ntyp),gthet(3,-ntyp:ntyp),theta0(-ntyp:ntyp),
+ &sig0(-ntyp:ntyp), sigc0(-ntyp:ntyp)
C Parameters of ab initio-derived potential of virtual-bond-angle bending
integer nthetyp,ntheterm,ntheterm2,ntheterm3,nsingle,ndouble,
& ithetyp(ntyp1),nntheterm
& ndouble,nntheterm
C Parameters of the side-chain probability distribution
common /sclocal/ dsc(ntyp1),dsc_inv(ntyp1),bsc(maxlob,ntyp),
- & censc(3,maxlob,ntyp),gaussc(3,3,maxlob,ntyp),dsc0(ntyp1),
+ & censc(3,maxlob,-ntyp:ntyp),gaussc(3,3,maxlob,-ntyp:ntyp),
+ & dsc0(ntyp1),
& nlob(ntyp1)
C Virtual-bond lenghts
common /peptbond/ vbl,vblinv,vblinv2,vbl_cis,vbl0
- common /names/ restyp(ntyp+1),onelet(ntyp+1)
+ common /names/ restyp(-ntyp1:ntyp1),onelet(-ntyp1:ntyp1)
character*3 restyp
character*1 onelet
character*10 ename,wname
& dcostau,dsintau,dtauangle,dcosomicron,
& domicron
integer nterm_sccor,isccortyp,nsccortyp,nlor_sccor
- common/sccor/v1sccor(maxterm_sccor,3,20,20),
- & v2sccor(maxterm_sccor,3,20,20),
- & v0sccor(maxterm_sccor,20),
- & vlor1sccor(maxterm_sccor,20,20),
- & vlor2sccor(maxterm_sccor,20,20),
- & vlor3sccor(maxterm_sccor,20,20),gloc_sc(3,0:maxres2,10),
+ common/sccor/v1sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp),
+ & v2sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp),
+ & v0sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & vlor1sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & vlor2sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & vlor3sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & gloc_sc(3,0:maxres2,10),
& dcostau(3,3,3,maxres2),dsintau(3,3,3,maxres2),
& dtauangle(3,3,3,maxres2),dcosomicron(3,3,3,maxres2),
& domicron(3,3,3,maxres2),
- & nterm_sccor(ntyp,ntyp),isccortyp(ntyp),nsccortyp,
+ & nterm_sccor(-ntyp:ntyp,-ntyp:ntyp),isccortyp(-ntyp:ntyp)
+ & ,nsccortyp,
& nlor_sccor(ntyp,ntyp)
C Torsional constants of the rotation about virtual-bond dihedral angles
double precision v1,v2,vlor1,vlor2,vlor3,v0
integer itortyp,ntortyp,nterm,nlor,nterm_old
- common/torsion/v0(maxtor,maxtor),v1(maxterm,maxtor,maxtor),
- & v2(maxterm,maxtor,maxtor),vlor1(maxlor,maxtor,maxtor),
+ common/torsion/v0(-maxtor:maxtor,-maxtor:maxtor,2),
+ & v1(maxterm,-maxtor:maxtor,-maxtor:maxtor,2),
+ & v2(maxterm,-maxtor:maxtor,-maxtor:maxtor,2),
+ & vlor1(maxlor,maxtor,maxtor),
& vlor2(maxlor,maxtor,maxtor),vlor3(maxlor,maxtor,maxtor),
- & itortyp(ntyp),ntortyp,nterm(maxtor,maxtor),nlor(maxtor,maxtor)
+ & itortyp(-ntyp:ntyp),ntortyp,
+ & nterm(-maxtor:maxtor,-maxtor:maxtor,2),
+ & nlor(-maxtor:maxtor,-maxtor:maxtor,2)
& ,nterm_old
C 6/23/01 - constants for double torsionals
double precision v1c,v1s,v2c,v2s
integer ntermd_1,ntermd_2
- common /torsiond/ v1c(2,maxtermd_1,maxtor,maxtor,maxtor),
- & v1s(2,maxtermd_1,maxtor,maxtor,maxtor),
- & v2c(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor),
- & v2s(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor),
- & ntermd_1(maxtor,maxtor,maxtor),ntermd_2(maxtor,maxtor,maxtor)
+ common /torsiond/
+ &v1c(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ &v1s(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ &v2c(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2),
+ &v2s(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2),
+ & ntermd_1(-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ & ntermd_2(-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2)
C 9/18/99 - added Fourier coeffficients of the expansion of local energy
C surface
double precision b1,b2,cc,dd,ee,ctilde,dtilde,b1tilde
integer nloctyp
- common/fourier/ b1(2,maxtor),b2(2,maxtor),cc(2,2,maxtor),
- & dd(2,2,maxtor),ee(2,2,maxtor),ctilde(2,2,maxtor),
- & dtilde(2,2,maxtor),b1tilde(2,maxtor),nloctyp
+ common/fourier/ b1(2,-maxtor:maxtor),b2(2,-maxtor:maxtor),
+ & cc(2,2,-maxtor:maxtor),
+ & dd(2,2,-maxtor:maxtor),ee(2,2,-maxtor:maxtor),
+ & ctilde(2,2,-maxtor:maxtor),
+ & dtilde(2,2,-maxtor:maxtor),b1tilde(2,-maxtor:maxtor),nloctyp
double precision b
- common /fourier1/ b(13,maxtor)
+ common /fourier1/ b(13,0:maxtor)
include 'COMMON.INTERACT'
dimension xx(3)
- dsci=dsc(itype(i))
- dsci_inv=dsc_inv(itype(i))
+ dsci=dsc(iabs(itype(i)))
+ dsci_inv=dsc_inv(iabs(itype(i)))
alphi=alph(i)
omegi=omeg(i)
cosalphi=dcos(alphi)
kkk=3
c print *,'nnt=',nnt,' nct=',nct
do i=nnt+kkk,nct
- iti=itype(i)
+ iti=iabs(itype(i))
do j=nnt,i-kkk
- itj=itype(j)
+ itj=iabs(itype(j))
if (ipot.ne.4) then
c rcomp=sigmaii(iti,itj)+1.0D0
rcomp=facont*sigmaii(iti,itj)
cd print *,'Entering ELJ nnt=',nnt,' nct=',nct,' expon=',expon
evdw=0.0D0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
cd write (iout,*) 'i=',i,' iint=',iint,' istart=',istart(i,iint),
cd & 'iend=',iend(i,iint)
do j=istart(i,iint),iend(i,iint)
- itypj=itype(j)
+ itypj=iabs(itype(j))
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
c print *,'Entering ELJK nnt=',nnt,' nct=',nct,' expon=',expon
evdw=0.0D0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
C
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
- itypj=itype(j)
+ itypj=iabs(itype(j))
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
c endif
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
+ itypj=iabs(itype(j))
dscj_inv=vbld_inv(j+nres)
chi1=chi(itypi,itypj)
chi2=chi(itypj,itypi)
c if (icall.gt.0) lprn=.true.
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
+ itypj=iabs(itype(j))
dscj_inv=vbld_inv(j+nres)
sig0ij=sigma(itypi,itypj)
chi1=chi(itypi,itypj)
c if (icall.gt.0) lprn=.true.
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
+ itypj=iabs(itype(j))
dscj_inv=vbld_inv(j+nres)
sig0ij=sigma(itypi,itypj)
r0ij=r0(itypi,itypj)
do iint=1,nscp_gr(i)
do j=iscpstart(i,iint),iscpend(i,iint)
- itypj=itype(j)
+ itypj=iabs(itype(j))
C Uncomment following three lines for SC-p interactions
c xj=c(1,nres+j)-xi
c yj=c(2,nres+j)-yi
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
+ if (ii.gt.nres .and. iabs(itype(iii)).eq.1 .and.
+ & iabs( itype(jjj)).eq.1) then
call ssbond_ene(iii,jjj,eij)
ehpb=ehpb+2*eij
cd write (iout,*) "eij",eij
include 'COMMON.VAR'
include 'COMMON.IOUNITS'
double precision erij(3),dcosom1(3),dcosom2(3),gg(3)
- itypi=itype(i)
+ itypi=iabs(itype(i))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
dyi=dc_norm(2,nres+i)
dzi=dc_norm(3,nres+i)
dsci_inv=dsc_inv(itypi)
- itypj=itype(j)
+ itypj=iabs(itype(j))
dscj_inv=dsc_inv(itypj)
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
c 09/18/07 AL: multimodal bond potential based on AM1 CA-SC PMF's included
c
do i=nnt,nct
- iti=itype(i)
+ iti=iabs(itype(i))
if (iti.ne.10) then
nbi=nbondterm(iti)
if (nbi.eq.1) then
C Zero the energy function and its derivative at 0 or pi.
call splinthet(theta(i),0.5d0*delta,ss,ssd)
it=itype(i-1)
+ ichir1=isign(1,itype(i-2))
+ ichir2=isign(1,itype(i))
+ if (itype(i-2).eq.10) ichir1=isign(1,itype(i-1))
+ if (itype(i).eq.10) ichir2=isign(1,itype(i-1))
+ if (itype(i-1).eq.10) then
+ itype1=isign(10,itype(i-2))
+ ichir11=isign(1,itype(i-2))
+ ichir12=isign(1,itype(i-2))
+ itype2=isign(10,itype(i))
+ ichir21=isign(1,itype(i))
+ ichir22=isign(1,itype(i))
+ endif
c if (i.gt.ithet_start .and.
c & (itel(i-1).eq.0 .or. itel(i-2).eq.0)) goto 1215
c if (i.gt.3 .and. (i.le.4 .or. itel(i-3).ne.0)) then
C In following comments this theta will be referred to as t_c.
thet_pred_mean=0.0d0
do k=1,2
- athetk=athet(k,it)
- bthetk=bthet(k,it)
+ athetk=athet(k,it,ichir1,ichir2)
+ bthetk=bthet(k,it,ichir1,ichir2)
+ if (it.eq.10) then
+ athetk=athet(k,itype1,ichir11,ichir12)
+ bthetk=bthet(k,itype2,ichir21,ichir22)
+ endif
thet_pred_mean=thet_pred_mean+athetk*y(k)+bthetk*z(k)
enddo
c write (iout,*) "thet_pred_mean",thet_pred_mean
thet_pred_mean=thet_pred_mean*ss+a0thet(it)
c write (iout,*) "thet_pred_mean",thet_pred_mean
C Derivatives of the "mean" values in gamma1 and gamma2.
- dthetg1=(-athet(1,it)*y(2)+athet(2,it)*y(1))*ss
- dthetg2=(-bthet(1,it)*z(2)+bthet(2,it)*z(1))*ss
+ dthetg1=(-athet(1,it,ichir1,ichir2)*y(2)
+ &+athet(2,it,ichir1,ichir2)*y(1))*ss
+ dthetg2=(-bthet(1,it,ichir1,ichir2)*z(2)
+ & +bthet(2,it,ichir1,ichir2)*z(1))*ss
+ if (it.eq.10) then
+ dthetg1=(-athet(1,itype1,ichir11,ichir12)*y(2)
+ &+athet(2,itype1,ichir11,ichir12)*y(1))*ss
+ dthetg2=(-bthet(1,itype2,ichir21,ichir22)*z(2)
+ & +bthet(2,itype2,ichir21,ichir22)*z(1))*ss
+ endif
if (theta(i).gt.pi-delta) then
call theteng(pi-delta,thet_pred_mean,theta0(it),f0,fprim0,
& E_tc0)
dephii=0.0d0
dephii1=0.0d0
theti2=0.5d0*theta(i)
- ityp2=ithetyp(itype(i-1))
+CC Ta zmiana jest niewlasciwa
+ ityp2=ithetyp(iabs(itype(i-1)))
do k=1,nntheterm
coskt(k)=dcos(k*theti2)
sinkt(k)=dsin(k*theti2)
#else
phii=phi(i)
#endif
- ityp1=ithetyp(itype(i-2))
+ ityp1=ithetyp(iabs(itype(i-2)))
do k=1,nsingle
cosph1(k)=dcos(k*phii)
sinph1(k)=dsin(k*phii)
#else
phii1=phi(i+1)
#endif
- ityp3=ithetyp(itype(i))
+ ityp3=ithetyp(iabs(itype(i)))
do k=1,nsingle
cosph2(k)=dcos(k*phii1)
sinph2(k)=dsin(k*phii1)
do i=loc_start,loc_end
it=itype(i)
if (it.eq.10) goto 1
- nlobit=nlob(it)
+ nlobit=nlob(iabs(it))
c print *,'i=',i,' it=',it,' nlobit=',nlobit
c write (iout,*) 'i=',i,' ssa=',ssa,' ssad=',ssad
theti=theta(i+1)-pipol
do iii=-1,1
do j=1,nlobit
- expfac=dexp(bsc(j,it)-0.5D0*contr(j,iii)+emin)
+ expfac=dexp(bsc(j,iabs(it))-0.5D0*contr(j,iii)+emin)
cd print *,'j=',j,' expfac=',expfac
escloc_i=escloc_i+expfac
do k=1,3
dersc12=0.0d0
do j=1,nlobit
- expfac=dexp(bsc(j,it)-0.5D0*contr(j)+emin)
+ expfac=dexp(bsc(j,iabs(it))-0.5D0*contr(j)+emin)
escloc_i=escloc_i+expfac
do k=1,2
dersc(k)=dersc(k)+Ax(k,j)*expfac
cosfac=dsqrt(cosfac2)
sinfac2=0.5d0/(1.0d0-costtab(i+1))
sinfac=dsqrt(sinfac2)
- it=itype(i)
+ it=iabs(itype(i))
if (it.eq.10) goto 1
c
C Compute the axes of tghe local cartesian coordinates system; store in
xx = xx + x_prime(j)*dc_norm(j,i+nres)
yy = yy + y_prime(j)*dc_norm(j,i+nres)
zz = zz + z_prime(j)*dc_norm(j,i+nres)
+ zz = zz + dsign(1.0,itype(i))*z_prime(j)*dc_norm(j,i+nres)
enddo
xxtab(i)=xx
yytab(i)=yy
zztab(i)=zz
+
C
C Compute the energy of the ith side cbain
C
c write (2,*) "xx",xx," yy",yy," zz",zz
- it=itype(i)
+ it=iabs(itype(i))
do j = 1,65
x(j) = sc_parmin(j,it)
enddo
etors=0.0D0
do i=iphi_start,iphi_end
if (itel(i-2).eq.0 .or. itel(i-1).eq.0) goto 1215
+ if (iabs(itype(i)).eq.20) then
+ iblock=2
+ else
+ iblock=1
+ endif
itori=itortyp(itype(i-2))
itori1=itortyp(itype(i-1))
phii=phi(i)
gloci=0.0D0
C Regular cosine and sine terms
- do j=1,nterm(itori,itori1)
- v1ij=v1(j,itori,itori1)
- v2ij=v2(j,itori,itori1)
+ do j=1,nterm(itori,itori1,iblock)
+ v1ij=v1(j,itori,itori1,iblock)
+ v2ij=v2(j,itori,itori1,iblock)
cosphi=dcos(j*phii)
sinphi=dsin(j*phii)
etors=etors+v1ij*cosphi+v2ij*sinphi
C
cosphi=dcos(0.5d0*phii)
sinphi=dsin(0.5d0*phii)
- do j=1,nlor(itori,itori1)
+ do j=1,nlor(itori,itori1,iblock)
vl1ij=vlor1(j,itori,itori1)
vl2ij=vlor2(j,itori,itori1)
vl3ij=vlor3(j,itori,itori1)
gloci=gloci+vl1ij*(vl3ij*cosphi-vl2ij*sinphi)*pom
enddo
C Subtract the constant term
- etors=etors-v0(itori,itori1)
+ etors=etors-v0(itori,itori1,iblock)
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,
- & (v1(j,itori,itori1),j=1,6),(v2(j,itori,itori1),j=1,6)
+ & (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)
1215 continue
phii1=phi(i+1)
gloci1=0.0D0
gloci2=0.0D0
+ iblock=1
+ if (iabs(itype(i+1)).eq.20) iblock=2
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)
- v2cij=v1c(2,j,itori,itori1,itori2)
- v2sij=v1s(2,j,itori,itori1,itori2)
+ do j=1,ntermd_1(itori,itori1,itori2,iblock)
+ v1cij=v1c(1,j,itori,itori1,itori2,iblock)
+ v1sij=v1s(1,j,itori,itori1,itori2,iblock)
+ v2cij=v1c(2,j,itori,itori1,itori2,iblock)
+ v2sij=v1s(2,j,itori,itori1,itori2,iblock)
cosphi1=dcos(j*phii)
sinphi1=dsin(j*phii)
cosphi2=dcos(j*phii1)
gloci1=gloci1+j*(v1sij*cosphi1-v1cij*sinphi1)
gloci2=gloci2+j*(v2sij*cosphi2-v2cij*sinphi2)
enddo
- do k=2,ntermd_2(itori,itori1,itori2)
+ do k=2,ntermd_2(itori,itori1,itori2,iblock)
do l=1,k-1
- v1cdij = v2c(k,l,itori,itori1,itori2)
- v2cdij = v2c(l,k,itori,itori1,itori2)
- v1sdij = v2s(k,l,itori,itori1,itori2)
- v2sdij = v2s(l,k,itori,itori1,itori2)
+ v1cdij = v2c(k,l,itori,itori1,itori2,iblock)
+ v2cdij = v2c(l,k,itori,itori1,itori2,iblock)
+ v1sdij = v2s(k,l,itori,itori1,itori2,iblock)
+ v2sdij = v2s(l,k,itori,itori1,itori2,iblock)
cosphi1p2=dcos(l*phii+(k-l)*phii1)
cosphi1m2=dcos(l*phii-(k-l)*phii1)
sinphi1p2=dsin(l*phii+(k-l)*phii1)
c 3 = SC...Ca...Ca...SCi
gloci=0.0D0
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)))
+ & (itype(i-1).eq.10).or.(itype(i-2).eq.ntyp1).or.
+ & (itype(i-1).eq.ntyp1)))
& .or. ((intertyp.eq.1).and.((itype(i-2).eq.10)
- & .or.(itype(i-2).eq.21)))
+ & .or.(itype(i-2).eq.ntyp1)))
& .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))
+ & (itype(i-1).eq.ntyp1)))) cycle
+ if ((intertyp.eq.2).and.(i.eq.4).and.(itype(1).eq.ntyp1)) cycle
+ if ((intertyp.eq.1).and.(i.eq.nres).and.(itype(nres).eq.ntyp1))
& cycle
do j=1,nterm_sccor(isccori,isccori1)
v1ij=v1sccor(j,intertyp,isccori,isccori1)
integer nlob,loc_start,loc_end,ithet_start,ithet_end,
& iphi_start,iphi_end
C Parameters of the virtual-bond-angle probability distribution
- common /thetas/ a0thet(ntyp),athet(2,ntyp),bthet(2,ntyp),
- & polthet(0:3,ntyp),gthet(3,ntyp),theta0(ntyp),sig0(ntyp),
- & sigc0(ntyp)
+ common /thetas/ a0thet(-ntyp:ntyp),athet(2,-ntyp:ntyp,-1:1,-1:1)
+ & ,bthet(2,-ntyp:ntyp,-1:1,-1:1),
+ & polthet(0:3,-ntyp:ntyp),gthet(3,-ntyp:ntyp),theta0(-ntyp:ntyp),
+ &sig0(-ntyp:ntyp), sigc0(-ntyp:ntyp)
C Parameters of ab initio-derived potential of virtual-bond-angle bending
integer nthetyp,ntheterm,ntheterm2,ntheterm3,nsingle,ndouble,
& ithetyp(ntyp1),nntheterm
& ndouble,nntheterm
C Parameters of the side-chain probability distribution
common /sclocal/ dsc(ntyp1),dsc_inv(ntyp1),bsc(maxlob,ntyp),
- & censc(3,maxlob,ntyp),gaussc(3,3,maxlob,ntyp),dsc0(ntyp1),
+ & censc(3,maxlob,-ntyp:ntyp),gaussc(3,3,maxlob,-ntyp:ntyp),
+ & dsc0(ntyp1)
& nlob(ntyp1)
C Virtual-bond lenghts
common /peptbond/ vbl,vblinv,vblinv2,vbl_cis,vbl0
character*3 restyp
character*1 onelet
- common /names/ restyp(ntyp+1),onelet(ntyp+1)
+ common /names/ restyp(-ntyp1:ntyp1),onelet(-ntyp1:ntyp1)
character*10 ename,wname
integer nprint_ene,print_order
common /namterm/ ename(max_ene),wname(max_ene),nprint_ene,
C Torsional constants of the rotation about virtual-bond dihedral angles
double precision v1,v2,vlor1,vlor2,vlor3,v0
integer itortyp,ntortyp,nterm,nlor,nterm_old
- common/torsion/v0(maxtor,maxtor),v1(maxterm,maxtor,maxtor),
- & v2(maxterm,maxtor,maxtor),vlor1(maxlor,maxtor,maxtor),
+ common/torsion/v0(-maxtor:maxtor,-maxtor:maxtor,2),
+ & v1(maxterm,-maxtor:maxtor,-maxtor:maxtor,2),
+ & v2(maxterm,-maxtor:maxtor,-maxtor:maxtor,2),
+ & vlor1(maxlor,maxtor,maxtor),
& vlor2(maxlor,maxtor,maxtor),vlor3(maxlor,maxtor,maxtor),
- & itortyp(ntyp),ntortyp,nterm(maxtor,maxtor),nlor(maxtor,maxtor)
- & ,nterm_old
+ & itortyp(-ntyp:ntyp),ntortyp,
+ & nterm(-maxtor:maxtor,-maxtor:maxtor,2),
+ & nlor(-maxtor:maxtor,-maxtor:maxtor,2)
C 6/23/01 - constants for double torsionals
double precision v1c,v1s,v2c,v2s
integer ntermd_1,ntermd_2
- common /torsiond/ v1c(2,maxtermd_1,maxtor,maxtor,maxtor),
- & v1s(2,maxtermd_1,maxtor,maxtor,maxtor),
- & v2c(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor),
- & v2s(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor),
- & ntermd_1(maxtor,maxtor,maxtor),ntermd_2(maxtor,maxtor,maxtor)
+ common /torsiond/
+ &v1c(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ &v1s(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ &v2c(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2),
+ &v2s(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2),
+ & ntermd_1(-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ & ntermd_2(-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2)
C 9/18/99 - added Fourier coeffficients of the expansion of local energy
C surface
double precision b1,b2,cc,dd,ee,ctilde,dtilde,b1tilde
integer nloctyp
- common/fourier/ b1(2,maxtor),b2(2,maxtor),cc(2,2,maxtor),
- & dd(2,2,maxtor),ee(2,2,maxtor),ctilde(2,2,maxtor),
- & dtilde(2,2,maxtor),b1tilde(2,maxtor),nloctyp
- double precision b
+ common/fourier/ b1(2,-maxtor:maxtor),b2(2,-maxtor:maxtor),
+ & cc(2,2,-maxtor:maxtor),
+ & dd(2,2,-maxtor:maxtor),ee(2,2,-maxtor:maxtor),
+ & ctilde(2,2,-maxtor:maxtor),
+ & dtilde(2,2,-maxtor:maxtor),b1tilde(2,-maxtor:maxtor),nloctyp
+ double precision b
common /fourier1/ b(13,maxtor)
sigii(i)=0.0D0
rr0(i)=0.0D0
a0thet(i)=0.0D0
- do j=1,2
- athet(j,i)=0.0D0
- bthet(j,i)=0.0D0
+ do j=1,2
+ do ichir1=-1,1
+ do ichir2=-1,1
+ athet(j,i,ichir1,ichir2)=0.0D0
+ bthet(j,i,ichir1,ichir2)=0.0D0
+ enddo
+ enddo
enddo
do j=0,3
polthet(j,i)=0.0D0
enddo
nlob(ntyp1)=0
dsc(ntyp1)=0.0D0
- do i=1,maxtor
+ do i=-maxtor,maxtor
itortyp(i)=0
- do j=1,maxtor
- do k=1,maxterm
- v1(k,j,i)=0.0D0
- v2(k,j,i)=0.0D0
- enddo
+ do iblock=1,2
+ do j=-maxtor,maxtor
+ do k=1,maxterm
+ v1(k,j,i,iblock)=0.0D0
+ v2(k,j,i,iblock)=0.0D0
+ enddo
+ enddo
enddo
enddo
+ do iblock=1,2
+ do i=-maxtor,maxtor
+ do j=-maxtor,maxtor
+ do k=-maxtor,maxtor
+ do l=1,maxtermd_1
+ v1c(1,l,i,j,k,iblock)=0.0D0
+ v1s(1,l,i,j,k,iblock)=0.0D0
+ v1c(2,l,i,j,k,iblock)=0.0D0
+ v1s(2,l,i,j,k,iblock)=0.0D0
+ enddo !l
+ do l=1,maxtermd_2
+ do m=1,maxtermd_2
+ v2c(m,l,i,j,k,iblock)=0.0D0
+ v2s(m,l,i,j,k,iblock)=0.0D0
+ enddo !m
+ enddo !l
+ enddo !k
+ enddo !j
+ enddo !i
+ enddo !iblock
do i=1,maxres
itype(i)=0
itel(i)=0
include 'COMMON.NAMES'
include 'COMMON.FFIELD'
data restyp /
+ &'DD' ,'DPR','DLY','DAR','DHI','DAS','DGL','DSG','DGN','DSN','DTH',
+ &'DYY','DAL','DTY','DTR','DVA','DLE','DIL','DPN','MED','DCY','ZER',
&'CYS','MET','PHE','ILE','LEU','VAL','TRP','TYR','ALA','GLY','THR',
&'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO','D'/
data onelet /
+ &'z','p','k','r','h','d','e','n','q','s','t','g',
+ &'a','y','w','v','l','i','f','m','c','x',
&'C','M','F','I','L','V','W','Y','A','G','T',
&'S','Q','N','E','D','H','R','K','P','X'/
data potname /'LJ','LJK','BP','GB','GBV'/
include 'COMMON.SCCOR'
include 'COMMON.SCROT'
character*1 t1,t2,t3
- character*1 onelett(4) /"G","A","P","D"/
+ character*1 onelett(-2:2) /"p","a","G","A","P"/
logical lprint
dimension blower(3,3,maxlob)
double precision ip,mp
C of the virtual-bond valence angles theta
C
do i=1,ntyp
- read (ithep,*) a0thet(i),(athet(j,i),j=1,2),(bthet(j,i),j=1,2)
+ read (ithep,*) a0thet(i),(athet(j,i,1,1),j=1,2),
+ & (bthet(j,i,1,1),j=1,2)
read (ithep,*) (polthet(j,i),j=0,3)
read (ithep,*) (gthet(j,i),j=1,3)
read (ithep,*) theta0(i),sig0(i),sigc0(i)
sigc0(i)=sigc0(i)**2
enddo
+ do i=1,ntyp
+ athet(1,i,1,-1)=athet(1,i,1,1)
+ athet(2,i,1,-1)=athet(2,i,1,1)
+ bthet(1,i,1,-1)=-bthet(1,i,1,1)
+ bthet(2,i,1,-1)=-bthet(2,i,1,1)
+ athet(1,i,-1,1)=-athet(1,i,1,1)
+ athet(2,i,-1,1)=-athet(2,i,1,1)
+ bthet(1,i,-1,1)=bthet(1,i,1,1)
+ bthet(2,i,-1,1)=bthet(2,i,1,1)
+ enddo
+ do i=-ntyp,-1
+ a0thet(i)=a0thet(-i)
+ athet(1,i,-1,-1)=athet(1,-i,1,1)
+ athet(2,i,-1,-1)=-athet(2,-i,1,1)
+ bthet(1,i,-1,-1)=bthet(1,-i,1,1)
+ bthet(2,i,-1,-1)=-bthet(2,-i,1,1)
+ athet(1,i,-1,1)=athet(1,-i,1,1)
+ athet(2,i,-1,1)=-athet(2,-i,1,1)
+ bthet(1,i,-1,1)=-bthet(1,-i,1,1)
+ bthet(2,i,-1,1)=bthet(2,-i,1,1)
+ athet(1,i,1,-1)=-athet(1,-i,1,1)
+ athet(2,i,1,-1)=athet(2,-i,1,1)
+ bthet(1,i,1,-1)=bthet(1,-i,1,1)
+ bthet(2,i,1,-1)=-bthet(2,-i,1,1)
+ theta0(i)=theta0(-i)
+ sig0(i)=sig0(-i)
+ sigc0(i)=sigc0(-i)
+ do j=0,3
+ polthet(j,i)=polthet(j,-i)
+ enddo
+ do j=1,3
+ gthet(j,i)=gthet(j,-i)
+ enddo
+ enddo
close (ithep)
if (lprint) then
c write (iout,'(a)')
& ' b1*10^1 ',' b2*10^1 '
do i=1,ntyp
write(iout,'(a3,1h&,2x,5(f8.3,1h&))') restyp(i),
- & a0thet(i),(100*athet(j,i),j=1,2),(10*bthet(j,i),j=1,2)
+ & a0thet(i),(100*athet(j,i,1,1),j=1,2),
+ & (10*bthet(j,i,1,1),j=1,2)
enddo
write (iout,'(/a/9x,5a/79(1h-))')
& 'Parameters of the expression for sigma(theta_c):',
enddo
bsc(1,i)=0.0D0
read(irotam,*)(censc(k,1,i),k=1,3),((blower(k,l,1),l=1,k),k=1,3)
+ censc(1,1,-i)=censc(1,1,i)
+ censc(2,1,-i)=censc(2,1,i)
+ censc(3,1,-i)=-censc(3,1,i)
do j=2,nlob(i)
read (irotam,*) bsc(j,i)
read (irotam,*) (censc(k,j,i),k=1,3),
& ((blower(k,l,j),l=1,k),k=1,3)
+ censc(1,j,-i)=censc(1,j,i)
+ censc(2,j,-i)=censc(2,j,i)
+ censc(3,j,-i)=-censc(3,j,i)
+C BSC is amplitude of Gaussian
enddo
do j=1,nlob(i)
do k=1,3
enddo
gaussc(k,l,j,i)=akl
gaussc(l,k,j,i)=akl
+ if (((k.eq.3).and.(l.ne.3))
+ & .or.((l.eq.3).and.(k.ne.3))) then
+ gaussc(k,l,j,-i)=-akl
+ gaussc(l,k,j,-i)=-akl
+ else
+ gaussc(k,l,j,-i)=akl
+ gaussc(l,k,j,-i)=akl
+ endif
enddo
enddo
enddo
read (itorp,*) ntortyp
read (itorp,*) (itortyp(i),i=1,ntyp)
write (iout,*) 'ntortyp',ntortyp
- do i=1,ntortyp
- do j=1,ntortyp
- read (itorp,*) nterm(i,j),nlor(i,j)
+ do iblock=1,2
+ do i=-ntyp,-1
+ itortyp(i)=-itortyp(-i)
+ enddo
+c write (iout,*) 'ntortyp',ntortyp
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ read (itorp,*) nterm(i,j,iblock),
+ & nlor(i,j,iblock)
+ nterm(-i,-j,iblock)=nterm(i,j,iblock)
+ nlor(-i,-j,iblock)=nlor(i,j,iblock)
v0ij=0.0d0
si=-1.0d0
- do k=1,nterm(i,j)
- read (itorp,*) kk,v1(k,i,j),v2(k,i,j)
- v0ij=v0ij+si*v1(k,i,j)
+ do k=1,nterm(i,j,iblock)
+ read (itorp,*) kk,v1(k,i,j,iblock),
+ & v2(k,i,j,iblock)
+ v1(k,-i,-j,iblock)=v1(k,i,j,iblock)
+ v2(k,-i,-j,iblock)=-v2(k,i,j,iblock)
+ v0ij=v0ij+si*v1(k,i,j,iblock)
si=-si
enddo
- do k=1,nlor(i,j)
- read (itorp,*) kk,vlor1(k,i,j),vlor2(k,i,j),vlor3(k,i,j)
+ do k=1,nlor(i,j,iblock)
+ read (itorp,*) kk,vlor1(k,i,j),
+ & vlor2(k,i,j),vlor3(k,i,j)
v0ij=v0ij+vlor1(k,i,j)/(1+vlor3(k,i,j)**2)
enddo
- v0(i,j)=v0ij
+ v0(i,j,iblock)=v0ij
+ v0(-i,-j,iblock)=v0ij
enddo
enddo
+ enddo
close (itorp)
if (lprint) then
write (iout,'(/a/)') 'Torsional constants:'
do j=1,ntortyp
write (iout,*) 'ityp',i,' jtyp',j
write (iout,*) 'Fourier constants'
- do k=1,nterm(i,j)
- write (iout,'(2(1pe15.5))') v1(k,i,j),v2(k,i,j)
+ do k=1,nterm(i,j,iblock)
+ write (iout,'(2(1pe15.5))') v1(k,i,j,iblock),
+ & v2(k,i,j,iblock)
enddo
write (iout,*) 'Lorenz constants'
- do k=1,nlor(i,j)
+ do k=1,nlor(i,j,iblock)
write (iout,'(3(1pe15.5))')
& vlor1(k,i,j),vlor2(k,i,j),vlor3(k,i,j)
enddo
C
C 6/23/01 Read parameters for double torsionals
C
- do i=1,ntortyp
- do j=1,ntortyp
- do k=1,ntortyp
+ do iblock=1,2
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ do k=-ntortyp+1,ntortyp-1
read (itordp,'(3a1)') t1,t2,t3
if (t1.ne.onelett(i) .or. t2.ne.onelett(j)
& .or. t3.ne.onelett(k)) then
& i,j,k,t1,t2,t3
stop "Error in double torsional parameter file"
endif
- read (itordp,*) ntermd_1(i,j,k),ntermd_2(i,j,k)
- read (itordp,*) (v1c(1,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) (v1s(1,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) (v1c(2,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) (v1s(2,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) ((v2c(l,m,i,j,k),v2c(m,l,i,j,k),
- & v2s(l,m,i,j,k),v2s(m,l,i,j,k),m=1,l-1),l=1,ntermd_2(i,j,k))
- enddo
- enddo
- enddo
+ read (itordp,*) ntermd_1(i,j,k,iblock),
+ & ntermd_2(i,j,k,iblock)
+ ntermd_1(-i,-j,-k,iblock)=ntermd_1(i,j,k,iblock)
+ ntermd_2(-i,-j,-k,iblock)=ntermd_2(i,j,k,iblock)
+ read (itordp,*) (v1c(1,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*) (v1s(1,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*) (v1c(2,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*) (v1s(2,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+C Martix of D parameters for one dimesional foureir series
+ do l=1,ntermd_1(i,j,k,iblock)
+ v1c(1,l,-i,-j,-k,iblock)=v1c(1,l,i,j,k,iblock)
+ v1s(1,l,-i,-j,-k,iblock)=-v1s(1,l,i,j,k,iblock)
+ v1c(2,l,-i,-j,-k,iblock)=v1c(2,l,i,j,k,iblock)
+ v1s(2,l,-i,-j,-k,iblock)=-v1s(2,l,i,j,k,iblock)
+c write(iout,*) "whcodze" ,
+c & v1s(2,l,-i,-j,-k,iblock),v1s(2,l,i,j,k,iblock)
+ enddo
+ read (itordp,*) ((v2c(l,m,i,j,k,iblock),
+ & v2c(m,l,i,j,k,iblock),v2s(l,m,i,j,k,iblock),
+ & v2s(m,l,i,j,k,iblock),
+ & m=1,l-1),l=1,ntermd_2(i,j,k,iblock))
+C Martix of D parameters for two dimesional fourier series
+ do l=1,ntermd_2(i,j,k,iblock)
+ do m=1,l-1
+ v2c(l,m,-i,-j,-k,iblock)=v2c(l,m,i,j,k,iblock)
+ v2c(m,l,-i,-j,-k,iblock)=v2c(m,l,i,j,k,iblock)
+ v2s(l,m,-i,-j,-k,iblock)=-v2s(l,m,i,j,k,iblock)
+ v2s(m,l,-i,-j,-k,iblock)=-v2s(m,l,i,j,k,iblock)
+ enddo!m
+ enddo!l
+ enddo!k
+ enddo!j
+ enddo!i
+ enddo!iblock
if (lprint) then
write (iout,*)
write (iout,*) 'Constants for double torsionals'
- do i=1,ntortyp
- do j=1,ntortyp
- do k=1,ntortyp
+ do iblock=1,2
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ do k=-ntortyp+1,ntortyp-1
write (iout,*) 'ityp',i,' jtyp',j,' ktyp',k,
- & ' nsingle',ntermd_1(i,j,k),' ndouble',ntermd_2(i,j,k)
+ & ' nsingle',ntermd_1(i,j,k,iblock),
+ & ' ndouble',ntermd_2(i,j,k,iblock)
write (iout,*)
write (iout,*) 'Single angles:'
- do l=1,ntermd_1(i,j,k)
- write (iout,'(i5,2f10.5,5x,2f10.5)') l,
- & v1c(1,l,i,j,k),v1s(1,l,i,j,k),
- & v1c(2,l,i,j,k),v1s(2,l,i,j,k)
+ do l=1,ntermd_1(i,j,k,iblock)
+ write (iout,'(i5,2f10.5,5x,2f10.5,5x,2f10.5)') l,
+ & v1c(1,l,i,j,k,iblock),v1s(1,l,i,j,k,iblock),
+ & v1c(2,l,i,j,k,iblock),v1s(2,l,i,j,k,iblock),
+ & v1s(1,l,-i,-j,-k,iblock),v1s(2,l,-i,-j,-k,iblock)
enddo
write (iout,*)
write (iout,*) 'Pairs of angles:'
- write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k))
- do l=1,ntermd_2(i,j,k)
- write (iout,'(i5,20f10.5)')
- & l,(v2c(l,m,i,j,k),m=1,ntermd_2(i,j,k))
+ write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k,iblock))
+ do l=1,ntermd_2(i,j,k,iblock)
+ write (iout,'(i5,20f10.5)')
+ & l,(v2c(l,m,i,j,k,iblock),m=1,ntermd_2(i,j,k,iblock))
enddo
write (iout,*)
- write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k))
- do l=1,ntermd_2(i,j,k)
- write (iout,'(i5,20f10.5)')
- & l,(v2s(l,m,i,j,k),m=1,ntermd_2(i,j,k))
+ write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k,iblock))
+ do l=1,ntermd_2(i,j,k,iblock)
+ write (iout,'(i5,20f10.5)')
+ & l,(v2s(l,m,i,j,k,iblock),m=1,ntermd_2(i,j,k,iblock)),
+ & (v2s(l,m,-i,-j,-k,iblock),m=1,ntermd_2(i,j,k,iblock))
enddo
write (iout,*)
enddo
enddo
enddo
+ enddo
endif
#endif
C Read of Side-chain backbone correlation parameters
read (isccor,*) nsccortyp
read (isccor,*) (isccortyp(i),i=1,ntyp)
c write (iout,*) 'ntortyp',ntortyp
+ do i=-ntyp,-1
+ isccortyp(i)=-isccortyp(-i)
+ enddo
+ iscprol=isccortyp(20)
maxinter=3
cc maxinter is maximum interaction sites
do l=1,maxinter
read (isccor,*)
&nterm_sccor(i,j),nlor_sccor(i,j)
v0ijsccor=0.0d0
- si=-1.0d0
-
+ v0ijsccor1=0.0d0
+ v0ijsccor2=0.0d0
+ v0ijsccor3=0.0d0
+ si=-1.0d0
+ nterm_sccor(-i,j)=nterm_sccor(i,j)
+ nterm_sccor(-i,-j)=nterm_sccor(i,j)
+ nterm_sccor(i,-j)=nterm_sccor(i,j)
do k=1,nterm_sccor(i,j)
read (isccor,*) kk,v1sccor(k,l,i,j)
& ,v2sccor(k,l,i,j)
+ if (j.eq.iscprol) then
+ if (i.eq.isccortyp(10)) then
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ else
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)*0.5d0
+ & +v2sccor(k,l,i,j)*dsqrt(0.75d0)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)*0.5d0
+ & +v1sccor(k,l,i,j)*dsqrt(0.75d0)
+ v1sccor(k,l,-i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,-j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,-j)
+ endif
+ else
+ if (i.eq.isccortyp(10)) then
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ else
+ if (j.eq.isccortyp(10)) then
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,j)
+ else
+ v1sccor(k,l,i,-j)=-v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,-j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,-j)
+ endif
+ endif
+ endif
v0ijsccor=v0ijsccor+si*v1sccor(k,l,i,j)
+ v0ijsccor1=v0ijsccor+si*v1sccor(k,l,-i,j)
+ v0ijsccor2=v0ijsccor+si*v1sccor(k,l,i,-j)
+ v0ijsccor3=v0ijsccor+si*v1sccor(k,l,-i,-j)
si=-si
enddo
do k=1,nlor_sccor(i,j)
v0ijsccor=v0ijsccor+vlor1sccor(k,i,j)/
&(1+vlor3sccor(k,i,j)**2)
enddo
- v0sccor(i,j)=v0ijsccor
+ v0sccor(l,i,j)=v0ijsccor
+ v0sccor(l,-i,j)=v0ijsccor1
+ v0sccor(l,i,-j)=v0ijsccor2
+ v0sccor(l,-i,-j)=v0ijsccor3
enddo
enddo
enddo
C interaction energy of the Gly, Ala, and Pro prototypes.
C
read (ifourier,*) nloctyp
- do i=1,nloctyp
+ do i=0,nloctyp-1
read (ifourier,*)
read (ifourier,*) (b(ii,i),ii=1,13)
if (lprint) then
endif
B1(1,i) = b(3,i)
B1(2,i) = b(5,i)
+ B1(1,-i) = b(3,i)
+ B1(2,-i) = -b(5,i)
B1tilde(1,i) = b(3,i)
B1tilde(2,i) =-b(5,i)
+ B1tilde(1,-i) =-b(3,i)
+ B1tilde(2,-i) =b(5,i)
B2(1,i) = b(2,i)
B2(2,i) = b(4,i)
+ B2(1,-i) =b(2,i)
+ B2(2,-i) =-b(4,i)
CC(1,1,i)= b(7,i)
CC(2,2,i)=-b(7,i)
CC(2,1,i)= b(9,i)
CC(1,2,i)= b(9,i)
+ CC(1,1,-i)= b(7,i)
+ CC(2,2,-i)=-b(7,i)
+ CC(2,1,-i)=-b(9,i)
+ CC(1,2,-i)=-b(9,i)
Ctilde(1,1,i)=b(7,i)
Ctilde(1,2,i)=b(9,i)
Ctilde(2,1,i)=-b(9,i)
Ctilde(2,2,i)=b(7,i)
+ Ctilde(1,1,-i)=b(7,i)
+ Ctilde(1,2,-i)=-b(9,i)
+ Ctilde(2,1,-i)=b(9,i)
+ Ctilde(2,2,-i)=b(7,i)
DD(1,1,i)= b(6,i)
DD(2,2,i)=-b(6,i)
DD(2,1,i)= b(8,i)
DD(1,2,i)= b(8,i)
+ DD(1,1,-i)= b(6,i)
+ DD(2,2,-i)=-b(6,i)
+ DD(2,1,-i)=-b(8,i)
+ DD(1,2,-i)=-b(8,i)
Dtilde(1,1,i)=b(6,i)
Dtilde(1,2,i)=b(8,i)
Dtilde(2,1,i)=-b(8,i)
Dtilde(2,2,i)=b(6,i)
+ Dtilde(1,1,-i)=b(6,i)
+ Dtilde(1,2,-i)=-b(8,i)
+ Dtilde(2,1,-i)=b(8,i)
+ Dtilde(2,2,-i)=b(6,i)
EE(1,1,i)= b(10,i)+b(11,i)
EE(2,2,i)=-b(10,i)+b(11,i)
EE(2,1,i)= b(12,i)-b(13,i)
EE(1,2,i)= b(12,i)+b(13,i)
+ EE(1,1,-i)= b(10,i)+b(11,i)
+ EE(2,2,-i)=-b(10,i)+b(11,i)
+ EE(2,1,-i)=-b(12,i)+b(13,i)
+ EE(1,2,-i)=-b(12,i)-b(13,i)
enddo
if (lprint) then
do i=1,nloctyp
enddo
do j=nnt,nct
itj=itype(j)
- if (itype(j).ne.10 .and. (vbld(nres+j)-dsc(itj)).gt.2.0d0) then
+ if (itype(j).ne.10 .and. (vbld(nres+j)-dsc(iabs(itj))).gt.2.0d0)
+ & then
write (iout,*) "Conformation",jjj,jj+1
write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j)
write (iout,*) "The Cartesian geometry is:"
ishift=ires-1
if (res.ne.'GLY' .and. res.ne. 'ACE') then
ishift=ishift-1
- itype(1)=21
+ itype(1)=ntyp1
endif
ibeg=0
endif
nstart_sup=1
if (itype(nres).ne.10) then
nres=nres+1
- itype(nres)=21
+ itype(nres)=ntyp1
do j=1,3
dcj=c(j,nres-2)-c(j,nres-3)
c(j,nres)=c(j,nres-1)+dcj
c(j,nres+1)=c(j,1)
c(j,2*nres)=c(j,nres)
enddo
- if (itype(1).eq.21) then
+ if (itype(1).eq.ntyp1) then
nsup=nsup-1
nstart_sup=2
do j=1,3
do i=1,nres
#ifdef PROCOR
- if (itype(i).eq.21 .or. itype(i+1).eq.21) then
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) then
#else
- if (itype(i).eq.21) then
+ if (itype(i).eq.ntyp1) then
#endif
itel(i)=0
#ifdef PROCOR
- else if (itype(i+1).ne.20) then
+ else if (iabs(itype(i+1)).ne.20) then
#else
- else if (itype(i).ne.20) then
+ else if (iabs(itype(i)).ne.20) then
#endif
itel(i)=1
else
nnt=1
nct=nres
print *,'NNT=',NNT,' NCT=',NCT
- if (itype(1).eq.21) nnt=2
- if (itype(nres).eq.21) nct=nct-1
+ if (itype(1).eq.ntyp1) nnt=2
+ if (itype(nres).eq.ntyp1) nct=nct-1
if (nstart.lt.nnt) nstart=nnt
if (nend.gt.nct .or. nend.eq.0) nend=nct
write (iout,*) "nstart",nstart," nend",nend
if (itype.eq.0) then
- do i=1,ntyp1
+ do i=-ntyp1,ntyp1
if (ucase(nam).eq.restyp(i)) then
rescode=i
return
else
- do i=1,ntyp1
+ do i=-ntyp1,ntyp1
if (nam(1:1).eq.onelet(i)) then
rescode=i
return
integer nres,nsup,nstart_sup,nz_start,nz_end,iz_sc,
& nres0,nstart_seq,chain_length,iprzes,tabperm,nperm
double precision c,dc,dc_old,d_c_work,xloc,xrot,dc_norm,t,r,
- & prod,rt,dc_work,cref,crefjlee,chain_rep
+ & prod,rt,dc_work,cref,crefjlee,chain_rep,dc_norm2
common /chain/ c(3,maxres2+2),dc(3,0:maxres2),dc_old(3,0:maxres2),
& xloc(3,maxres),xrot(3,maxres),dc_norm(3,0:maxres2),
+ & dc_norm2(3,0:maxres2),
& dc_work(MAXRES6),nres,nres0
common /rotmat/ t(3,3,maxres),r(3,3,maxres),prod(3,3,maxres),
& rt(3,3,maxres)
& sigc0,dsc,dsc_inv,bsc,censc,gaussc,dsc0
integer nlob
C Parameters of the virtual-bond-angle probability distribution
- common /thetas/ a0thet(ntyp),athet(2,ntyp),bthet(2,ntyp),
- & polthet(0:3,ntyp),gthet(3,ntyp),theta0(ntyp),sig0(ntyp),
- & sigc0(ntyp)
+ common /thetas/ a0thet(-ntyp:ntyp),athet(2,-ntyp:ntyp,-1:1,-1:1),
+ & bthet(2,-ntyp:ntyp,-1:1,-1:1),polthet(0:3,-ntyp:ntyp),
+ & gthet(3,-ntyp:ntyp),theta0(-ntyp:ntyp),sig0(-ntyp:ntyp),
+ & sigc0(-ntyp:ntyp)
C Parameters of the side-chain probability distribution
common /sclocal/ dsc(ntyp1),dsc_inv(ntyp1),bsc(maxlob,ntyp),
- & censc(3,maxlob,ntyp),gaussc(3,3,maxlob,ntyp),dsc0(ntyp1),
+ & censc(3,maxlob,-ntyp:ntyp),gaussc(3,3,maxlob,-ntyp:ntyp),
+ &d sc0(ntyp1),
& nlob(ntyp1)
C Parameters of ab initio-derived potential of virtual-bond-angle bending
integer nthetyp,ntheterm,ntheterm2,ntheterm3,nsingle,ndouble,
& iphi_end,iphid_start,iphid_end,ibond_start,ibond_end,
& ibondp_start,ibondp_end,ivec_start,ivec_end,iset_start,iset_end,
& iturn3_start,iturn3_end,iturn4_start,iturn4_end,iint_start,
- & iint_end,iphi1_start,iphi1_end,
+ & iint_end,iphi1_start,iphi1_end,itau_start,itau_end,
& ibond_displ(0:max_fg_procs-1),ibond_count(0:max_fg_procs-1),
& ithet_displ(0:max_fg_procs-1),ithet_count(0:max_fg_procs-1),
& iphi_displ(0:max_fg_procs-1),iphi_count(0:max_fg_procs-1),
& ibondp_start,ibondp_end,ivec_start,ivec_end,iset_start,iset_end,
& iturn3_start,iturn3_end,iturn4_start,iturn4_end,iint_start,
& iint_end,iphi1_start,iphi1_end,iint_count,iint_displ,ivec_displ,
- & ivec_count,iset_displ,
+ & ivec_count,iset_displ,itau_start,itau_end,
& iset_count,ibond_displ,ibond_count,ithet_displ,ithet_count,
& iphi_displ,iphi_count,iphi1_displ,iphi1_count
C Inverses of the actual virtual bond lengths
character*3 restyp
character*1 onelet
- common /names/ restyp(ntyp+1),onelet(ntyp+1)
+ common /names/ restyp(-ntyp1:ntyp1),
+ & onelet(-ntyp1:ntyp1)
character*10 ename,wname
integer nprint_ene,print_order
common /namterm/ ename(n_ene),wname(n_ene),nprint_ene,
-C Parameters of the SCCOR term
- double precision v1sccor,v2sccor
- integer nterm_sccor
- common/torsion/v1sccor(maxterm_sccor,20,20),
- & v2sccor(maxterm_sccor,20,20),
- & nterm_sccor
+cc Parameters of the SCCOR term
+ double precision v1sccor,v2sccor,vlor1sccor,
+ & vlor2sccor,vlor3sccor,gloc_sc,
+ & dcostau,dsintau,dtauangle,dcosomicron,
+ & domicron
+ integer nterm_sccor,isccortyp,nsccortyp,nlor_sccor
+ common/sccor/v1sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp),
+ & v2sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp),
+ & v0sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & nterm_sccor(-ntyp:ntyp,-ntyp:ntyp),isccortyp(-ntyp:ntyp),
+ & nsccortyp,
+ & nlor_sccor(-ntyp:ntyp,-ntyp:ntyp),
+ & vlor1sccor(maxterm_sccor,20,20),
+ & vlor2sccor(maxterm_sccor,20,20),
+ & vlor3sccor(maxterm_sccor,20,20),gloc_sc(3,0:maxres2,10),
+ & dcostau(3,3,3,maxres2),dsintau(3,3,3,maxres2),
+ & dtauangle(3,3,3,maxres2),dcosomicron(3,3,3,maxres2),
+ & domicron(3,3,3,maxres2)
C Torsional constants of the rotation about virtual-bond dihedral angles
double precision v1,v2,vlor1,vlor2,vlor3,v0
integer itortyp,ntortyp,nterm,nlor,nterm_old
- common/torsion/v0(maxtor,maxtor),v1(maxterm,maxtor,maxtor),
- & v2(maxterm,maxtor,maxtor),vlor1(maxlor,maxtor,maxtor),
+ common/torsion/v0(-maxtor:maxtor,-maxtor:maxtor,2),
+ & v1(maxterm,-maxtor:maxtor,-maxtor:maxtor,2),
+ & v2(maxterm,-maxtor:maxtor,-maxtor:maxtor,2),
+ & vlor1(maxlor,-maxtor:maxtor,-maxtor:maxtor),
& vlor2(maxlor,maxtor,maxtor),vlor3(maxlor,maxtor,maxtor),
- & itortyp(ntyp),ntortyp,nterm(maxtor,maxtor),nlor(maxtor,maxtor)
+ & itortyp(-ntyp:ntyp),ntortyp,
+ & nterm(-maxtor:maxtor,-maxtor:maxtor,2),
+ & nlor(-maxtor:maxtor,-maxtor:maxtor,2)
& ,nterm_old
C 6/23/01 - constants for double torsionals
double precision v1c,v1s,v2c,v2s
integer ntermd_1,ntermd_2
- common /torsiond/ v1c(2,maxtermd_1,maxtor,maxtor,maxtor),
- & v1s(2,maxtermd_1,maxtor,maxtor,maxtor),
- & v2c(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor),
- & v2s(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor),
- & ntermd_1(maxtor,maxtor,maxtor),ntermd_2(maxtor,maxtor,maxtor)
+ common /torsiond/
+ &v1c(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ &v1s(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ &v2c(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2),
+ &v2s(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2),
+ & ntermd_1(-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ & ntermd_2(-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2)
C 9/18/99 - added Fourier coeffficients of the expansion of local energy
C surface
- double precision b1,b2,cc,dd,ee,ctilde,dtilde,b2tilde
+ double precision b1,b2,cc,dd,ee,ctilde,dtilde,b2tilde,b1tilde
integer nloctyp
- common/fourier/ b1(2,maxtor),b2(2,maxtor),cc(2,2,maxtor),
- & dd(2,2,maxtor),ee(2,2,maxtor),ctilde(2,2,maxtor),
- & dtilde(2,2,maxtor),b1tilde(2,maxtor),nloctyp
+ common/fourier/ b1(2,-maxtor:maxtor),b2(2,-maxtor:maxtor)
+ & ,cc(2,2,-maxtor:maxtor),
+ & dd(2,2,-maxtor:maxtor),ee(2,2,-maxtor:maxtor),
+ & ctilde(2,2,-maxtor:maxtor),
+ & dtilde(2,2,-maxtor:maxtor),b1tilde(2,-maxtor:maxtor),nloctyp
& mask_theta,mask_phi,mask_side
double precision theta,phi,alph,omeg,varsave,esave,varall,vbld,
& thetaref,phiref,costtab,sinttab,cost2tab,sint2tab,
+ & tauangle,omicron,
& xxtab,yytab,zztab,xxref,yyref,zzref
common /var/ theta(maxres),phi(maxres),alph(maxres),omeg(maxres),
& vbld(2*maxres),thetaref(maxres),phiref(maxres),
& costtab(maxres), sinttab(maxres), cost2tab(maxres),
+ & omicron(2,maxres),tauangle(3,maxres),
& sint2tab(maxres),xxtab(maxres),yytab(maxres),
& zztab(maxres),xxref(maxres),yyref(maxres),zzref(maxres),
& ialph(maxres,2),ivar(4*maxres2),ntheta,nphi,nside,nvar
c parameter (maxconts=50)
C Number of AA types (at present only natural AA's will be handled
integer ntyp,ntyp1
- parameter (ntyp=20,ntyp1=ntyp+1)
+ parameter (ntyp=24,ntyp1=ntyp+1)
C Max. number of types of dihedral angles & multiplicity of torsional barriers
C and the number of terms in double torsionals
integer maxtor,maxterm,maxlor,maxtermd_1,maxtermd_2
& mmaxtheterm=maxtheterm)
c Max number of torsional terms in SCCOR
integer maxterm_sccor
- parameter (maxterm_sccor=3)
+ parameter (maxterm_sccor=6)
C Max. number of lobes in SC distribution
integer maxlob
parameter (maxlob=4)
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
ind=ind+1
v_work(ind)=d_t(j,i+nres)
double precision difftol /1.0d-5/
nbond=nct-nnt
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) nbond=nbond+1
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) nbond=nbond+1
enddo
c
if (lprn1) then
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
ind1=ind1+1
do j=1,3
Bmat(ind+j,ind1)=dC_norm(j,i+nres)
Td(i)=Td(i)+vbl*Tmat(i,ind)
enddo
do k=nnt,nct
- if (itype(k).ne.10 .and. itype(i).ne.21) then
+ if (itype(k).ne.10 .and. itype(i).ne.ntyp1) then
ind=ind+1
Td(i)=Td(i)+vbldsc0(1,itype(k))*Tmat(i,ind)
endif
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
ind=ind+1
zapas(ind)=-gxcart(j,i)+stochforcvec(ind)
& i,(dC(j,i),j=1,3),xx
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
ind=ind+1
xx=vbld(i+nres)-vbldsc0(1,itype(i))
write (iout,'(i5,3f10.5,5x,f10.5,e15.5)')
endif
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
ind=ind+1
blen2 = scalar(dc(1,i+nres),dc(1,i+nres))
ppvec(ind)=2*vbldsc0(1,itype(i))**2-blen2
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
dc(j,i+nres)=zapas(ind+j)
dc_work(ind+j)=zapas(ind+j)
& i,(dC(j,i),j=1,3),xx
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
ind=ind+1
xx=vbld(i+nres)-vbldsc0(1,itype(i))
write (iout,'(i5,3f10.5,5x,f10.5,e15.5)')
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
d_t(j,inres)=d_t(j,inres)+0.5d0*d_a(j,inres)*d_time
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
adt=d_a_old(j,inres)*d_time
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
d_t(j,inres)=d_t_new(j,inres)+0.5d0*d_a(j,inres)*d_time
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
adt=(d_a_old(j,inres)+d_af_work(ind+j))*d_time
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
d_t(j,inres)=d_t_new(j,inres)+(0.5d0*(d_a(j,inres)
do j=1,3
accel(j)=aux(j)
enddo
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
accel(j)=accel(j)+d_a(j,i+nres)-d_a_old(j,i+nres)
enddo
enddo
endif
c Side chains
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
epdriftij=
& dabs((d_a(j,i+nres)-d_a_old(j,i+nres))*gxcart(j,i))
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
d_t(j,inres)=fact*d_t(j,inres)
stdforcp(i)=stdfp*dsqrt(gamp)
enddo
do i=nnt,nct
- stdforcsc(i)=stdfsc(itype(i))*dsqrt(gamsc(itype(i)))
+ stdforcsc(i)=stdfsc(itype(i))*dsqrt(gamsc(iabs(itype(i))))
enddo
endif
c Open the pdb file for snapshotshots
do i=nnt,nct-1
do j=1,3
ind=ind+1
- if (itype(i).ne.21 .and. itype(i+1).ne.21) then
+ if (itype(i).ne.ntyp1 .and. itype(i+1).ne.ntyp1) then
d_t(j,i)=d_t_work(ind)
else
d_t(j,i)=0.0d0
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
ind=ind+1
d_t(j,i+nres)=d_t_work(ind)
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
dc_work(ind+j)=dc_old(j,i+nres)
d_t_work(ind+j)=d_t_old(j,i+nres)
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
dc(j,inres)=dc_work(ind+j)
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
d_t(j,inres)=d_t_work(ind+j)
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
dc_work(ind+j)=dc_old(j,i+nres)
d_t_work(ind+j)=d_t_old(j,i+nres)
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
dc(j,inres)=dc_work(ind+j)
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
d_t(j,inres)=d_t_work(ind+j)
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
ind=ind+1
v_work(ind)=d_t(j,i+nres)
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
d_t(j,inres)=d_t(j,inres)+0.5d0*d_a(j,inres)*d_time
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
adt=d_a_old(j,inres)*d_time
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
d_t(j,inres)=d_t_new(j,inres)+0.5d0*d_a(j,inres)*d_time
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
adt=(d_a_old(j,inres)+d_af_work(ind+j))*d_time
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
d_t(j,inres)=d_t_new(j,inres)+(0.5d0*(d_a(j,inres)
enddo
endif
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
c accel(j)=accel(j)+d_a(j,i+nres)-d_a_old(j,i+nres)
accel_old(j)=accel_old(j)+d_a_old(j,i+nres)
enddo
endif
c Side chains
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
epdriftij=
& dabs((d_a(j,i+nres)-d_a_old(j,i+nres))*gxcart(j,i))
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
d_t(j,inres)=fact*d_t(j,inres)
stdforcp(i)=stdfp*dsqrt(gamp)
enddo
do i=nnt,nct
- stdforcsc(i)=stdfsc(itype(i))*dsqrt(gamsc(itype(i)))
+ stdforcsc(i)=stdfsc(iabs(itype(i)))
+ & *dsqrt(gamsc(iabs(itype(i))))
enddo
endif
c Open the pdb file for snapshotshots
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
ind=ind+1
d_t(j,i+nres)=d_t_work(ind)
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
dc_work(ind+j)=dc_old(j,i+nres)
d_t_work(ind+j)=d_t_old(j,i+nres)
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
d_t(j,inres)=d_t_work(ind+j)
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
dc_work(ind+j)=dc_old(j,i+nres)
d_t_work(ind+j)=d_t_old(j,i+nres)
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
dc(j,inres)=dc_work(ind+j)
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
do j=1,3
d_t(j,inres)=d_t_work(ind+j)
CPPFLAGS = -DLINUX -DUNRES -DMP -DMPI \
-DPGI -DSPLITELE -DISNAN -DAMD64 \
-DPROCOR -DLANG0 \
- -DCRYST_BOND -DCRYST_THETA -DCRYST_SC
+ -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DSCCORPDB
## -DPROCOR
## -DMOMENT
#-DCO_BIAS
FC= ifort
OPT = -O3 -ip -w
-
+#OPT = -g -CB
+#OPT = -g
CFLAGS = -DSGI -c
FFLAGS = -c ${OPT} -I$(INSTALL_DIR)/include
BIN = ../../../bin/unres/MD-M/unres_Tc_procor_oldparm_em64-D-symetr.exe
#LIBS = -L$(INSTALL_DIR)/lib_pgi -lmpich xdrf/libxdrf.a
#LIBS = -L$(INSTALL_DIR)/lib_ifort -lmpich xdrf/libxdrf.a
-LIBS = -L$(INSTALL_DIR)/lib -lmpich xdrf_em64/libxdrf.a -g -d2 -CA -CB
+LIBS = -L$(INSTALL_DIR)/lib -lmpich ../../lib/xdrf_em64/libxdrf.a -g -d2 -CA -CB
ARCH = LINUX
PP = /lib/cpp -P
& +(c(j,i+1)-c(j,i))/dnorm2)
enddo
be=0.0D0
- if (i.gt.2) phi(i+1)=beta(i-2,i-1,i,i+1)
+ if (i.gt.2) then
+ if (i.le.nres) phi(i+1)=beta(i-2,i-1,i,i+1)
+ if ((itype(i).ne.10).and.(itype(i-1).ne.10)) then
+ tauangle(3,i+1)=beta(i+nres-1,i-1,i,i+nres)
+ endif
+ if (itype(i-1).ne.10) then
+ tauangle(1,i+1)=beta(i-1+nres,i-1,i,i+1)
+ omicron(1,i)=alpha(i-2,i-1,i-1+nres)
+ omicron(2,i)=alpha(i-1+nres,i-1,i)
+ endif
+ if (itype(i).ne.10) then
+ tauangle(2,i+1)=beta(i-2,i-1,i,i+nres)
+ endif
+ endif
omeg(i)=beta(nres+i,i,maxres2,i+1)
alph(i)=alpha(nres+i,i,maxres2)
theta(i+1)=alpha(i-1,i,i+1)
ncont=0
kkk=3
do i=nnt+kkk,nct
- iti=itype(i)
+ iti=iabs(itype(i))
do j=nnt,i-kkk
- itj=itype(j)
+ itj=iabs(itype(j))
if (ipot.ne.4) then
c rcomp=sigmaii(iti,itj)+1.0D0
rcomp=facont*sigmaii(iti,itj)
ees=0.0
evdw=0.0
do 1 i=nnt,nct-2
- if (itype(i).eq.21 .or. itype(i+1).eq.21) goto 1
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) goto 1
xi=c(1,i)
yi=c(2,i)
zi=c(3,i)
ymedi=yi+0.5*dyi
zmedi=zi+0.5*dzi
do 4 j=i+2,nct-1
- if (itype(j).eq.21 .or. itype(j+1).eq.21) goto 4
+ if (itype(j).eq.ntyp1 .or. itype(j+1).eq.ntyp1) goto 4
ind=ind+1
iteli=itel(i)
itelj=itel(j)
evdw=0.0D0
do i=iatsc_s,iatsc_e
itypi=itype(i)
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=itype(i+1)
xi=c(1,nres+i)
yi=c(2,nres+i)
cd & 'iend=',iend(i,iint)
do j=istart(i,iint),iend(i,iint)
itypj=itype(j)
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
evdw=0.0D0
do i=iatsc_s,iatsc_e
itypi=itype(i)
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=itype(i+1)
xi=c(1,nres+i)
yi=c(2,nres+i)
cd & 'iend=',iend(i,iint)
do j=istart(i,iint),iend(i,iint)
itypj=itype(j)
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
evdw=0.0D0
do i=iatsc_s,iatsc_e
itypi=itype(i)
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=itype(i+1)
xi=c(1,nres+i)
yi=c(2,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
itypj=itype(j)
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
evdw=0.0D0
do i=iatsc_s,iatsc_e
itypi=itype(i)
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=itype(i+1)
xi=c(1,nres+i)
yi=c(2,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
itypj=itype(j)
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
ind=0
do i=iatsc_s,iatsc_e
itypi=itype(i)
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=itype(i+1)
xi=c(1,nres+i)
yi=c(2,nres+i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
itypj=itype(j)
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
c dscj_inv=dsc_inv(itypj)
dscj_inv=vbld_inv(j+nres)
chi1=chi(itypi,itypj)
ind=0
do i=iatsc_s,iatsc_e
itypi=itype(i)
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=itype(i+1)
xi=c(1,nres+i)
yi=c(2,nres+i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
itypj=itype(j)
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
c dscj_inv=dsc_inv(itypj)
dscj_inv=vbld_inv(j+nres)
chi1=chi(itypi,itypj)
ind=0
do i=iatsc_s,iatsc_e
itypi=itype(i)
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=itype(i+1)
xi=c(1,nres+i)
yi=c(2,nres+i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
itypj=itype(j)
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
c dscj_inv=dsc_inv(itypj)
dscj_inv=vbld_inv(j+nres)
c write (iout,*) "j",j,dsc_inv(itypj),dscj_inv,
ind=0
do i=iatsc_s,iatsc_e
itypi=itype(i)
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=itype(i+1)
xi=c(1,nres+i)
yi=c(2,nres+i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
itypj=itype(j)
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
c dscj_inv=dsc_inv(itypj)
dscj_inv=vbld_inv(j+nres)
c write (iout,*) "j",j,dsc_inv(itypj),dscj_inv,
ind=0
do i=iatsc_s,iatsc_e
itypi=itype(i)
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=itype(i+1)
xi=c(1,nres+i)
yi=c(2,nres+i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
itypj=itype(j)
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
c dscj_inv=dsc_inv(itypj)
dscj_inv=vbld_inv(j+nres)
sig0ij=sigma(itypi,itypj)
ind=0
do i=iatsc_s,iatsc_e
itypi=itype(i)
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=itype(i+1)
xi=c(1,nres+i)
yi=c(2,nres+i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
itypj=itype(j)
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
c dscj_inv=dsc_inv(itypj)
dscj_inv=vbld_inv(j+nres)
sig0ij=sigma(itypi,itypj)
C Loop over i,i+2 and i,i+3 pairs of the peptide groups
C
do i=iturn3_start,iturn3_end
- if (itype(i).eq.21 .or. itype(i+1).eq.21
- & .or. itype(i+2).eq.21 .or. itype(i+3).eq.21) cycle
+ if (itype(i).eq.ntyp1.or. itype(i+1).eq.ntyp1
+ & .or. itype(i+2).eq.ntyp1 .or. itype(i+3).eq.ntyp1) cycle
dxi=dc(1,i)
dyi=dc(2,i)
dzi=dc(3,i)
num_cont_hb(i)=num_conti
enddo
do i=iturn4_start,iturn4_end
- if (itype(i).eq.21 .or. itype(i+1).eq.21
- & .or. itype(i+3).eq.21
- & .or. itype(i+4).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1
+ & .or. itype(i+3).eq.ntyp1
+ & .or. itype(i+4).eq.ntyp1) cycle
dxi=dc(1,i)
dyi=dc(2,i)
dzi=dc(3,i)
zmedi=c(3,i)+0.5d0*dzi
num_conti=num_cont_hb(i)
call eelecij_scale(i,i+3,ees,evdw1,eel_loc)
- if (wturn4.gt.0.0d0 .and. itype(i+2).ne.21)
+ if (wturn4.gt.0.0d0 .and. itype(i+2).ne.ntyp1)
& call eturn4(i,eello_turn4)
num_cont_hb(i)=num_conti
enddo ! i
c Loop over all pairs of interacting peptide groups except i,i+2 and i,i+3
c
do i=iatel_s,iatel_e
- if (itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
dxi=dc(1,i)
dyi=dc(2,i)
dzi=dc(3,i)
c write (iout,*) 'i',i,' ielstart',ielstart(i),' ielend',ielend(i)
num_conti=num_cont_hb(i)
do j=ielstart(i),ielend(i)
- if (itype(j).eq.21 .or. itype(j+1).eq.21) cycle
+ if (itype(j).eq.ntyp1 .or. itype(j+1).eq.ntyp1) cycle
call eelecij_scale(i,j,ees,evdw1,eel_loc)
enddo ! j
num_cont_hb(i)=num_conti
c & " iatel_e_vdw",iatel_e_vdw
call flush(iout)
do i=iatel_s_vdw,iatel_e_vdw
- if (itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i).eq.ntyp1.or. itype(i+1).eq.ntyp1) cycle
dxi=dc(1,i)
dyi=dc(2,i)
dzi=dc(3,i)
c & ' ielend',ielend_vdw(i)
call flush(iout)
do j=ielstart_vdw(i),ielend_vdw(i)
- if (itype(j).eq.21 .or. itype(j+1).eq.21) cycle
+ if (itype(j).eq.ntyp1 .or. itype(j+1).eq.ntyp1) cycle
ind=ind+1
iteli=itel(i)
itelj=itel(j)
cd print '(a)','Enter ESCP'
cd write (iout,*) 'iatscp_s=',iatscp_s,' iatscp_e=',iatscp_e
do i=iatscp_s,iatscp_e
- if (itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
iteli=itel(i)
xi=0.5D0*(c(1,i)+c(1,i+1))
yi=0.5D0*(c(2,i)+c(2,i+1))
do j=iscpstart(i,iint),iscpend(i,iint)
itypj=itype(j)
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
C Uncomment following three lines for SC-p interactions
c xj=c(1,nres+j)-xi
c yj=c(2,nres+j)-yi
cd print '(a)','Enter ESCP'
cd write (iout,*) 'iatscp_s=',iatscp_s,' iatscp_e=',iatscp_e
do i=iatscp_s,iatscp_e
- if (itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
iteli=itel(i)
xi=0.5D0*(c(1,i)+c(1,i+1))
yi=0.5D0*(c(2,i)+c(2,i+1))
do j=iscpstart(i,iint),iscpend(i,iint)
itypj=itype(j)
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
C Uncomment following three lines for SC-p interactions
c xj=c(1,nres+j)-xi
c yj=c(2,nres+j)-yi
#ifdef MPI
include 'mpif.h'
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)
#endif
include 'COMMON.SETUP'
include 'COMMON.IOUNITS'
include 'COMMON.CONTROL'
include 'COMMON.TIME1'
include 'COMMON.MAXGRAD'
+ include 'COMMON.SCCOR'
#ifdef TIMING
time01=MPI_Wtime()
#endif
& +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"
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,1
+ 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
call MPI_Reduce(glocbuf(1),gloc(1,icg),4*nres,
& MPI_DOUBLE_PRECISION,MPI_SUM,king,FG_COMM,IERR)
time_reduce=time_reduce+MPI_Wtime()-time00
+ 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,1
+ 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
c write(iout,*)'Entering ELJ nnt=',nnt,' nct=',nct,' expon=',expon
evdw=0.0D0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
cd write (iout,*) 'i=',i,' iint=',iint,' istart=',istart(i,iint),
cd & 'iend=',iend(i,iint)
do j=istart(i,iint),iend(i,iint)
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
c print *,'Entering ELJK nnt=',nnt,' nct=',nct,' expon=',expon
evdw=0.0D0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
C
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
c endif
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
c dscj_inv=dsc_inv(itypj)
dscj_inv=vbld_inv(j+nres)
chi1=chi(itypi,itypj)
c if (icall.eq.0) lprn=.false.
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
c dscj_inv=dsc_inv(itypj)
dscj_inv=vbld_inv(j+nres)
c write (iout,*) "j",j,dsc_inv(itypj),dscj_inv,
c if (icall.eq.0) lprn=.true.
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
c dscj_inv=dsc_inv(itypj)
dscj_inv=vbld_inv(j+nres)
sig0ij=sigma(itypi,itypj)
cd print *,'Entering Esoft_sphere nnt=',nnt,' nct=',nct
evdw=0.0D0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
cd write (iout,*) 'i=',i,' iint=',iint,' istart=',istart(i,iint),
cd & 'iend=',iend(i,iint)
do j=istart(i,iint),iend(i,iint)
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
eello_turn4=0.0d0
ind=0
do i=iatel_s,iatel_e
- if (itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
dxi=dc(1,i)
dyi=dc(2,i)
dzi=dc(3,i)
num_conti=0
c write (iout,*) 'i',i,' ielstart',ielstart(i),' ielend',ielend(i)
do j=ielstart(i),ielend(i)
- if (itype(j).eq.21 .or. itype(j+1).eq.21) cycle
+ if (itype(j).eq.ntyp1 .or. itype(j+1).eq.ntyp1) cycle
ind=ind+1
iteli=itel(i)
itelj=itel(j)
C Loop over i,i+2 and i,i+3 pairs of the peptide groups
C
do i=iturn3_start,iturn3_end
- if (itype(i).eq.21 .or. itype(i+1).eq.21
- & .or. itype(i+2).eq.21 .or. itype(i+3).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1
+ & .or. itype(i+2).eq.ntyp1 .or. itype(i+3).eq.ntyp1) cycle
dxi=dc(1,i)
dyi=dc(2,i)
dzi=dc(3,i)
num_cont_hb(i)=num_conti
enddo
do i=iturn4_start,iturn4_end
- if (itype(i).eq.21 .or. itype(i+1).eq.21
- & .or. itype(i+3).eq.21
- & .or. itype(i+4).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1
+ & .or. itype(i+3).eq.ntyp1
+ & .or. itype(i+4).eq.ntyp1) cycle
dxi=dc(1,i)
dyi=dc(2,i)
dzi=dc(3,i)
zmedi=c(3,i)+0.5d0*dzi
num_conti=num_cont_hb(i)
call eelecij(i,i+3,ees,evdw1,eel_loc)
- if (wturn4.gt.0.0d0 .and. itype(i+2).ne.21)
+ if (wturn4.gt.0.0d0 .and. itype(i+2).ne.ntyp1)
& call eturn4(i,eello_turn4)
num_cont_hb(i)=num_conti
enddo ! i
c Loop over all pairs of interacting peptide groups except i,i+2 and i,i+3
c
do i=iatel_s,iatel_e
- if (itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
dxi=dc(1,i)
dyi=dc(2,i)
dzi=dc(3,i)
num_conti=num_cont_hb(i)
do j=ielstart(i),ielend(i)
c write (iout,*) i,j,itype(i),itype(j)
- if (itype(j).eq.21 .or. itype(j+1).eq.21) cycle
+ if (itype(j).eq.ntyp1.or. itype(j+1).eq.ntyp1) cycle
call eelecij(i,j,ees,evdw1,eel_loc)
enddo ! j
num_cont_hb(i)=num_conti
cd print '(a)','Enter ESCP'
cd write (iout,*) 'iatscp_s=',iatscp_s,' iatscp_e=',iatscp_e
do i=iatscp_s,iatscp_e
- if (itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
iteli=itel(i)
xi=0.5D0*(c(1,i)+c(1,i+1))
yi=0.5D0*(c(2,i)+c(2,i+1))
do iint=1,nscp_gr(i)
do j=iscpstart(i,iint),iscpend(i,iint)
- if (itype(j).eq.21) cycle
- itypj=itype(j)
+ if (itype(j).eq.ntyp1) cycle
+ itypj=iabs(itype(j))
C Uncomment following three lines for SC-p interactions
c xj=c(1,nres+j)-xi
c yj=c(2,nres+j)-yi
cd print '(a)','Enter ESCP'
cd write (iout,*) 'iatscp_s=',iatscp_s,' iatscp_e=',iatscp_e
do i=iatscp_s,iatscp_e
- if (itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
iteli=itel(i)
xi=0.5D0*(c(1,i)+c(1,i+1))
yi=0.5D0*(c(2,i)+c(2,i+1))
do iint=1,nscp_gr(i)
do j=iscpstart(i,iint),iscpend(i,iint)
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
C Uncomment following three lines for SC-p interactions
c xj=c(1,nres+j)-xi
c yj=c(2,nres+j)-yi
cd write (iout,*) "i",i," ii",ii," iii",iii," jj",jj," jjj",jjj
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
+ if (ii.gt.nres .and. iabs(itype(iii)).eq.1 .and.
+ & iabs(itype(jjj)).eq.1) then
call ssbond_ene(iii,jjj,eij)
ehpb=ehpb+2*eij
cd write (iout,*) "eij",eij
include 'COMMON.VAR'
include 'COMMON.IOUNITS'
double precision erij(3),dcosom1(3),dcosom2(3),gg(3)
- itypi=itype(i)
+ itypi=iabs(itype(i))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
dzi=dc_norm(3,nres+i)
c dsci_inv=dsc_inv(itypi)
dsci_inv=vbld_inv(nres+i)
- itypj=itype(j)
+ itypj=iabs(itype(j))
c dscj_inv=dsc_inv(itypj)
dscj_inv=vbld_inv(nres+j)
xj=c(1,nres+j)-xi
estr=0.0d0
estr1=0.0d0
do i=ibondp_start,ibondp_end
- if (itype(i-1).eq.21 .or. itype(i).eq.21) then
+ if (itype(i-1).eq.ntyp1 .or. itype(i).eq.ntyp1) then
estr1=estr1+gnmr1(vbld(i),-1.0d0,distchainmax)
do j=1,3
gradb(j,i-1)=gnmr1prim(vbld(i),-1.0d0,distchainmax)
c 09/18/07 AL: multimodal bond potential based on AM1 CA-SC PMF's included
c
do i=ibond_start,ibond_end
- iti=itype(i)
- if (iti.ne.10 .and. iti.ne.21) then
+ iti=iabs(itype(i))
+ if (iti.ne.10 .and. iti.ne.ntyp1) then
nbi=nbondterm(iti)
if (nbi.eq.1) then
diff=vbld(i+nres)-vbldsc0(1,iti)
etheta=0.0D0
c write (*,'(a,i2)') 'EBEND ICG=',icg
do i=ithet_start,ithet_end
- if (itype(i-1).eq.21) cycle
+ if (itype(i-1).eq.ntyp1) cycle
C Zero the energy function and its derivative at 0 or pi.
call splinthet(theta(i),0.5d0*delta,ss,ssd)
it=itype(i-1)
- if (i.gt.3 .and. itype(i-2).ne.21) then
+ ichir1=isign(1,itype(i-2))
+ ichir2=isign(1,itype(i))
+ if (itype(i-2).eq.10) ichir1=isign(1,itype(i-1))
+ if (itype(i).eq.10) ichir2=isign(1,itype(i-1))
+ if (itype(i-1).eq.10) then
+ itype1=isign(10,itype(i-2))
+ ichir11=isign(1,itype(i-2))
+ ichir12=isign(1,itype(i-2))
+ itype2=isign(10,itype(i))
+ ichir21=isign(1,itype(i))
+ ichir22=isign(1,itype(i))
+ endif
+
+ if (i.gt.3 .and. itype(i-2).ne.ntyp1) then
#ifdef OSF
phii=phi(i)
if (phii.ne.phii) phii=150.0
y(1)=0.0D0
y(2)=0.0D0
endif
- if (i.lt.nres .and. itype(i).ne.21) then
+ if (i.lt.nres .and. itype(i).ne.ntyp1) then
#ifdef OSF
phii1=phi(i+1)
if (phii1.ne.phii1) phii1=150.0
C In following comments this theta will be referred to as t_c.
thet_pred_mean=0.0d0
do k=1,2
- athetk=athet(k,it)
- bthetk=bthet(k,it)
- thet_pred_mean=thet_pred_mean+athetk*y(k)+bthetk*z(k)
+ athetk=athet(k,it,ichir1,ichir2)
+ bthetk=bthet(k,it,ichir1,ichir2)
+ if (it.eq.10) then
+ athetk=athet(k,itype1,ichir11,ichir12)
+ bthetk=bthet(k,itype2,ichir21,ichir22)
+ endif
+ thet_pred_mean=thet_pred_mean+athetk*y(k)+bthetk*z(k)
enddo
dthett=thet_pred_mean*ssd
thet_pred_mean=thet_pred_mean*ss+a0thet(it)
C Derivatives of the "mean" values in gamma1 and gamma2.
- dthetg1=(-athet(1,it)*y(2)+athet(2,it)*y(1))*ss
- dthetg2=(-bthet(1,it)*z(2)+bthet(2,it)*z(1))*ss
+ dthetg1=(-athet(1,it,ichir1,ichir2)*y(2)
+ &+athet(2,it,ichir1,ichir2)*y(1))*ss
+ dthetg2=(-bthet(1,it,ichir1,ichir2)*z(2)
+ & +bthet(2,it,ichir1,ichir2)*z(1))*ss
+ if (it.eq.10) then
+ dthetg1=(-athet(1,itype1,ichir11,ichir12)*y(2)
+ &+athet(2,itype1,ichir11,ichir12)*y(1))*ss
+ dthetg2=(-bthet(1,itype2,ichir21,ichir22)*z(2)
+ & +bthet(2,itype2,ichir21,ichir22)*z(1))*ss
+ endif
if (theta(i).gt.pi-delta) then
call theteng(pi-delta,thet_pred_mean,theta0(it),f0,fprim0,
& E_tc0)
logical lprn /.false./, lprn1 /.false./
etheta=0.0D0
do i=ithet_start,ithet_end
- if (itype(i-1).eq.21) cycle
+ if (itype(i-1).eq.ntyp1) cycle
dethetai=0.0d0
dephii=0.0d0
dephii1=0.0d0
theti2=0.5d0*theta(i)
- ityp2=ithetyp(itype(i-1))
+ ityp2=ithetyp(iabs(itype(i-1)))
do k=1,nntheterm
coskt(k)=dcos(k*theti2)
sinkt(k)=dsin(k*theti2)
enddo
- if (i.gt.3 .and. itype(i-2).ne.21) then
+ if (i.gt.3 .and. itype(i-2).ne.ntyp1) then
#ifdef OSF
phii=phi(i)
if (phii.ne.phii) phii=150.0
#else
phii=phi(i)
#endif
- ityp1=ithetyp(itype(i-2))
+ ityp1=ithetyp(iabs(itype(i-2)))
do k=1,nsingle
cosph1(k)=dcos(k*phii)
sinph1(k)=dsin(k*phii)
sinph1(k)=0.0d0
enddo
endif
- if (i.lt.nres .and. itype(i).ne.21) then
+ if (i.lt.nres .and. itype(i).ne.ntyp1) then
#ifdef OSF
phii1=phi(i+1)
if (phii1.ne.phii1) phii1=150.0
#else
phii1=phi(i+1)
#endif
- ityp3=ithetyp(itype(i))
+ ityp3=ithetyp(iabs(itype(i)))
do k=1,nsingle
cosph2(k)=dcos(k*phii1)
sinph2(k)=dsin(k*phii1)
c write (iout,'(a)') 'ESC'
do i=loc_start,loc_end
it=itype(i)
- if (it.eq.21) cycle
+ if (it.eq.ntyp1) cycle
if (it.eq.10) goto 1
- nlobit=nlob(it)
+ nlobit=nlob(iabs(it))
c print *,'i=',i,' it=',it,' nlobit=',nlobit
c write (iout,*) 'i=',i,' ssa=',ssa,' ssad=',ssad
theti=theta(i+1)-pipol
do j=1,nlobit
#ifdef OSF
- adexp=bsc(j,it)-0.5D0*contr(j,iii)+emin
+ adexp=bsc(j,iabs(it))-0.5D0*contr(j,iii)+emin
if(adexp.ne.adexp) adexp=1.0
expfac=dexp(adexp)
#else
- expfac=dexp(bsc(j,it)-0.5D0*contr(j,iii)+emin)
+ expfac=dexp(bsc(j,iabs(it))-0.5D0*contr(j,iii)+emin)
#endif
cd print *,'j=',j,' expfac=',expfac
escloc_i=escloc_i+expfac
dersc12=0.0d0
do j=1,nlobit
- expfac=dexp(bsc(j,it)-0.5D0*contr(j)+emin)
+ expfac=dexp(bsc(j,iabs(it))-0.5D0*contr(j)+emin)
escloc_i=escloc_i+expfac
do k=1,2
dersc(k)=dersc(k)+Ax(k,j)*expfac
delta=0.02d0*pi
escloc=0.0D0
do i=loc_start,loc_end
- if (itype(i).eq.21) cycle
+ if (itype(i).eq.ntyp1) cycle
costtab(i+1) =dcos(theta(i+1))
sinttab(i+1) =dsqrt(1-costtab(i+1)*costtab(i+1))
cost2tab(i+1)=dsqrt(0.5d0*(1.0d0+costtab(i+1)))
do j = 1,3
xx = xx + x_prime(j)*dc_norm(j,i+nres)
yy = yy + y_prime(j)*dc_norm(j,i+nres)
- zz = zz + z_prime(j)*dc_norm(j,i+nres)
+ zz = zz + dsign(1.0,itype(i))*z_prime(j)*dc_norm(j,i+nres)
enddo
xxtab(i)=xx
C Compute the energy of the ith side cbain
C
c write (2,*) "xx",xx," yy",yy," zz",zz
- it=itype(i)
+ it=iabs(itype(i))
do j = 1,65
x(j) = sc_parmin(j,it)
enddo
Cc diagnostics - remove later
xx1 = dcos(alph(2))
yy1 = dsin(alph(2))*dcos(omeg(2))
- zz1 = -dsin(alph(2))*dsin(omeg(2))
+ zz1 = -dsign(1.0,itype(i))*dsin(alph(2))*dsin(omeg(2))
write(2,'(3f8.1,3f9.3,1x,3f9.3)')
& alph(2)*rad2deg,omeg(2)*rad2deg,theta(3)*rad2deg,xx,yy,zz,
& xx1,yy1,zz1
etors=0.0D0
do i=iphi_start,iphi_end
etors_ii=0.0D0
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21
- & .or. itype(i).eq.21) cycle
+ if (itype(i-2).eq.ntyp1.or. itype(i-1).eq.ntyp1
+ & .or. itype(i).eq.ntyp1) cycle
itori=itortyp(itype(i-2))
itori1=itortyp(itype(i-1))
phii=phi(i)
c lprn=.true.
etors=0.0D0
do i=iphi_start,iphi_end
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21
- & .or. itype(i).eq.21) cycle
+ if (itype(i-2).eq.ntyp1 .or. itype(i-1).eq.ntyp1
+ & .or. itype(i).eq.ntyp1) cycle
etors_ii=0.0D0
+ if (iabs(itype(i)).eq.20) then
+ iblock=2
+ else
+ iblock=1
+ endif
itori=itortyp(itype(i-2))
itori1=itortyp(itype(i-1))
phii=phi(i)
gloci=0.0D0
C Regular cosine and sine terms
- do j=1,nterm(itori,itori1)
- v1ij=v1(j,itori,itori1)
- v2ij=v2(j,itori,itori1)
+ do j=1,nterm(itori,itori1,iblock)
+ v1ij=v1(j,itori,itori1,iblock)
+ v2ij=v2(j,itori,itori1,iblock)
cosphi=dcos(j*phii)
sinphi=dsin(j*phii)
etors=etors+v1ij*cosphi+v2ij*sinphi
C
cosphi=dcos(0.5d0*phii)
sinphi=dsin(0.5d0*phii)
- do j=1,nlor(itori,itori1)
+ do j=1,nlor(itori,itori1,iblock)
vl1ij=vlor1(j,itori,itori1)
vl2ij=vlor2(j,itori,itori1)
vl3ij=vlor3(j,itori,itori1)
gloci=gloci+vl1ij*(vl3ij*cosphi-vl2ij*sinphi)*pom
enddo
C Subtract the constant term
- etors=etors-v0(itori,itori1)
+ etors=etors-v0(itori,itori1,iblock)
if (energy_dec) write (iout,'(a6,i5,0pf7.3)')
- & 'etor',i,etors_ii-v0(itori,itori1)
+ & 'etor',i,etors_ii-v0(itori,itori1,iblock)
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,
- & (v1(j,itori,itori1),j=1,6),(v2(j,itori,itori1),j=1,6)
+ & (v1(j,itori,itori1,iblock),j=1,6),
+ & (v2(j,itori,itori1,iblock),j=1,6)
gloc(i-3,icg)=gloc(i-3,icg)+wtor*gloci
c write (iout,*) 'i=',i,' gloc=',gloc(i-3,icg)
enddo
lprn=.false.
c lprn=.true.
etors_d=0.0D0
+c write(iout,*) "a tu??"
do i=iphid_start,iphid_end
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21
- & .or. itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i-2).eq.ntyp1 .or. itype(i-1).eq.ntyp1
+ & .or. itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
itori=itortyp(itype(i-2))
itori1=itortyp(itype(i-1))
itori2=itortyp(itype(i))
phii1=phi(i+1)
gloci1=0.0D0
gloci2=0.0D0
+ iblock=1
+ if (iabs(itype(i+1)).eq.20) iblock=2
+
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)
- v2cij=v1c(2,j,itori,itori1,itori2)
- v2sij=v1s(2,j,itori,itori1,itori2)
+ do j=1,ntermd_1(itori,itori1,itori2,iblock)
+ v1cij=v1c(1,j,itori,itori1,itori2,iblock)
+ v1sij=v1s(1,j,itori,itori1,itori2,iblock)
+ v2cij=v1c(2,j,itori,itori1,itori2,iblock)
+ v2sij=v1s(2,j,itori,itori1,itori2,iblock)
cosphi1=dcos(j*phii)
sinphi1=dsin(j*phii)
cosphi2=dcos(j*phii1)
gloci1=gloci1+j*(v1sij*cosphi1-v1cij*sinphi1)
gloci2=gloci2+j*(v2sij*cosphi2-v2cij*sinphi2)
enddo
- do k=2,ntermd_2(itori,itori1,itori2)
+ do k=2,ntermd_2(itori,itori1,itori2,iblock)
do l=1,k-1
- v1cdij = v2c(k,l,itori,itori1,itori2)
- v2cdij = v2c(l,k,itori,itori1,itori2)
- v1sdij = v2s(k,l,itori,itori1,itori2)
- v2sdij = v2s(l,k,itori,itori1,itori2)
+ v1cdij = v2c(k,l,itori,itori1,itori2,iblock)
+ v2cdij = v2c(l,k,itori,itori1,itori2,iblock)
+ v1sdij = v2s(k,l,itori,itori1,itori2,iblock)
+ v2sdij = v2s(l,k,itori,itori1,itori2,iblock)
cosphi1p2=dcos(l*phii+(k-l)*phii1)
cosphi1m2=dcos(l*phii-(k-l)*phii1)
sinphi1p2=dsin(l*phii+(k-l)*phii1)
C Set lprn=.true. for debugging
lprn=.false.
c lprn=.true.
-c write (iout,*) "EBACK_SC_COR",iphi_start,iphi_end,nterm_sccor
+c write (iout,*) "EBACK_SC_COR",itau_start,itau_end
esccor=0.0D0
- do i=iphi_start,iphi_end
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21) cycle
+ do i=itau_start,itau_end
+ if ((itype(i-2).eq.ntyp1).or.(itype(i-1).eq.ntyp1)) cycle
esccor_ii=0.0D0
- itori=itype(i-2)
- itori1=itype(i-1)
+ isccori=isccortyp(itype(i-2))
+ isccori1=isccortyp(itype(i-1))
+c write (iout,*) "EBACK_SC_COR",i,nterm_sccor(isccori,isccori1)
phii=phi(i)
+ 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.ntyp1).or.
+ & (itype(i-1).eq.ntyp1)))
+ & .or. ((intertyp.eq.1).and.((itype(i-2).eq.10)
+ & .or.(itype(i-2).eq.ntyp1).or.(itype(i-1).eq.ntyp1)
+ & .or.(itype(i).eq.ntyp1)))
+ & .or.((intertyp.eq.2).and.((itype(i-1).eq.10).or.
+ & (itype(i-1).eq.ntyp1).or.(itype(i-2).eq.ntyp1).or.
+ & (itype(i-3).eq.ntyp1)))) cycle
+ if ((intertyp.eq.2).and.(i.eq.4).and.(itype(1).eq.ntyp1)) cycle
+ if ((intertyp.eq.1).and.(i.eq.nres).and.(itype(nres).eq.ntyp1))
+ & 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
+c write (iout,*) "EBACK_SC_COR",i,v1ij*cosphi+v2ij*sinphi,intertyp
+ gloc_sc(intertyp,i-3,icg)=gloc_sc(intertyp,i-3,icg)+wsccor*gloci
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)
+ & 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)
gsccor_loc(i-3)=gsccor_loc(i-3)+gloci
+ enddo !intertyp
enddo
+
return
end
c----------------------------------------------------------------------------
maxsi=100
cd write (iout,*) 'Gen_Rand_conf: nstart=',nstart
if (nstart.lt.5) then
- it1=itype(2)
- phi(4)=gen_phi(4,itype(2),itype(3))
+ it1=iabs(itype(2))
+ phi(4)=gen_phi(4,iabs(itype(2)),iabs(itype(3)))
c write(iout,*)'phi(4)=',rad2deg*phi(4)
- if (nstart.lt.3) theta(3)=gen_theta(itype(2),pi,phi(4))
+ if (nstart.lt.3) theta(3)=gen_theta(iabs(itype(2)),pi,phi(4))
c write(iout,*)'theta(3)=',rad2deg*theta(3)
if (it1.ne.10) then
nsi=0
endif
return1
endif
- it1=itype(i-1)
- it2=itype(i-2)
- it=itype(i)
+ it1=iabs(itype(i-1))
+ it2=iabs(itype(i-2))
+ it=iabs(itype(i))
c print *,'Gen_Rand_Conf: i=',i,' it=',it,' it1=',it1,' it2=',it2,
c & ' nit=',nit,' niter=',niter,' maxgen=',maxgen
phi(i+1)=gen_phi(i+1,it1,it)
include 'COMMON.FFIELD'
data redfac /0.5D0/
overlap=.false.
- iti=itype(i)
+ iti=iabs(itype(i))
if (iti.gt.ntyp) return
C Check for SC-SC overlaps.
cd print *,'nnt=',nnt,' nct=',nct
do j=nnt,i-1
- itj=itype(j)
+ itj=iabs(itype(j))
if (j.lt.i-1 .or. ipot.ne.4) then
rcomp=sigmaii(iti,itj)
else
c(j,maxres2+1)=0.5D0*(c(j,i)+c(j,i+1))
enddo
do j=nnt,i-2
- itj=itype(j)
+ itj=iabs(itype(j))
cd print *,'overlap, p-Sc: i=',i,' j=',j,
cd & ' dist=',dist(nres+j,maxres2+1)
if (dist(nres+j,maxres2+1).lt.4.0D0*redfac) then
endif
thet_pred_mean=a0thet(it)
do k=1,2
- thet_pred_mean=thet_pred_mean+athet(k,it)*y(k)+bthet(k,it)*z(k)
+ thet_pred_mean=thet_pred_mean+athet(k,it,1,1)*y(k)
+ & +bthet(k,it,1,1)*z(k)
enddo
sig=polthet(3,it)
do j=2,0,-1
do ires=1,ioverlap_last
i=ioverlap(ires)
- iti=itype(i)
+ iti=iabs(itype(i))
if (iti.ne.10) then
nsi=0
fail=.true.
c print *,'>>overlap_sc nnt=',nnt,' nct=',nct
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
+ itypj=iabs(itype(j))
dscj_inv=dsc_inv(itypj)
sig0ij=sigma(itypi,itypj)
chi1=chi(itypi,itypj)
ires=0
do i=nnt,nct
iti=itype(i)
- if (iti.eq.21) then
+ if (iti.eq.ntyp1) then
ichain=ichain+1
ires=0
write (iunit,'(a)') 'TER'
enddo
write (iunit,'(a)') 'TER'
do i=nnt,nct-1
- if (itype(i).eq.21) cycle
- if (itype(i).eq.10 .and. itype(i+1).ne.21) then
+ if (itype(i).eq.ntyp1) cycle
+ if (itype(i).eq.10 .and. itype(i+1).ne.ntyp1) then
write (iunit,30) ica(i),ica(i+1)
- else if (itype(i).ne.10 .and. itype(i+1).ne.21) then
+ else if (itype(i).ne.10 .and. itype(i+1).ne.ntyp1) then
write (iunit,30) ica(i),ica(i+1),ica(i)+1
- else if (itype(i).ne.10 .and. itype(i+1).eq.21) then
+ else if (itype(i).ne.10 .and. itype(i+1).eq.ntyp1) then
write (iunit,30) ica(i),ica(i)+1
endif
enddo
include 'COMMON.INTERACT'
include 'COMMON.NAMES'
include 'COMMON.GEO'
+ include 'COMMON.TORSION'
write (iout,'(/a)') 'Geometry of the virtual chain.'
write (iout,'(7a)') ' Res ',' d',' Theta',
& ' Phi',' Dsc',' Alpha',' Omega'
include 'COMMON.CHAIN'
include 'COMMON.VAR'
include 'COMMON.MD'
+ include 'COMMON.SCCOR'
C
C Initialize Cartesian-coordinate gradient
C
gradx(j,i,icg)=0.0d0
gscloc(j,i)=0.0d0
gsclocx(j,i)=0.0d0
+ do intertyp=1,3
+ gloc_sc(intertyp,i,icg)=0.0d0
+ enddo
enddo
enddo
C
rr0(i)=0.0D0
a0thet(i)=0.0D0
do j=1,2
- athet(j,i)=0.0D0
- bthet(j,i)=0.0D0
+ do ichir1=-1,1
+ do ichir2=-1,1
+ athet(j,i,ichir1,ichir2)=0.0D0
+ bthet(j,i,ichir1,ichir2)=0.0D0
+ enddo
+ enddo
enddo
- do j=0,3
+ do j=0,3
polthet(j,i)=0.0D0
enddo
do j=1,3
enddo
nlob(ntyp1)=0
dsc(ntyp1)=0.0D0
- do i=1,maxtor
- itortyp(i)=0
- do j=1,maxtor
- do k=1,maxterm
- v1(k,j,i)=0.0D0
- v2(k,j,i)=0.0D0
+ do i=-maxtor,maxtor
+ itortyp(i)=0
+cc write (iout,*) "TU DOCHODZE",i,itortyp(i)
+ do iblock=1,2
+ do j=-maxtor,maxtor
+ do k=1,maxterm
+ v1(k,j,i,iblock)=0.0D0
+ v2(k,j,i,iblock)=0.0D0
enddo
enddo
+ enddo
enddo
+ do iblock=1,2
+ do i=-maxtor,maxtor
+ do j=-maxtor,maxtor
+ do k=-maxtor,maxtor
+ do l=1,maxtermd_1
+ v1c(1,l,i,j,k,iblock)=0.0D0
+ v1s(1,l,i,j,k,iblock)=0.0D0
+ v1c(2,l,i,j,k,iblock)=0.0D0
+ v1s(2,l,i,j,k,iblock)=0.0D0
+ enddo !l
+ do l=1,maxtermd_2
+ do m=1,maxtermd_2
+ v2c(m,l,i,j,k,iblock)=0.0D0
+ v2s(m,l,i,j,k,iblock)=0.0D0
+ enddo !m
+ enddo !l
+ enddo !k
+ enddo !j
+ enddo !i
+ enddo !iblock
+
do i=1,maxres
itype(i)=0
itel(i)=0
include 'COMMON.NAMES'
include 'COMMON.FFIELD'
data restyp /
+ &'DD','DAU','DAI','DDB','DSM','DPR','DLY','DAR','DHI','DAS','DGL',
+ & 'DSG','DGN','DSN','DTH',
+ &'DYY','DAL','DTY','DTR','DVA','DLE','DIL','DPN','MED','DCY','ZER',
&'CYS','MET','PHE','ILE','LEU','VAL','TRP','TYR','ALA','GLY','THR',
- &'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO','D'/
+ &'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO','SME','DBZ',
+ &'AIB','ABU','D'/
data onelet /
+ &'z','z','z','z','z','p','k','r','h','d','e','n','q','s','t','g',
+ &'a','y','w','v','l','i','f','m','c','x',
&'C','M','F','I','L','V','W','Y','A','G','T',
- &'S','Q','N','E','D','H','R','K','P','X'/
+ &'S','Q','N','E','D','H','R','K','P','z','z','z','z','X'/
data potname /'LJ','LJK','BP','GB','GBV'/
data ename /
& "EVDW SC-SC","EVDW2 SC-p","EES p-p","ECORR4 ","ECORR5 ",
iphi_end=iturn3_end+2
iturn3_start=iturn3_start-1
iturn3_end=iturn3_end-1
+ call int_bounds(nres-3,itau_start,itau_end)
+ itau_start=itau_start+3
+ itau_end=itau_end+3
call int_bounds(nres-3,iphi1_start,iphi1_end)
iphi1_start=iphi1_start+3
iphi1_end=iphi1_end+3
idihconstr_end=ndih_constr
iphid_start=iphi_start
iphid_end=iphi_end-1
+ itau_start=4
+ itau_end=nres
ibond_start=2
ibond_end=nres-1
ibondp_start=nnt
include 'COMMON.INTERACT'
include 'COMMON.MD'
include 'COMMON.IOUNITS'
-
+ include 'COMMON.SCCOR'
c calculating dE/ddc1
- if (nres.lt.3) return
+ if (nres.lt.3) go to 18
do j=1,3
gcart(j,1)=gcart(j,1)+gloc(1,icg)*dphi(j,1,4)
& +gloc(nres-2,icg)*dtheta(j,1,3)
enddo
c The side-chain vector derivatives
do i=2,nres-1
- if(itype(i).ne.10 .and. itype(i).ne.21) then
+ if(itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
gxcart(j,i)=gxcart(j,i)+gloc(ialph(i,1),icg)*dalpha(j,3,i)
& +gloc(ialph(i,1)+nside,icg)*domega(j,3,i)
enddo
endif
enddo
+c----------------------------------------------------------------------
+C INTERTYP=1 SC...Ca...Ca...Ca
+C INTERTYP=2 Ca...Ca...Ca...SC
+C INTERTYP=3 SC...Ca...Ca...SC
+c calculating dE/ddc1
+ 18 continue
+c do i=1,nres
+c gloc(i,icg)=0.0D0
+c write (iout,*) "poczotkoawy",i,gloc_sc(1,i,icg)
+c enddo
+ if (nres.lt.2) return
+ if ((nres.lt.3).and.(itype(1).eq.10)) return
+ if ((itype(1).ne.10).and.(itype(1).ne.ntyp1)) then
+ do j=1,3
+cc Derviative was calculated for oposite vector of side chain therefore
+c there is "-" sign before gloc_sc
+ gxcart(j,1)=gxcart(j,1)-gloc_sc(1,0,icg)*
+ & dtauangle(j,1,1,3)
+ gcart(j,1)=gcart(j,1)+gloc_sc(1,0,icg)*
+ & dtauangle(j,1,2,3)
+ if ((itype(2).ne.10).and.(itype(2).ne.ntyp1)) then
+ gxcart(j,1)= gxcart(j,1)
+ & -gloc_sc(3,0,icg)*dtauangle(j,3,1,3)
+ gcart(j,1)=gcart(j,1)+gloc_sc(3,0,icg)*
+ & dtauangle(j,3,2,3)
+ endif
+ enddo
+ endif
+ if ((nres.ge.3).and.(itype(3).ne.10).and.(itype(3).ne.ntyp1))
+ & then
+ do j=1,3
+ gcart(j,1)=gcart(j,1)+gloc_sc(2,1,icg)*dtauangle(j,2,1,4)
+ enddo
+ endif
+c As potetnial DO NOT depend on omicron anlge their derivative is
+c ommited
+c & +gloc_sc(intertyp,nres-2,icg)*dtheta(j,1,3)
+
+c Calculating the remainder of dE/ddc2
+ do j=1,3
+ if((itype(2).ne.10).and.(itype(2).ne.ntyp1)) then
+ if (itype(1).ne.10) gxcart(j,2)=gxcart(j,2)+
+ & gloc_sc(3,0,icg)*dtauangle(j,3,3,3)
+ if ((itype(3).ne.10).and.(nres.ge.3).and.(itype(3).ne.ntyp1))
+ & then
+ gxcart(j,2)=gxcart(j,2)-gloc_sc(3,1,icg)*dtauangle(j,3,1,4)
+cc the - above is due to different vector direction
+ gcart(j,2)=gcart(j,2)+gloc_sc(3,1,icg)*dtauangle(j,3,2,4)
+ endif
+ if (nres.gt.3) then
+ gxcart(j,2)=gxcart(j,2)-gloc_sc(1,1,icg)*dtauangle(j,1,1,4)
+cc the - above is due to different vector direction
+ gcart(j,2)=gcart(j,2)+gloc_sc(1,1,icg)*dtauangle(j,1,2,4)
+c write(iout,*) gloc_sc(1,1,icg),dtauangle(j,1,2,4),"gcart"
+c write(iout,*) gloc_sc(1,1,icg),dtauangle(j,1,1,4),"gx"
+ endif
+ endif
+ if ((itype(1).ne.10).and.(itype(1).ne.ntyp1)) then
+ gcart(j,2)=gcart(j,2)+gloc_sc(1,0,icg)*dtauangle(j,1,3,3)
+c write(iout,*) gloc_sc(1,0,icg),dtauangle(j,1,3,3)
+ endif
+ if ((itype(3).ne.10).and.(nres.ge.3)) then
+ gcart(j,2)=gcart(j,2)+gloc_sc(2,1,icg)*dtauangle(j,2,2,4)
+c write(iout,*) gloc_sc(2,1,icg),dtauangle(j,2,2,4)
+ endif
+ if ((itype(4).ne.10).and.(nres.ge.4)) then
+ gcart(j,2)=gcart(j,2)+gloc_sc(2,2,icg)*dtauangle(j,2,1,5)
+c write(iout,*) gloc_sc(2,2,icg),dtauangle(j,2,1,5)
+ endif
+
+c write(iout,*) gcart(j,2),itype(2),itype(1),itype(3), "gcart2"
+ enddo
+c If there are more than five residues
+ if(nres.ge.5) then
+ do i=3,nres-2
+ do j=1,3
+c write(iout,*) "before", gcart(j,i)
+ if ((itype(i).ne.10).and.(itype(i).ne.ntyp1)) then
+ gxcart(j,i)=gxcart(j,i)+gloc_sc(2,i-2,icg)
+ & *dtauangle(j,2,3,i+1)
+ & -gloc_sc(1,i-1,icg)*dtauangle(j,1,1,i+2)
+ gcart(j,i)=gcart(j,i)+gloc_sc(1,i-1,icg)
+ & *dtauangle(j,1,2,i+2)
+c write(iout,*) "new",j,i,
+c & gcart(j,i),gloc_sc(1,i-1,icg),dtauangle(j,1,2,i+2)
+ if (itype(i-1).ne.10) then
+ gxcart(j,i)=gxcart(j,i)+gloc_sc(3,i-2,icg)
+ &*dtauangle(j,3,3,i+1)
+ endif
+ if (itype(i+1).ne.10) then
+ gxcart(j,i)=gxcart(j,i)-gloc_sc(3,i-1,icg)
+ &*dtauangle(j,3,1,i+2)
+ gcart(j,i)=gcart(j,i)+gloc_sc(3,i-1,icg)
+ &*dtauangle(j,3,2,i+2)
+ endif
+ endif
+ if (itype(i-1).ne.10) then
+ gcart(j,i)=gcart(j,i)+gloc_sc(1,i-2,icg)*
+ & dtauangle(j,1,3,i+1)
+ endif
+ if (itype(i+1).ne.10) then
+ gcart(j,i)=gcart(j,i)+gloc_sc(2,i-1,icg)*
+ & dtauangle(j,2,2,i+2)
+c write(iout,*) "numer",i,gloc_sc(2,i-1,icg),
+c & dtauangle(j,2,2,i+2)
+ endif
+ if (itype(i+2).ne.10) then
+ gcart(j,i)=gcart(j,i)+gloc_sc(2,i,icg)*
+ & dtauangle(j,2,1,i+3)
+ endif
+ enddo
+ enddo
+ endif
+c Setting dE/ddnres-1
+ if(nres.ge.4) then
+ do j=1,3
+ if ((itype(nres-1).ne.10).and.(itype(nres-1).ne.ntyp1)) then
+ gxcart(j,nres-1)=gxcart(j,nres-1)+gloc_sc(2,nres-3,icg)
+ & *dtauangle(j,2,3,nres)
+c write (iout,*) "gxcart(nres-1)", gloc_sc(2,nres-3,icg),
+c & dtauangle(j,2,3,nres), gxcart(j,nres-1)
+ if (itype(nres-2).ne.10) then
+ gxcart(j,nres-1)=gxcart(j,nres-1)+gloc_sc(3,nres-3,icg)
+ & *dtauangle(j,3,3,nres)
+ endif
+ if ((itype(nres).ne.10).and.(itype(nres).ne.ntyp1)) then
+ gxcart(j,nres-1)=gxcart(j,nres-1)-gloc_sc(3,nres-2,icg)
+ & *dtauangle(j,3,1,nres+1)
+ gcart(j,nres-1)=gcart(j,nres-1)+gloc_sc(3,nres-2,icg)
+ & *dtauangle(j,3,2,nres+1)
+ endif
+ endif
+ if ((itype(nres-2).ne.10).and.(itype(nres-2).ne.ntyp1)) then
+ gcart(j,nres-1)=gcart(j,nres-1)+gloc_sc(1,nres-3,icg)*
+ & dtauangle(j,1,3,nres)
+ endif
+ if ((itype(nres).ne.10).and.(itype(nres).ne.ntyp1)) then
+ gcart(j,nres-1)=gcart(j,nres-1)+gloc_sc(2,nres-2,icg)*
+ & dtauangle(j,2,2,nres+1)
+c write (iout,*) "gcart(nres-1)", gloc_sc(2,nres-2,icg),
+c & dtauangle(j,2,2,nres+1), itype(nres-1),itype(nres)
+ endif
+ enddo
+ endif
+c Settind dE/ddnres
+ if ((nres.ge.3).and.(itype(nres).ne.10).and.
+ & (itype(nres).ne.ntyp1))then
+ do j=1,3
+ gxcart(j,nres)=gxcart(j,nres)+gloc_sc(3,nres-2,icg)
+ & *dtauangle(j,3,3,nres+1)+gloc_sc(2,nres-2,icg)
+ & *dtauangle(j,2,3,nres+1)
+ enddo
+ endif
+c The side-chain vector derivatives
return
end
include 'COMMON.DERIV'
include 'COMMON.IOUNITS'
include 'COMMON.LOCAL'
+ include 'COMMON.SCCOR'
double precision dcostheta(3,2,maxres),
& dcosphi(3,3,maxres),dsinphi(3,3,maxres),
& dcosalpha(3,3,maxres),dcosomega(3,3,maxres),
do j=1,3
dcostheta(j,1,i)=-(dc_norm(j,i-1)+cost*dc_norm(j,i-2))/
& vbld(i-1)
- if (itype(i-1).ne.21) dtheta(j,1,i)=-dcostheta(j,1,i)/sint
+ if (itype(i-1).ne.ntyp1) dtheta(j,1,i)=-dcostheta(j,1,i)/sint
dcostheta(j,2,i)=-(dc_norm(j,i-2)+cost*dc_norm(j,i-1))/
& vbld(i)
- if (itype(i-1).ne.21) dtheta(j,2,i)=-dcostheta(j,2,i)/sint
+ if (itype(i-1).ne.ntyp1) dtheta(j,2,i)=-dcostheta(j,2,i)/sint
enddo
enddo
-
+#if defined(MPI) && defined(PARINTDER)
+c We need dtheta(:,:,i-1) to compute dphi(:,:,i)
+ do i=max0(ithet_start-1,3),ithet_end
+#else
+ do i=3,nres
+#endif
+ if ((itype(i-1).ne.10).and.(itype(i-1).ne.ntyp1)) then
+ cost1=dcos(omicron(1,i))
+ sint1=sqrt(1-cost1*cost1)
+ cost2=dcos(omicron(2,i))
+ sint2=sqrt(1-cost2*cost2)
+ do j=1,3
+CC Calculate derivative over first omicron (Cai-2,Cai-1,SCi-1)
+ dcosomicron(j,1,1,i)=-(dc_norm(j,i-1+nres)+
+ & cost1*dc_norm(j,i-2))/
+ & vbld(i-1)
+ domicron(j,1,1,i)=-1/sint1*dcosomicron(j,1,1,i)
+ dcosomicron(j,1,2,i)=-(dc_norm(j,i-2)
+ & +cost1*(dc_norm(j,i-1+nres)))/
+ & vbld(i-1+nres)
+ domicron(j,1,2,i)=-1/sint1*dcosomicron(j,1,2,i)
+CC Calculate derivative over second omicron Sci-1,Cai-1 Cai
+CC Looks messy but better than if in loop
+ dcosomicron(j,2,1,i)=-(-dc_norm(j,i-1+nres)
+ & +cost2*dc_norm(j,i-1))/
+ & vbld(i)
+ domicron(j,2,1,i)=-1/sint2*dcosomicron(j,2,1,i)
+ dcosomicron(j,2,2,i)=-(dc_norm(j,i-1)
+ & +cost2*(-dc_norm(j,i-1+nres)))/
+ & vbld(i-1+nres)
+c write(iout,*) "vbld", i,itype(i),vbld(i-1+nres)
+ domicron(j,2,2,i)=-1/sint2*dcosomicron(j,2,2,i)
+ enddo
+ endif
+ enddo
+
c Derivatives of phi:
c If phi is 0 or 180 degrees, then the formulas
c have to be derived by power series expansion of the
ctgt=cost/sint
ctgt1=cost1/sint1
cosg_inv=1.0d0/cosg
- if (itype(i-1).ne.21 .and. itype(i-2).ne.21) then
+ if (itype(i-1).ne.ntyp1 .and. itype(i-2).ne.ntyp1) then
dsinphi(j,1,i)=-sing*ctgt1*dtheta(j,1,i-1)
& -(fac0*vp1(j)+sing*dc_norm(j,i-3))*vbld_inv(i-2)
dphi(j,1,i)=cosg_inv*dsinphi(j,1,i)
c Obtaining the gamma derivatives from cosine derivative
else
do j=1,3
- if (itype(i-1).ne.21 .and. itype(i-2).ne.21) then
+ if (itype(i-1).ne.ntyp1 .and. itype(i-2).ne.ntyp1) then
dcosphi(j,1,i)=fac1*dcostheta(j,1,i-1)+fac3*
& dcostheta(j,1,i-1)-fac0*(dc_norm(j,i-1)-scalp*
& dc_norm(j,i-3))/vbld(i-2)
enddo
endif
enddo
+Calculate derivative of Tauangle
+#ifdef PARINTDER
+ do i=itau_start,itau_end
+#else
+ do i=3,nres
+#endif
+ if ((itype(i-2).eq.ntyp1).or.(itype(i-2).eq.10)) cycle
+c if ((itype(i-2).eq.ntyp1).or.(itype(i-2).eq.10).or.
+c & (itype(i-1).eq.ntyp1).or.(itype(i).eq.ntyp1)) cycle
+cc dtauangle(j,intertyp,dervityp,residue number)
+cc INTERTYP=1 SC...Ca...Ca..Ca
+c the conventional case
+ sint=dsin(theta(i))
+ sint1=dsin(omicron(2,i-1))
+ sing=dsin(tauangle(1,i))
+ cost=dcos(theta(i))
+ cost1=dcos(omicron(2,i-1))
+ cosg=dcos(tauangle(1,i))
+ do j=1,3
+ dc_norm2(j,i-2+nres)=-dc_norm(j,i-2+nres)
+cc write(iout,*) dc_norm2(j,i-2+nres),"dcnorm"
+ enddo
+ scalp=scalar(dc_norm2(1,i-2+nres),dc_norm(1,i-1))
+ fac0=1.0d0/(sint1*sint)
+ fac1=cost*fac0
+ fac2=cost1*fac0
+ fac3=cosg*cost1/(sint1*sint1)
+ fac4=cosg*cost/(sint*sint)
+cc write(iout,*) "faki",fac0,fac1,fac2,fac3,fac4
+c Obtaining the gamma derivatives from sine derivative
+ if (tauangle(1,i).gt.-pi4.and.tauangle(1,i).le.pi4.or.
+ & tauangle(1,i).gt.pi34.and.tauangle(1,i).le.pi.or.
+ & tauangle(1,i).gt.-pi.and.tauangle(1,i).le.-pi34) then
+ call vecpr(dc_norm(1,i-1),dc_norm(1,i-2),vp1)
+ call vecpr(dc_norm2(1,i-2+nres),dc_norm(1,i-1),vp2)
+ call vecpr(dc_norm2(1,i-2+nres),dc_norm(1,i-2),vp3)
+ do j=1,3
+ ctgt=cost/sint
+ ctgt1=cost1/sint1
+ cosg_inv=1.0d0/cosg
+ dsintau(j,1,1,i)=-sing*ctgt1*domicron(j,2,2,i-1)
+ &-(fac0*vp1(j)+sing*(dc_norm2(j,i-2+nres)))
+ & *vbld_inv(i-2+nres)
+ dtauangle(j,1,1,i)=cosg_inv*dsintau(j,1,1,i)
+ dsintau(j,1,2,i)=
+ & -sing*(ctgt1*domicron(j,2,1,i-1)+ctgt*dtheta(j,1,i))
+ & -(fac0*vp2(j)+sing*dc_norm(j,i-2))*vbld_inv(i-1)
+c write(iout,*) "dsintau", dsintau(j,1,2,i)
+ dtauangle(j,1,2,i)=cosg_inv*dsintau(j,1,2,i)
+c Bug fixed 3/24/05 (AL)
+ dsintau(j,1,3,i)=-sing*ctgt*dtheta(j,2,i)
+ & +(fac0*vp3(j)-sing*dc_norm(j,i-1))*vbld_inv(i)
+c & +(fac0*vp3(j)-sing*dc_norm(j,i-1))*vbld_inv(i-1)
+ dtauangle(j,1,3,i)=cosg_inv*dsintau(j,1,3,i)
+ enddo
+c Obtaining the gamma derivatives from cosine derivative
+ else
+ do j=1,3
+ dcostau(j,1,1,i)=fac1*dcosomicron(j,2,2,i-1)+fac3*
+ & dcosomicron(j,2,2,i-1)-fac0*(dc_norm(j,i-1)-scalp*
+ & (dc_norm2(j,i-2+nres)))/vbld(i-2+nres)
+ dtauangle(j,1,1,i)=-1/sing*dcostau(j,1,1,i)
+ dcostau(j,1,2,i)=fac1*dcosomicron(j,2,1,i-1)+fac2*
+ & dcostheta(j,1,i)+fac3*dcosomicron(j,2,1,i-1)+fac4*
+ & dcostheta(j,1,i)
+ dtauangle(j,1,2,i)=-1/sing*dcostau(j,1,2,i)
+ dcostau(j,1,3,i)=fac2*dcostheta(j,2,i)+fac4*
+ & dcostheta(j,2,i)-fac0*(-dc_norm(j,i-2+nres)-scalp*
+ & dc_norm(j,i-1))/vbld(i)
+ dtauangle(j,1,3,i)=-1/sing*dcostau(j,1,3,i)
+c write (iout,*) "else",i
+ enddo
+ endif
+c do k=1,3
+c write(iout,*) "tu",i,k,(dtauangle(j,1,k,i),j=1,3)
+c enddo
+ enddo
+CC Second case Ca...Ca...Ca...SC
+#ifdef PARINTDER
+ do i=itau_start,itau_end
+#else
+ do i=4,nres
+#endif
+ if ((itype(i-1).eq.ntyp1).or.(itype(i-1).eq.10).or.
+ & (itype(i-2).eq.ntyp1).or.(itype(i-3).eq.ntyp1)) cycle
+c the conventional case
+ sint=dsin(omicron(1,i))
+ sint1=dsin(theta(i-1))
+ sing=dsin(tauangle(2,i))
+ cost=dcos(omicron(1,i))
+ cost1=dcos(theta(i-1))
+ cosg=dcos(tauangle(2,i))
+c do j=1,3
+c dc_norm2(j,i-1+nres)=-dc_norm(j,i-1+nres)
+c enddo
+ scalp=scalar(dc_norm(1,i-3),dc_norm(1,i-1+nres))
+ fac0=1.0d0/(sint1*sint)
+ fac1=cost*fac0
+ fac2=cost1*fac0
+ fac3=cosg*cost1/(sint1*sint1)
+ fac4=cosg*cost/(sint*sint)
+c Obtaining the gamma derivatives from sine derivative
+ if (tauangle(2,i).gt.-pi4.and.tauangle(2,i).le.pi4.or.
+ & tauangle(2,i).gt.pi34.and.tauangle(2,i).le.pi.or.
+ & tauangle(2,i).gt.-pi.and.tauangle(2,i).le.-pi34) then
+ call vecpr(dc_norm2(1,i-1+nres),dc_norm(1,i-2),vp1)
+ call vecpr(dc_norm(1,i-3),dc_norm(1,i-1+nres),vp2)
+ call vecpr(dc_norm(1,i-3),dc_norm(1,i-2),vp3)
+ do j=1,3
+ ctgt=cost/sint
+ ctgt1=cost1/sint1
+ cosg_inv=1.0d0/cosg
+ dsintau(j,2,1,i)=-sing*ctgt1*dtheta(j,1,i-1)
+ & +(fac0*vp1(j)-sing*dc_norm(j,i-3))*vbld_inv(i-2)
+c write(iout,*) i,j,dsintau(j,2,1,i),sing*ctgt1*dtheta(j,1,i-1),
+c &fac0*vp1(j),sing*dc_norm(j,i-3),vbld_inv(i-2),"dsintau(2,1)"
+ dtauangle(j,2,1,i)=cosg_inv*dsintau(j,2,1,i)
+ dsintau(j,2,2,i)=
+ & -sing*(ctgt1*dtheta(j,2,i-1)+ctgt*domicron(j,1,1,i))
+ & -(fac0*vp2(j)+sing*dc_norm(j,i-2))*vbld_inv(i-1)
+c write(iout,*) "sprawdzenie",i,j,sing*ctgt1*dtheta(j,2,i-1),
+c & sing*ctgt*domicron(j,1,2,i),
+c & (fac0*vp2(j)+sing*dc_norm(j,i-2))*vbld_inv(i-1)
+ dtauangle(j,2,2,i)=cosg_inv*dsintau(j,2,2,i)
+c Bug fixed 3/24/05 (AL)
+ dsintau(j,2,3,i)=-sing*ctgt*domicron(j,1,2,i)
+ & +(fac0*vp3(j)-sing*dc_norm(j,i-1+nres))*vbld_inv(i-1+nres)
+c & +(fac0*vp3(j)-sing*dc_norm(j,i-1))*vbld_inv(i-1)
+ dtauangle(j,2,3,i)=cosg_inv*dsintau(j,2,3,i)
+ enddo
+c Obtaining the gamma derivatives from cosine derivative
+ else
+ do j=1,3
+ dcostau(j,2,1,i)=fac1*dcostheta(j,1,i-1)+fac3*
+ & dcostheta(j,1,i-1)-fac0*(dc_norm(j,i-1+nres)-scalp*
+ & dc_norm(j,i-3))/vbld(i-2)
+ dtauangle(j,2,1,i)=-1/sing*dcostau(j,2,1,i)
+ dcostau(j,2,2,i)=fac1*dcostheta(j,2,i-1)+fac2*
+ & dcosomicron(j,1,1,i)+fac3*dcostheta(j,2,i-1)+fac4*
+ & dcosomicron(j,1,1,i)
+ dtauangle(j,2,2,i)=-1/sing*dcostau(j,2,2,i)
+ dcostau(j,2,3,i)=fac2*dcosomicron(j,1,2,i)+fac4*
+ & dcosomicron(j,1,2,i)-fac0*(dc_norm(j,i-3)-scalp*
+ & dc_norm(j,i-1+nres))/vbld(i-1+nres)
+ dtauangle(j,2,3,i)=-1/sing*dcostau(j,2,3,i)
+c write(iout,*) i,j,"else", dtauangle(j,2,3,i)
+ enddo
+ endif
+ enddo
+
+CCC third case SC...Ca...Ca...SC
+#ifdef PARINTDER
+
+ do i=itau_start,itau_end
+#else
+ do i=3,nres
+#endif
+c the conventional case
+ if ((itype(i-1).eq.ntyp1).or.(itype(i-1).eq.10).or.
+ &(itype(i-2).eq.ntyp1).or.(itype(i-2).eq.10)) cycle
+ sint=dsin(omicron(1,i))
+ sint1=dsin(omicron(2,i-1))
+ sing=dsin(tauangle(3,i))
+ cost=dcos(omicron(1,i))
+ cost1=dcos(omicron(2,i-1))
+ cosg=dcos(tauangle(3,i))
+ do j=1,3
+ dc_norm2(j,i-2+nres)=-dc_norm(j,i-2+nres)
+c dc_norm2(j,i-1+nres)=-dc_norm(j,i-1+nres)
+ enddo
+ scalp=scalar(dc_norm2(1,i-2+nres),dc_norm(1,i-1+nres))
+ fac0=1.0d0/(sint1*sint)
+ fac1=cost*fac0
+ fac2=cost1*fac0
+ fac3=cosg*cost1/(sint1*sint1)
+ fac4=cosg*cost/(sint*sint)
+c Obtaining the gamma derivatives from sine derivative
+ if (tauangle(3,i).gt.-pi4.and.tauangle(3,i).le.pi4.or.
+ & tauangle(3,i).gt.pi34.and.tauangle(3,i).le.pi.or.
+ & tauangle(3,i).gt.-pi.and.tauangle(3,i).le.-pi34) then
+ call vecpr(dc_norm(1,i-1+nres),dc_norm(1,i-2),vp1)
+ call vecpr(dc_norm2(1,i-2+nres),dc_norm(1,i-1+nres),vp2)
+ call vecpr(dc_norm2(1,i-2+nres),dc_norm(1,i-2),vp3)
+ do j=1,3
+ ctgt=cost/sint
+ ctgt1=cost1/sint1
+ cosg_inv=1.0d0/cosg
+ dsintau(j,3,1,i)=-sing*ctgt1*domicron(j,2,2,i-1)
+ & -(fac0*vp1(j)-sing*dc_norm(j,i-2+nres))
+ & *vbld_inv(i-2+nres)
+ dtauangle(j,3,1,i)=cosg_inv*dsintau(j,3,1,i)
+ dsintau(j,3,2,i)=
+ & -sing*(ctgt1*domicron(j,2,1,i-1)+ctgt*domicron(j,1,1,i))
+ & -(fac0*vp2(j)+sing*dc_norm(j,i-2))*vbld_inv(i-1)
+ dtauangle(j,3,2,i)=cosg_inv*dsintau(j,3,2,i)
+c Bug fixed 3/24/05 (AL)
+ dsintau(j,3,3,i)=-sing*ctgt*domicron(j,1,2,i)
+ & +(fac0*vp3(j)-sing*dc_norm(j,i-1+nres))
+ & *vbld_inv(i-1+nres)
+c & +(fac0*vp3(j)-sing*dc_norm(j,i-1))*vbld_inv(i-1)
+ dtauangle(j,3,3,i)=cosg_inv*dsintau(j,3,3,i)
+ enddo
+c Obtaining the gamma derivatives from cosine derivative
+ else
+ do j=1,3
+ dcostau(j,3,1,i)=fac1*dcosomicron(j,2,2,i-1)+fac3*
+ & dcosomicron(j,2,2,i-1)-fac0*(dc_norm(j,i-1+nres)-scalp*
+ & dc_norm2(j,i-2+nres))/vbld(i-2+nres)
+ dtauangle(j,3,1,i)=-1/sing*dcostau(j,3,1,i)
+ dcostau(j,3,2,i)=fac1*dcosomicron(j,2,1,i-1)+fac2*
+ & dcosomicron(j,1,1,i)+fac3*dcosomicron(j,2,1,i-1)+fac4*
+ & dcosomicron(j,1,1,i)
+ dtauangle(j,3,2,i)=-1/sing*dcostau(j,3,2,i)
+ dcostau(j,3,3,i)=fac2*dcosomicron(j,1,2,i)+fac4*
+ & dcosomicron(j,1,2,i)-fac0*(dc_norm2(j,i-2+nres)-scalp*
+ & dc_norm(j,i-1+nres))/vbld(i-1+nres)
+ dtauangle(j,3,3,i)=-1/sing*dcostau(j,3,3,i)
+c write(iout,*) "else",i
+ enddo
+ endif
+ enddo
+
#ifdef CRYST_SC
c Derivatives of side-chain angles alpha and omega
#if defined(MPI) && defined(PARINTDER)
#else
do i=2,nres-1
#endif
- if(itype(i).ne.10 .and. itype(i).ne.21) then
+ if(itype(i).ne.10 .and. itype(i).ne.ntyp1) then
fac5=1.0d0/dsqrt(2*(1+dcos(theta(i+1))))
fac6=fac5/vbld(i)
fac7=fac5*fac5
incr(j)=d_t(j,0)
enddo
do i=nnt,nct
- iti=itype(i)
+ iti=iabs(itype(i))
if (itype(i).eq.10) then
do j=1,3
v(j)=incr(j)
c The rotational part of the side chain virtual bond
KEr_sc=0.0D0
do i=nnt,nct
- iti=itype(i)
+ iti=iabs(itype(i))
if (itype(i).ne.10) then
do j=1,3
incr(j)=d_t(j,nres+i)
enddo
if (lprn) write (iout,*) "Potential forces sidechain"
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
if (lprn) write (iout,'(i5,3e15.5,5x,3e15.5)')
& i,(-gcart(j,i),j=1,3)
do j=1,3
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
ind=ind+1
d_a(j,i+nres)=d_a_work(ind)
m1=nct-nnt+1
ind=0
ind1=0
- msc(21)=1.0d0
+ msc(ntyp1)=1.0d0
do i=nnt,nct
ind=ind+1
ii = ind+m
iti=itype(i)
- massvec(ii)=msc(iti)
- if (iti.ne.10 .and. iti.ne.21) then
+ massvec(ii)=msc(iabs(iti))
+ if (iti.ne.10 .and. iti.ne.ntyp1) then
ind1=ind1+1
ii1= ind1+m1
A(ii,ii1)=1.0d0
- Gmat(ii1,ii1)=ISC(iti)
+ Gmat(ii1,ii1)=ISC(iabs(iti))
endif
enddo
c Off-diagonal elements of the dX part of A
enddo
M_SC=0.0d0
do i=nnt,nct
- iti=itype(i)
- M_SC=M_SC+msc(iti)
+ iti=iabs(itype(i))
+ M_SC=M_SC+msc(iabs(iti))
inres=i+nres
do j=1,3
- cm(j)=cm(j)+msc(iti)*c(j,inres)
+ cm(j)=cm(j)+msc(iabs(iti))*c(j,inres)
enddo
enddo
do j=1,3
enddo
do i=nnt,nct
- iti=itype(i)
+ iti=iabs(itype(i))
inres=i+nres
do j=1,3
pr(j)=c(j,inres)-cm(j)
enddo
- Im(1,1)=Im(1,1)+msc(iti)*(pr(2)*pr(2)+pr(3)*pr(3))
- Im(1,2)=Im(1,2)-msc(iti)*pr(1)*pr(2)
- Im(1,3)=Im(1,3)-msc(iti)*pr(1)*pr(3)
- Im(2,3)=Im(2,3)-msc(iti)*pr(2)*pr(3)
- Im(2,2)=Im(2,2)+msc(iti)*(pr(3)*pr(3)+pr(1)*pr(1))
- Im(3,3)=Im(3,3)+msc(iti)*(pr(1)*pr(1)+pr(2)*pr(2))
+ Im(1,1)=Im(1,1)+msc(iabs(iti))*(pr(2)*pr(2)+pr(3)*pr(3))
+ Im(1,2)=Im(1,2)-msc(iabs(iti))*pr(1)*pr(2)
+ Im(1,3)=Im(1,3)-msc(iabs(iti))*pr(1)*pr(3)
+ Im(2,3)=Im(2,3)-msc(iabs(iti))*pr(2)*pr(3)
+ Im(2,2)=Im(2,2)+msc(iabs(iti))*(pr(3)*pr(3)+pr(1)*pr(1))
+ Im(3,3)=Im(3,3)+msc(iabs(iti))*(pr(1)*pr(1)+pr(2)*pr(2))
enddo
do i=nnt,nct-1
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
- iti=itype(i)
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
+ iti=iabs(itype(i))
inres=i+nres
Im(1,1)=Im(1,1)+Isc(iti)*(1-dc_norm(1,inres)*
& dc_norm(1,inres))*vbld(inres)*vbld(inres)
enddo
enddo
do i=nnt,nct
- if(itype(i).ne.10 .and. itype(i).ne.21) then
+ if(itype(i).ne.10 .and. itype(i).ne.ntyp1) then
inres=i+nres
call vecpr(vrot(1),dc(1,inres),vp)
do j=1,3
incr(j)=d_t(j,0)
enddo
do i=nnt,nct
- iti=itype(i)
+ iti=iabs(itype(i))
inres=i+nres
do j=1,3
pr(j)=c(j,inres)-cm(j)
enddo
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
v(j)=incr(j)+d_t(j,inres)
enddo
c write (iout,*) "i",i," iti",iti," pr",(pr(j),j=1,3),
c & " v",(v(j),j=1,3)," vp",(vp(j),j=1,3)
do j=1,3
- L(j)=L(j)+msc(iti)*vp(j)
+ L(j)=L(j)+msc(iabs(iti))*vp(j)
enddo
c write (iout,*) "L",(l(j),j=1,3)
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
v(j)=incr(j)+d_t(j,inres)
enddo
vcm(j)=vcm(j)+mp*(vv(j)+0.5d0*d_t(j,i))
enddo
endif
- amas=msc(itype(i))
+ amas=msc(iabs(itype(i)))
summas=summas+amas
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
vcm(j)=vcm(j)+amas*(vv(j)+d_t(j,i+nres))
enddo
include 'COMMON.SETUP'
character*1 t1,t2,t3
character*1 onelett(4) /"G","A","P","D"/
+ character*1 toronelet(-2:2) /"p","a","G","A","P"/
logical lprint,LaTeX
dimension blower(3,3,maxlob)
dimension b(13)
C of the virtual-bond valence angles theta
C
do i=1,ntyp
- read (ithep,*,err=111,end=111) a0thet(i),(athet(j,i),j=1,2),
- & (bthet(j,i),j=1,2)
+ read (ithep,*,err=111,end=111) a0thet(i),(athet(j,i,1,1),j=1,2),
+ & (bthet(j,i,1,1),j=1,2)
read (ithep,*,err=111,end=111) (polthet(j,i),j=0,3)
- read (ithep,*,err=111,end=111) (gthet(j,i),j=1,3)
- read (ithep,*,err=111,end=111) theta0(i),sig0(i),sigc0(i)
- sigc0(i)=sigc0(i)**2
+ read (ithep,*,err=111,end=111) (gthet(j,i),j=1,3)
+ read (ithep,*,err=111,end=111) theta0(i),sig0(i),sigc0(i)
+ sigc0(i)=sigc0(i)**2
enddo
+ do i=1,ntyp
+ athet(1,i,1,-1)=athet(1,i,1,1)
+ athet(2,i,1,-1)=athet(2,i,1,1)
+ bthet(1,i,1,-1)=-bthet(1,i,1,1)
+ bthet(2,i,1,-1)=-bthet(2,i,1,1)
+ athet(1,i,-1,1)=-athet(1,i,1,1)
+ athet(2,i,-1,1)=-athet(2,i,1,1)
+ bthet(1,i,-1,1)=bthet(1,i,1,1)
+ bthet(2,i,-1,1)=bthet(2,i,1,1)
+ enddo
+ do i=-ntyp,-1
+ a0thet(i)=a0thet(-i)
+ athet(1,i,-1,-1)=athet(1,-i,1,1)
+ athet(2,i,-1,-1)=-athet(2,-i,1,1)
+ bthet(1,i,-1,-1)=bthet(1,-i,1,1)
+ bthet(2,i,-1,-1)=-bthet(2,-i,1,1)
+ athet(1,i,-1,1)=athet(1,-i,1,1)
+ athet(2,i,-1,1)=-athet(2,-i,1,1)
+ bthet(1,i,-1,1)=-bthet(1,-i,1,1)
+ bthet(2,i,-1,1)=bthet(2,-i,1,1)
+ athet(1,i,1,-1)=-athet(1,-i,1,1)
+ athet(2,i,1,-1)=athet(2,-i,1,1)
+ bthet(1,i,1,-1)=bthet(1,-i,1,1)
+ bthet(2,i,1,-1)=-bthet(2,-i,1,1)
+ theta0(i)=theta0(-i)
+ sig0(i)=sig0(-i)
+ sigc0(i)=sigc0(-i)
+ do j=0,3
+ polthet(j,i)=polthet(j,-i)
+ enddo
+ do j=1,3
+ gthet(j,i)=gthet(j,-i)
+ enddo
+ enddo
+
close (ithep)
if (lprint) then
if (.not.LaTeX) then
& ' B1 ',' B2 '
do i=1,ntyp
write(iout,'(a3,i4,2x,5(1pe14.5))') restyp(i),i,
- & a0thet(i),(athet(j,i),j=1,2),(bthet(j,i),j=1,2)
+ & a0thet(i),(athet(j,i,1,1),j=1,2),(bthet(j,i,1,1),j=1,2)
enddo
write (iout,'(/a/9x,5a/79(1h-))')
& 'Parameters of the expression for sigma(theta_c):',
& ' b1*10^1 ',' b2*10^1 '
do i=1,ntyp
write(iout,'(a3,1h&,2x,5(f8.3,1h&))') restyp(i),
- & a0thet(i),(100*athet(j,i),j=1,2),(10*bthet(j,i),j=1,2)
+ & a0thet(i),(100*athet(j,i,1,1),j=1,2),
+ & (10*bthet(j,i,1,1),j=1,2)
enddo
write (iout,'(/a/9x,5a/79(1h-))')
& 'Parameters of the expression for sigma(theta_c):',
bsc(1,i)=0.0D0
read(irotam,*,end=112,err=112)(censc(k,1,i),k=1,3),
& ((blower(k,l,1),l=1,k),k=1,3)
+ censc(1,1,-i)=censc(1,1,i)
+ censc(2,1,-i)=censc(2,1,i)
+ censc(3,1,-i)=-censc(3,1,i)
do j=2,nlob(i)
read (irotam,*,end=112,err=112) bsc(j,i)
read (irotam,*,end=112,err=112) (censc(k,j,i),k=1,3),
& ((blower(k,l,j),l=1,k),k=1,3)
+ censc(1,j,-i)=censc(1,j,i)
+ censc(2,j,-i)=censc(2,j,i)
+ censc(3,j,-i)=-censc(3,j,i)
+C BSC is amplitude of Gaussian
enddo
do j=1,nlob(i)
do k=1,3
enddo
gaussc(k,l,j,i)=akl
gaussc(l,k,j,i)=akl
+ if (((k.eq.3).and.(l.ne.3))
+ & .or.((l.eq.3).and.(k.ne.3))) then
+ gaussc(k,l,j,-i)=-akl
+ gaussc(l,k,j,-i)=-akl
+ else
+ gaussc(k,l,j,-i)=akl
+ gaussc(l,k,j,-i)=akl
+ endif
enddo
enddo
enddo
C
read (itorp,*,end=113,err=113) ntortyp
read (itorp,*,end=113,err=113) (itortyp(i),i=1,ntyp)
-c write (iout,*) 'ntortyp',ntortyp
- do i=1,ntortyp
- do j=1,ntortyp
- read (itorp,*,end=113,err=113) nterm(i,j),nlor(i,j)
+ do iblock=1,2
+ do i=-ntyp,-1
+ itortyp(i)=-itortyp(-i)
+ enddo
+ write (iout,*) 'ntortyp',ntortyp
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ read (itorp,*,end=113,err=113) nterm(i,j,iblock),
+ & nlor(i,j,iblock)
+ nterm(-i,-j,iblock)=nterm(i,j,iblock)
+ nlor(-i,-j,iblock)=nlor(i,j,iblock)
v0ij=0.0d0
si=-1.0d0
- do k=1,nterm(i,j)
- read (itorp,*,end=113,err=113) kk,v1(k,i,j),v2(k,i,j)
- v0ij=v0ij+si*v1(k,i,j)
+ do k=1,nterm(i,j,iblock)
+ read (itorp,*,end=113,err=113) kk,v1(k,i,j,iblock),
+ & v2(k,i,j,iblock)
+ v1(k,-i,-j,iblock)=v1(k,i,j,iblock)
+ v2(k,-i,-j,iblock)=-v2(k,i,j,iblock)
+ v0ij=v0ij+si*v1(k,i,j,iblock)
si=-si
+c write(iout,*) i,j,k,iblock,nterm(i,j,iblock)
+c write(iout,*) v1(k,-i,-j,iblock),v1(k,i,j,iblock),
+c &v2(k,-i,-j,iblock),v2(k,i,j,iblock)
enddo
- do k=1,nlor(i,j)
+ do k=1,nlor(i,j,iblock)
read (itorp,*,end=113,err=113) kk,vlor1(k,i,j),
- & vlor2(k,i,j),vlor3(k,i,j)
+ & vlor2(k,i,j),vlor3(k,i,j)
v0ij=v0ij+vlor1(k,i,j)/(1+vlor3(k,i,j)**2)
enddo
- v0(i,j)=v0ij
+ v0(i,j,iblock)=v0ij
+ v0(-i,-j,iblock)=v0ij
enddo
enddo
+ enddo
close (itorp)
if (lprint) then
- write (iout,'(/a/)') 'Torsional constants:'
- do i=1,ntortyp
- do j=1,ntortyp
+ write (iout,'(/a/)') 'Torsional constants:'
+ do i=1,ntortyp
+ do j=1,ntortyp
write (iout,*) 'ityp',i,' jtyp',j
write (iout,*) 'Fourier constants'
- do k=1,nterm(i,j)
- write (iout,'(2(1pe15.5))') v1(k,i,j),v2(k,i,j)
+ do k=1,nterm(i,j,iblock)
+ write (iout,'(2(1pe15.5))') v1(k,i,j,iblock),
+ & v2(k,i,j,iblock)
enddo
write (iout,*) 'Lorenz constants'
- do k=1,nlor(i,j)
- write (iout,'(3(1pe15.5))')
+ do k=1,nlor(i,j,iblock)
+ write (iout,'(3(1pe15.5))')
& vlor1(k,i,j),vlor2(k,i,j),vlor3(k,i,j)
enddo
enddo
enddo
endif
+
C
C 6/23/01 Read parameters for double torsionals
C
- do i=1,ntortyp
- do j=1,ntortyp
- do k=1,ntortyp
+ do iblock=1,2
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ do k=-ntortyp+1,ntortyp-1
read (itordp,'(3a1)',end=114,err=114) t1,t2,t3
- if (t1.ne.onelett(i) .or. t2.ne.onelett(j)
- & .or. t3.ne.onelett(k)) then
+c write (iout,*) "OK onelett",
+c & i,j,k,t1,t2,t3
+
+ if (t1.ne.toronelet(i) .or. t2.ne.toronelet(j)
+ & .or. t3.ne.toronelet(k)) then
write (iout,*) "Error in double torsional parameter file",
& i,j,k,t1,t2,t3
#ifdef MPI
#endif
stop "Error in double torsional parameter file"
endif
- read (itordp,*,end=114,err=114) ntermd_1(i,j,k),
- & ntermd_2(i,j,k)
- read (itordp,*,end=114,err=114) (v1c(1,l,i,j,k),l=1,
- & ntermd_1(i,j,k))
- read (itordp,*,end=114,err=114) (v1s(1,l,i,j,k),l=1,
- & ntermd_1(i,j,k))
- read (itordp,*,end=114,err=114) (v1c(2,l,i,j,k),l=1,
- & ntermd_1(i,j,k))
- read (itordp,*,end=114,err=114) (v1s(2,l,i,j,k),l=1,
- & ntermd_1(i,j,k))
- read (itordp,*,end=114,err=114) ((v2c(l,m,i,j,k),
- & v2c(m,l,i,j,k),v2s(l,m,i,j,k),v2s(m,l,i,j,k),
- & m=1,l-1),l=1,ntermd_2(i,j,k))
- enddo
- enddo
- enddo
+ read (itordp,*,end=114,err=114) ntermd_1(i,j,k,iblock),
+ & ntermd_2(i,j,k,iblock)
+ ntermd_1(-i,-j,-k,iblock)=ntermd_1(i,j,k,iblock)
+ ntermd_2(-i,-j,-k,iblock)=ntermd_2(i,j,k,iblock)
+ read (itordp,*,end=114,err=114) (v1c(1,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*,end=114,err=114) (v1s(1,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*,end=114,err=114) (v1c(2,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*,end=114,err=114) (v1s(2,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+C Martix of D parameters for one dimesional foureir series
+ do l=1,ntermd_1(i,j,k,iblock)
+ v1c(1,l,-i,-j,-k,iblock)=v1c(1,l,i,j,k,iblock)
+ v1s(1,l,-i,-j,-k,iblock)=-v1s(1,l,i,j,k,iblock)
+ v1c(2,l,-i,-j,-k,iblock)=v1c(2,l,i,j,k,iblock)
+ v1s(2,l,-i,-j,-k,iblock)=-v1s(2,l,i,j,k,iblock)
+c write(iout,*) "whcodze" ,
+c & v1s(2,l,-i,-j,-k,iblock),v1s(2,l,i,j,k,iblock)
+ enddo
+ read (itordp,*,end=114,err=114) ((v2c(l,m,i,j,k,iblock),
+ & v2c(m,l,i,j,k,iblock),v2s(l,m,i,j,k,iblock),
+ & v2s(m,l,i,j,k,iblock),
+ & m=1,l-1),l=1,ntermd_2(i,j,k,iblock))
+C Martix of D parameters for two dimesional fourier series
+ do l=1,ntermd_2(i,j,k,iblock)
+ do m=1,l-1
+ v2c(l,m,-i,-j,-k,iblock)=v2c(l,m,i,j,k,iblock)
+ v2c(m,l,-i,-j,-k,iblock)=v2c(m,l,i,j,k,iblock)
+ v2s(l,m,-i,-j,-k,iblock)=-v2s(l,m,i,j,k,iblock)
+ v2s(m,l,-i,-j,-k,iblock)=-v2s(m,l,i,j,k,iblock)
+ enddo!m
+ enddo!l
+ enddo!k
+ enddo!j
+ enddo!i
+ enddo!iblock
if (lprint) then
- write (iout,*)
+ write (iout,*)
write (iout,*) 'Constants for double torsionals'
- do i=1,ntortyp
- do j=1,ntortyp
- do k=1,ntortyp
+ do iblock=1,2
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ do k=-ntortyp+1,ntortyp-1
write (iout,*) 'ityp',i,' jtyp',j,' ktyp',k,
- & ' nsingle',ntermd_1(i,j,k),' ndouble',ntermd_2(i,j,k)
+ & ' nsingle',ntermd_1(i,j,k,iblock),
+ & ' ndouble',ntermd_2(i,j,k,iblock)
write (iout,*)
write (iout,*) 'Single angles:'
- do l=1,ntermd_1(i,j,k)
- write (iout,'(i5,2f10.5,5x,2f10.5)') l,
- & v1c(1,l,i,j,k),v1s(1,l,i,j,k),
- & v1c(2,l,i,j,k),v1s(2,l,i,j,k)
+ do l=1,ntermd_1(i,j,k,iblock)
+ write (iout,'(i5,2f10.5,5x,2f10.5,5x,2f10.5)') l,
+ & v1c(1,l,i,j,k,iblock),v1s(1,l,i,j,k,iblock),
+ & v1c(2,l,i,j,k,iblock),v1s(2,l,i,j,k,iblock),
+ & v1s(1,l,-i,-j,-k,iblock),v1s(2,l,-i,-j,-k,iblock)
enddo
write (iout,*)
write (iout,*) 'Pairs of angles:'
- write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k))
- do l=1,ntermd_2(i,j,k)
- write (iout,'(i5,20f10.5)')
- & l,(v2c(l,m,i,j,k),m=1,ntermd_2(i,j,k))
+ write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k,iblock))
+ do l=1,ntermd_2(i,j,k,iblock)
+ write (iout,'(i5,20f10.5)')
+ & l,(v2c(l,m,i,j,k,iblock),m=1,ntermd_2(i,j,k,iblock))
enddo
write (iout,*)
- write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k))
- do l=1,ntermd_2(i,j,k)
- write (iout,'(i5,20f10.5)')
- & l,(v2s(l,m,i,j,k),m=1,ntermd_2(i,j,k))
+ write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k,iblock))
+ do l=1,ntermd_2(i,j,k,iblock)
+ write (iout,'(i5,20f10.5)')
+ & l,(v2s(l,m,i,j,k,iblock),m=1,ntermd_2(i,j,k,iblock)),
+ & (v2s(l,m,-i,-j,-k,iblock),m=1,ntermd_2(i,j,k,iblock))
enddo
write (iout,*)
enddo
enddo
enddo
+ enddo
endif
#endif
+C Read of Side-chain backbone correlation parameters
+C Modified 11 May 2012 by Adasko
+CCC
C
-C 5/21/07 (AL) Read coefficients of the backbone-local sidechain-local
-C correlation energies.
-C
- read (isccor,*,end=119,err=119) nterm_sccor
- do i=1,20
- do j=1,20
- read (isccor,'(a)')
- do k=1,nterm_sccor
- read (isccor,*,end=119,err=119) kk,v1sccor(k,i,j),
- & v2sccor(k,i,j)
+ read (isccor,*,end=119,err=119) nsccortyp
+#ifdef SCCORPDB
+ read (isccor,*,end=119,err=119) (isccortyp(i),i=1,ntyp)
+ do i=-ntyp,-1
+ isccortyp(i)=-isccortyp(-i)
+ enddo
+ iscprol=isccortyp(20)
+c write (iout,*) 'ntortyp',ntortyp
+ maxinter=3
+cc maxinter is maximum interaction sites
+ do l=1,maxinter
+ do i=1,nsccortyp
+ do j=1,nsccortyp
+ read (isccor,*,end=119,err=119)
+ &nterm_sccor(i,j),nlor_sccor(i,j)
+ v0ijsccor=0.0d0
+ v0ijsccor1=0.0d0
+ v0ijsccor2=0.0d0
+ v0ijsccor3=0.0d0
+ si=-1.0d0
+ nterm_sccor(-i,j)=nterm_sccor(i,j)
+ nterm_sccor(-i,-j)=nterm_sccor(i,j)
+ nterm_sccor(i,-j)=nterm_sccor(i,j)
+ do k=1,nterm_sccor(i,j)
+ read (isccor,*,end=119,err=119) kk,v1sccor(k,l,i,j)
+ & ,v2sccor(k,l,i,j)
+ if (j.eq.iscprol) then
+ if (i.eq.isccortyp(10)) then
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ else
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)*0.5d0
+ & +v2sccor(k,l,i,j)*dsqrt(0.75d0)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)*0.5d0
+ & +v1sccor(k,l,i,j)*dsqrt(0.75d0)
+ v1sccor(k,l,-i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,-j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,-j)
+ endif
+ else
+ if (i.eq.isccortyp(10)) then
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ else
+ if (j.eq.isccortyp(10)) then
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,j)
+ else
+ v1sccor(k,l,i,-j)=-v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,-j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,-j)
+ endif
+ endif
+ endif
+ v0ijsccor=v0ijsccor+si*v1sccor(k,l,i,j)
+ v0ijsccor1=v0ijsccor+si*v1sccor(k,l,-i,j)
+ v0ijsccor2=v0ijsccor+si*v1sccor(k,l,i,-j)
+ v0ijsccor3=v0ijsccor+si*v1sccor(k,l,-i,-j)
+ si=-si
enddo
+ do k=1,nlor_sccor(i,j)
+ read (isccor,*,end=113,err=113) kk,vlor1sccor(k,i,j),
+ & vlor2sccor(k,i,j),vlor3sccor(k,i,j)
+ v0ijsccor=v0ijsccor+vlor1sccor(k,i,j)/
+ &(1+vlor3sccor(k,i,j)**2)
+ enddo
+ v0sccor(l,i,j)=v0ijsccor
+ v0sccor(l,-i,j)=v0ijsccor1
+ v0sccor(l,i,-j)=v0ijsccor2
+ v0sccor(l,-i,-j)=v0ijsccor3
+ enddo
+ enddo
+ enddo
+ close (isccor)
+#else
+ read (isccor,*,end=113,err=113) (isccortyp(i),i=1,ntyp)
+c write (iout,*) 'ntortyp',ntortyp
+ maxinter=3
+cc maxinter is maximum interaction sites
+ do l=1,maxinter
+ do i=1,nsccortyp
+ do j=1,nsccortyp
+ read (isccor,*,end=113,err=113)
+ & nterm_sccor(i,j),nlor_sccor(i,j)
+ v0ijsccor=0.0d0
+ si=-1.0d0
+
+ do k=1,nterm_sccor(i,j)
+ read (isccor,*,end=113,err=113) kk,v1sccor(k,l,i,j)
+ & ,v2sccor(k,l,i,j)
+ v0ijsccor=v0ijsccor+si*v1sccor(k,l,i,j)
+ si=-si
+ enddo
+ do k=1,nlor_sccor(i,j)
+ read (isccor,*,end=113,err=113) kk,vlor1sccor(k,i,j),
+ & vlor2sccor(k,i,j),vlor3sccor(k,i,j)
+ v0ijsccor=v0ijsccor+vlor1sccor(k,i,j)/
+ &(1+vlor3sccor(k,i,j)**2)
+ enddo
+ v0sccor(i,j)=v0ijsccor
enddo
enddo
+ enddo
close (isccor)
+
+#endif
if (lprint) then
- write (iout,'(/a/)') 'Torsional constants of SCCORR:'
- do i=1,20
- do j=1,20
+ write (iout,'(/a/)') 'Torsional constants:'
+ do i=1,nsccortyp
+ do j=1,nsccortyp
write (iout,*) 'ityp',i,' jtyp',j
- do k=1,nterm_sccor
- write (iout,'(2(1pe15.5))') v1sccor(k,i,j),v2sccor(k,i,j)
+ write (iout,*) 'Fourier constants'
+ do k=1,nterm_sccor(i,j)
+ write (iout,'(2(1pe15.5))') v1sccor(k,l,i,j),v2sccor(k,l,i,j)
+ enddo
+ write (iout,*) 'Lorenz constants'
+ do k=1,nlor_sccor(i,j)
+ write (iout,'(3(1pe15.5))')
+ & vlor1sccor(k,i,j),vlor2sccor(k,i,j),vlor3sccor(k,i,j)
enddo
enddo
enddo
endif
+
C
C 9/18/99 (AL) Read coefficients of the Fourier expansion of the local
C interaction energy of the Gly, Ala, and Pro prototypes.
write (iout,*) "Coefficients of the cumulants"
endif
read (ifourier,*) nloctyp
- do i=1,nloctyp
+ do i=0,nloctyp-1
read (ifourier,*,end=115,err=115)
read (ifourier,*,end=115,err=115) (b(ii),ii=1,13)
if (lprint) then
endif
B1(1,i) = b(3)
B1(2,i) = b(5)
+ B1(1,-i) = b(3)
+ B1(2,-i) = -b(5)
c b1(1,i)=0.0d0
c b1(2,i)=0.0d0
B1tilde(1,i) = b(3)
- B1tilde(2,i) =-b(5)
+ B1tilde(2,i) =-b(5)
+ B1tilde(1,-i) =-b(3)
+ B1tilde(2,-i) =b(5)
c b1tilde(1,i)=0.0d0
c b1tilde(2,i)=0.0d0
B2(1,i) = b(2)
B2(2,i) = b(4)
+ B2(1,-i) =b(2)
+ B2(2,-i) =-b(4)
+
c b2(1,i)=0.0d0
c b2(2,i)=0.0d0
CC(1,1,i)= b(7)
CC(2,2,i)=-b(7)
CC(2,1,i)= b(9)
CC(1,2,i)= b(9)
+ CC(1,1,-i)= b(7)
+ CC(2,2,-i)=-b(7)
+ CC(2,1,-i)=-b(9)
+ CC(1,2,-i)=-b(9)
c CC(1,1,i)=0.0d0
c CC(2,2,i)=0.0d0
c CC(2,1,i)=0.0d0
Ctilde(1,2,i)=b(9)
Ctilde(2,1,i)=-b(9)
Ctilde(2,2,i)=b(7)
+ Ctilde(1,1,-i)=b(7)
+ Ctilde(1,2,-i)=-b(9)
+ Ctilde(2,1,-i)=b(9)
+ Ctilde(2,2,-i)=b(7)
+
c Ctilde(1,1,i)=0.0d0
c Ctilde(1,2,i)=0.0d0
c Ctilde(2,1,i)=0.0d0
DD(2,2,i)=-b(6)
DD(2,1,i)= b(8)
DD(1,2,i)= b(8)
+ DD(1,1,-i)= b(6)
+ DD(2,2,-i)=-b(6)
+ DD(2,1,-i)=-b(8)
+ DD(1,2,-i)=-b(8)
c DD(1,1,i)=0.0d0
c DD(2,2,i)=0.0d0
c DD(2,1,i)=0.0d0
Dtilde(1,2,i)=b(8)
Dtilde(2,1,i)=-b(8)
Dtilde(2,2,i)=b(6)
+ Dtilde(1,1,-i)=b(6)
+ Dtilde(1,2,-i)=-b(8)
+ Dtilde(2,1,-i)=b(8)
+ Dtilde(2,2,-i)=b(6)
+
c Dtilde(1,1,i)=0.0d0
c Dtilde(1,2,i)=0.0d0
c Dtilde(2,1,i)=0.0d0
EE(2,2,i)=-b(10)+b(11)
EE(2,1,i)= b(12)-b(13)
EE(1,2,i)= b(12)+b(13)
+ EE(1,1,-i)= b(10)+b(11)
+ EE(2,2,-i)=-b(10)+b(11)
+ EE(2,1,-i)=-b(12)+b(13)
+ EE(1,2,-i)=-b(12)-b(13)
+
c ee(1,1,i)=1.0d0
c ee(2,2,i)=1.0d0
c ee(2,1,i)=0.0d0
enddo
enddo
endif
+
C
C Read electrostatic-interaction parameters
C
endif
goto 50
C---------------------- GB or BP potential -----------------------------
- 30 read (isidep,*,end=116,err=116)((eps(i,j),j=i,ntyp),i=1,ntyp),
- & (sigma0(i),i=1,ntyp),(sigii(i),i=1,ntyp),(chip(i),i=1,ntyp),
- & (alp(i),i=1,ntyp)
+ 30 do i=1,ntyp
+ read (isidep,*,end=116,err=116)(eps(i,j),j=i,ntyp)
+ enddo
+ read (isidep,*,end=116,err=116)(sigma0(i),i=1,ntyp)
+ read (isidep,*,end=116,err=116)(sigii(i),i=1,ntyp)
+ read (isidep,*,end=116,err=116)(chip(i),i=1,ntyp)
+ read (isidep,*,end=116,err=116)(alp(i),i=1,ntyp)
C For the GB potential convert sigma'**2 into chi'
if (ipot.eq.4) then
do i=1,ntyp
C
C Define the SC-p interaction constants (hard-coded; old style)
C
- do i=1,20
+ do i=1,ntyp
C "Soft" SC-p repulsion (causes helices to be too flat, but facilitates
C helix formation)
c aad(i,1)=0.3D0*4.0D0**12
if (lprint) then
write (iout,*) "Parameters of SC-p interactions:"
- do i=1,20
+ do i=1,ntyp
write (iout,'(4f8.3,4e12.4)') eps_scp(i,1),rscp(i,1),
& eps_scp(i,2),rscp(i,2),aad(i,1),bad(i,1),aad(i,2),bad(i,2)
enddo
else if (card(:3).eq.'TER') then
C End current chain
ires_old=ires+1
- itype(ires_old)=21
+ itype(ires_old)=ntyp1
ibeg=2
c write (iout,*) "Chain ended",ires,ishift,ires_old
if (unres_pdb) then
ishift=ires-1
if (res.ne.'GLY' .and. res.ne. 'ACE') then
ishift=ishift-1
- itype(1)=21
+ itype(1)=ntyp1
endif
c write (iout,*) "ires",ires," ibeg",ibeg," ishift",ishift
ibeg=0
ires=ires-ishift
c write (2,*) "ires",ires," ishift",ishift
if (res.eq.'ACE') then
- ity=10
+ itype(ires)=10
else
itype(ires)=rescode(ires,res,0)
endif
nres=ires
do i=2,nres-1
c write (iout,*) i,itype(i)
- if (itype(i).eq.21) then
+ if (itype(i).eq.ntyp1) then
c write (iout,*) "dummy",i,itype(i)
do j=1,3
c(j,i)=((c(j,i-1)+c(j,i+1))/2+2*c(j,i-1)-c(j,i-2))/2
nstart_sup=1
if (itype(nres).ne.10) then
nres=nres+1
- itype(nres)=21
+ itype(nres)=ntyp1
if (unres_pdb) then
c(1,nres)=c(1,nres-1)+3.8d0
c(2,nres)=c(2,nres-1)
c(j,nres+1)=c(j,1)
c(j,2*nres)=c(j,nres)
enddo
- if (itype(1).eq.21) then
+ if (itype(1).eq.ntyp1) then
nsup=nsup-1
nstart_sup=2
if (unres_pdb) then
lll=lll+1
cc write (iout,*) "spraw lancuchy",(c(j,i),j=1,3)
if (i.gt.1) then
- if ((itype(i-1).eq.21)) then
+ if ((itype(i-1).eq.ntyp1)) then
chain_length=lll-1
kkk=kkk+1
c write (iout,*) "spraw lancuchy",(c(j,i),j=1,3)
#endif
do i=1,nres-1
iti=itype(i)
- if (iti.ne.21 .and. itype(i+1).ne.21 .and.
+ if (iti.ne.ntyp1 .and. itype(i+1).ne.ntyp1 .and.
& (dist(i,i+1).lt.2.0D0 .or. dist(i,i+1).gt.5.0D0)) then
write (iout,'(a,i4)') 'Bad Cartesians for residue',i
ctest stop
enddo
enddo
do i=2,nres-1
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
dc_norm(j,i+nres)=vbld_inv(i+nres)*(c(j,i+nres)-c(j,i))
enddo
sinfac2=0.5d0/(1.0d0-costtab(i+1))
sinfac=dsqrt(sinfac2)
it=itype(i)
- if (it.ne.10 .and. itype(i).ne.21) then
+ if (it.ne.10 .and. itype(i).ne.ntyp1) then
c
C Compute the axes of tghe local cartesian coordinates system; store in
c x_prime, y_prime and z_prime
do i=1,nres-1
vbld(i+1)=vbl
vbld_inv(i+1)=1.0d0/vbld(i+1)
- vbld(i+1+nres)=dsc(itype(i+1))
- vbld_inv(i+1+nres)=dsc_inv(itype(i+1))
+ vbld(i+1+nres)=dsc(iabs(itype(i+1)))
+ vbld_inv(i+1+nres)=dsc_inv(iabs(itype(i+1)))
c print *,vbld(i+1),vbld(i+1+nres)
enddo
return
& 'General scaling factor of SC-p interactions:',scalscp
endif
r0_corr=cutoff_corr-delt_corr
- do i=1,20
+ do i=1,ntyp
aad(i,1)=scalscp*aad(i,1)
aad(i,2)=scalscp*aad(i,2)
bad(i,1)=scalscp*bad(i,1)
maxsi=1000
do i=2,nres-1
iti=itype(i)
- if (iti.ne.10 .and. itype(i).ne.21) then
+ if (iti.ne.10 .and. itype(i).ne.ntyp1) then
nsi=0
fail=.true.
do while (fail.and.nsi.le.maxsi)
vbld_inv(i)=vblinv
enddo
do i=2,nres-1
- vbld(i+nres)=dsc(itype(i))
- vbld_inv(i+nres)=dsc_inv(itype(i))
+ vbld(i+nres)=dsc(iabs(itype(i)))
+ vbld_inv(i+nres)=dsc_inv(iabs(itype(i)))
c write (iout,*) "i",i," itype",itype(i),
c & " dsc",dsc(itype(i))," vbld",vbld(i),vbld(i+nres)
enddo
c print '(20i4)',(itype(i),i=1,nres)
do i=1,nres
#ifdef PROCOR
- if (itype(i).eq.21 .or. itype(i+1).eq.21) then
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) then
#else
- if (itype(i).eq.21) then
+ if (itype(i).eq.ntyp1) then
#endif
itel(i)=0
#ifdef PROCOR
- else if (itype(i+1).ne.20) then
+ else if (iabs(itype(i+1)).ne.20) then
#else
- else if (itype(i).ne.20) then
+ else if (iabs(itype(i)).ne.20) then
#endif
itel(i)=1
else
#endif
nct=nres
cd print *,'NNT=',NNT,' NCT=',NCT
- if (itype(1).eq.21) nnt=2
- if (itype(nres).eq.21) nct=nct-1
+ if (itype(1).eq.ntyp1) nnt=2
+ if (itype(nres).eq.ntyp1) nct=nct-1
if (pdbref) then
if(me.eq.king.or..not.out1file)
& write (iout,'(a,i3)') 'nsup=',nsup
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
dc(j,i+nres)=c(j,i+nres)-c(j,i)
dc_norm(j,i+nres)=dc_norm(j,i+nres)*vbld_inv(i+nres)
enddo
do i=2,nres-1
omeg(i)=-120d0*deg2rad
+ if (itype(i).le.0) omeg(i)=-omeg(i)
enddo
else
if(me.eq.king.or..not.out1file)
enddo
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
do j=1,3
dc(j,i+nres)=c(j,i+nres)-c(j,i)
dc_norm(j,i+nres)=dc(j,i+nres)*vbld_inv(i+nres)
nvar=ntheta+nphi
nside=0
do i=2,nres-1
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10 .and. itype(i).ne.ntyp1) then
nside=nside+1
ialph(i,1)=nvar+nside
ialph(nside,2)=i
if (itype.eq.0) then
- do i=1,ntyp1
+ do i=-ntyp1,ntyp1
if (ucase(nam).eq.restyp(i)) then
rescode=i
return
else
- do i=1,ntyp1
+ do i=-ntyp1,ntyp1
if (nam(1:1).eq.onelet(i)) then
rescode=i
return
c Don't do glycine or ends
i=itype(res_pick)
- if (i.eq.10 .or. i.eq.21) return
+ if (i.eq.10 .or. i.eq.ntyp1) return
c Freeze everything (later will relax only selected side-chains)
mask_r=.true.
n_try=0
do while (n_try.lt.n_maxtry .and. orig_e-cur_e.lt.e_drop)
c Move the selected residue (don't worry if it fails)
- call gen_side(itype(res_pick),theta(res_pick+1),
+ call gen_side(iabs(itype(res_pick)),theta(res_pick+1),
+ alph(res_pick),omeg(res_pick),fail)
c Minimize the side-chains starting from the new arrangement
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do j=istart(i,iint),iend(i,iint)
IF (mask_side(j).eq.1.or.mask_side(i).eq.1) THEN
ind=ind+1
- itypj=itype(j)
+ itypj=iabs(itype(j))
dscj_inv=dsc_inv(itypj)
sig0ij=sigma(itypi,itypj)
chi1=chi(itypi,itypj)
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10) then
do j=1,3
d_t_work(ind+j)=d_t(j,i+nres)
enddo
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10) then
do j=1,3
friction(j,i+nres)=fric_work(ind+j)
enddo
enddo
x=0.0d0
+#ifdef MPI
time00=MPI_Wtime()
+#else
+ time00=tcpu()
+#endif
c Compute the stochastic forces acting on bodies. Store in force.
do i=nnt,nct-1
sig=stdforcp(i)
force(j,i+nres)=anorm_distr(x,sig2,lowb2,highb2)
enddo
enddo
+#ifdef MPI
time_fsample=time_fsample+MPI_Wtime()-time00
+#else
+ time_fsample=time_fsample+tcpu()-time00
+#endif
c Compute the stochastic forces acting on virtual-bond vectors.
do j=1,3
ff(j)=0.0d0
do j=1,3
ff(j)=ff(j)+force(j,i)
enddo
- if (itype(i+1).ne.21) then
+ if (itype(i+1).ne.ntyp1) then
do j=1,3
stochforc(j,i)=stochforc(j,i)+force(j,i+nres+1)
ff(j)=ff(j)+force(j,i+nres+1)
stochforc(j,0)=ff(j)+force(j,nnt+nres)
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10) then
do j=1,3
stochforc(j,i+nres)=force(j,i+nres)
enddo
ind=ind+3
enddo
do i=nnt,nct
- if (itype(i).ne.10 .and. itype(i).ne.21) then
+ if (itype(i).ne.10) then
do j=1,3
stochforcvec(ind+j)=stochforc(j,i+nres)
enddo
c------------------------------------------------------------------
subroutine setup_fricmat
implicit real*8 (a-h,o-z)
+#ifdef MPI
include 'mpif.h'
+#endif
include 'DIMENSIONS'
include 'COMMON.VAR'
include 'COMMON.CHAIN'
c Load the friction coefficients corresponding to side chains
m=nct-nnt
ind=0
- gamsc(21)=1.0d0
do i=nnt,nct
ind=ind+1
ii = ind+m
iti=itype(i)
- gamvec(ii)=gamsc(iti)
+ gamvec(ii)=gamsc(iabs(iti))
enddo
if (surfarea) call sdarea(gamvec)
c if (lprn) then
if (nfgtasks.gt.1) then
if (fg_rank.eq.0) then
c The matching BROADCAST for fg processors is called in ERGASTULUM
+#ifdef MPI
time00=MPI_Wtime()
+#else
+ time00=tcpu()
+#endif
call MPI_Bcast(10,1,MPI_INTEGER,king,FG_COMM,IERROR)
+#ifdef MPI
time_Bcast=time_Bcast+MPI_Wtime()-time00
+#else
+ time_Bcast=time_Bcast+tcpu()-time00
+#endif
c print *,"Processor",myrank,
c & " BROADCAST iorder in SETUP_FRICMAT"
endif
c licznik=licznik+1
c write (iout,*) "setup_fricmat licznik",licznik
+#ifdef MPI
time00=MPI_Wtime()
+#else
+ time00=tcpu()
+#endif
c Scatter the friction matrix
call MPI_Scatterv(fricmat(1,1),nginv_counts(0),
& nginv_start(0),MPI_DOUBLE_PRECISION,fcopy(1,1),
& myginv_ng_count,MPI_DOUBLE_PRECISION,king,FG_COMM,IERROR)
- time_scatter=time_scatter+MPI_Wtime()-time00
#ifdef TIMING
+#ifdef MPI
+ time_scatter=time_scatter+MPI_Wtime()-time00
time_scatter_fmat=time_scatter_fmat+MPI_Wtime()-time00
+#else
+ time_scatter=time_scatter+tcpu()-time00
+ time_scatter_fmat=time_scatter_fmat+tcpu()-time00
+#endif
#endif
do i=1,dimen
do j=1,2*my_ng_count
include 'COMMON.NAMES'
double precision radius(maxres2),gamvec(maxres6)
parameter (twosix=1.122462048309372981d0)
- logical lprn /.true./
+ logical lprn /.false./
c
c determine new friction coefficients every few SD steps
c
cd non_conv)
cd write (iout,'(a,f10.5)')
cd & 'Initial RMS deviation from reference structure:',rms
- if (itype(nres).eq.21) then
+ if (itype(nres).eq.ntyp1) then
do j=1,3
dcj=c(j,nres-2)-c(j,nres-3)
c(j,nres)=c(j,nres-1)+dcj
c(j,2*nres)=c(j,nres)
enddo
endif
- if (itype(1).eq.21) then
+ if (itype(1).eq.ntyp1) then
do j=1,3
dcj=c(j,4)-c(j,3)
c(j,1)=c(j,2)-dcj
& dcostau,dsintau,dtauangle,dcosomicron,
& domicron
integer nterm_sccor,isccortyp,nsccortyp,nlor_sccor
- common/sccor/v1sccor(maxterm_sccor,3,20,20),
- & v2sccor(maxterm_sccor,3,20,20),
- & v0sccor(ntyp,ntyp),
- & nterm_sccor(ntyp,ntyp),isccortyp(ntyp),nsccortyp,
- & nlor_sccor(ntyp,ntyp),vlor1sccor(maxterm_sccor,20,20),
+ common/sccor/v1sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp),
+ & v2sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp),
+ & v0sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & nterm_sccor(-ntyp:ntyp,-ntyp:ntyp),isccortyp(-ntyp:ntyp),
+ & nsccortyp,
+ & nlor_sccor(-ntyp:ntyp,-ntyp:ntyp),
+ & vlor1sccor(maxterm_sccor,20,20),
& vlor2sccor(maxterm_sccor,20,20),
& vlor3sccor(maxterm_sccor,20,20),gloc_sc(3,0:maxres2,10),
& dcostau(3,3,3,maxres2),dsintau(3,3,3,maxres2),
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
+ itypj=iabs(itype(j))
c dscj_inv=dsc_inv(itypj)
dscj_inv=vbld_inv(j+nres)
chi1=chi(itypi,itypj)
do j = 1,3
xx = xx + x_prime(j)*dc_norm(j,i+nres)
yy = yy + y_prime(j)*dc_norm(j,i+nres)
- zz = zz + z_prime(j)*dc_norm(j,i+nres)
+ zz = zz + dsign(1.0,itype(i))*z_prime(j)*dc_norm(j,i+nres)
enddo
xxtab(i)=xx
C Compute the energy of the ith side cbain
C
c write (2,*) "xx",xx," yy",yy," zz",zz
- it=itype(i)
+ it=iabs(itype(i))
do j = 1,65
x(j) = sc_parmin(j,it)
enddo
Cc diagnostics - remove later
xx1 = dcos(alph(2))
yy1 = dsin(alph(2))*dcos(omeg(2))
- zz1 = -dsin(alph(2))*dsin(omeg(2))
+ zz1 = -dsign(1.0,itype(i))*dsin(alph(2))*dsin(omeg(2))
write(2,'(3f8.1,3f9.3,1x,3f9.3)')
& alph(2)*rad2deg,omeg(2)*rad2deg,theta(3)*rad2deg,xx,yy,zz,
& xx1,yy1,zz1
esccor=0.0D0
do i=itau_start,itau_end
esccor_ii=0.0D0
+ if ((itype(i-2).eq.ntyp1).or.(itype(i-1).eq.ntyp1)) cycle
isccori=isccortyp(itype(i-2))
isccori1=isccortyp(itype(i-1))
phii=phi(i)
c 3 = SC...Ca...Ca...SCi
gloci=0.0D0
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)))
+ & (itype(i-1).eq.10).or.(itype(i-2).eq.ntyp1).or.
+ & (itype(i-1).eq.ntyp1)))
& .or. ((intertyp.eq.1).and.((itype(i-2).eq.10)
- & .or.(itype(i-2).eq.21)))
+ & .or.(itype(i-2).eq.ntyp1)))
& .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))
+ & (itype(i-1).eq.ntyp1)))) cycle
+ if ((intertyp.eq.2).and.(i.eq.4).and.(itype(1).eq.ntyp1)) cycle
+ if ((intertyp.eq.1).and.(i.eq.nres).and.(itype(nres).eq.ntyp1))
& cycle
do j=1,nterm_sccor(isccori,isccori1)
v1ij=v1sccor(j,intertyp,isccori,isccori1)
c enddo
if (nres.lt.2) return
if ((nres.lt.3).and.(itype(1).eq.10)) return
- if ((itype(1).ne.10).and.(itype(1).ne.21)) then
+ if ((itype(1).ne.10).and.(itype(1).ne.ntyp1)) then
do j=1,3
cc Derviative was calculated for oposite vector of side chain therefore
c there is "-" sign before gloc_sc
& dtauangle(j,1,1,3)
gcart(j,1)=gcart(j,1)+gloc_sc(1,0,icg)*
& dtauangle(j,1,2,3)
- if ((itype(2).ne.10).and.(itype(2).ne.21)) then
+ if ((itype(2).ne.10).and.(itype(2).ne.ntyp1)) then
gxcart(j,1)= gxcart(j,1)
& -gloc_sc(3,0,icg)*dtauangle(j,3,1,3)
gcart(j,1)=gcart(j,1)+gloc_sc(3,0,icg)*
endif
enddo
endif
- if ((nres.ge.3).and.(itype(3).ne.10).and.(itype(3).ne.21))
+ if ((nres.ge.3).and.(itype(3).ne.10).and.(itype(3).ne.ntyp1))
& then
do j=1,3
gcart(j,1)=gcart(j,1)+gloc_sc(2,1,icg)*dtauangle(j,2,1,4)
c Calculating the remainder of dE/ddc2
do j=1,3
- if((itype(2).ne.10).and.(itype(2).ne.21)) then
+ if((itype(2).ne.10).and.(itype(2).ne.ntyp1)) then
if (itype(1).ne.10) gxcart(j,2)=gxcart(j,2)+
& gloc_sc(3,0,icg)*dtauangle(j,3,3,3)
- if ((itype(3).ne.10).and.(nres.ge.3).and.(itype(3).ne.21)) then
+ if ((itype(3).ne.10).and.(nres.ge.3).and.(itype(3).ne.ntyp1))
+ & then
gxcart(j,2)=gxcart(j,2)-gloc_sc(3,1,icg)*dtauangle(j,3,1,4)
cc the - above is due to different vector direction
gcart(j,2)=gcart(j,2)+gloc_sc(3,1,icg)*dtauangle(j,3,2,4)
c write(iout,*) gloc_sc(1,1,icg),dtauangle(j,1,1,4),"gx"
endif
endif
- if ((itype(1).ne.10).and.(itype(1).ne.21)) then
+ if ((itype(1).ne.10).and.(itype(1).ne.ntyp1)) then
gcart(j,2)=gcart(j,2)+gloc_sc(1,0,icg)*dtauangle(j,1,3,3)
c write(iout,*) gloc_sc(1,0,icg),dtauangle(j,1,3,3)
endif
c Setting dE/ddnres-1
if(nres.ge.4) then
do j=1,3
- if ((itype(nres-1).ne.10).and.(itype(nres-1).ne.21)) then
+ if ((itype(nres-1).ne.10).and.(itype(nres-1).ne.ntyp1)) then
gxcart(j,nres-1)=gxcart(j,nres-1)+gloc_sc(2,nres-3,icg)
& *dtauangle(j,2,3,nres)
c write (iout,*) "gxcart(nres-1)", gloc_sc(2,nres-3,icg),
gxcart(j,nres-1)=gxcart(j,nres-1)+gloc_sc(3,nres-3,icg)
& *dtauangle(j,3,3,nres)
endif
- if ((itype(nres).ne.10).and.(itype(nres).ne.21)) then
+ if ((itype(nres).ne.10).and.(itype(nres).ne.ntyp1)) then
gxcart(j,nres-1)=gxcart(j,nres-1)-gloc_sc(3,nres-2,icg)
& *dtauangle(j,3,1,nres+1)
gcart(j,nres-1)=gcart(j,nres-1)+gloc_sc(3,nres-2,icg)
& *dtauangle(j,3,2,nres+1)
endif
endif
- if ((itype(nres-2).ne.10).and.(itype(nres-2).ne.21)) then
+ if ((itype(nres-2).ne.10).and.(itype(nres-2).ne.ntyp1)) then
gcart(j,nres-1)=gcart(j,nres-1)+gloc_sc(1,nres-3,icg)*
& dtauangle(j,1,3,nres)
endif
- if ((itype(nres).ne.10).and.(itype(nres).ne.21)) then
+ if ((itype(nres).ne.10).and.(itype(nres).ne.ntyp1)) then
gcart(j,nres-1)=gcart(j,nres-1)+gloc_sc(2,nres-2,icg)*
& dtauangle(j,2,2,nres+1)
c write (iout,*) "gcart(nres-1)", gloc_sc(2,nres-2,icg),
#else
do i=3,nres
#endif
- if ((itype(i-1).ne.10).and.(itype(i-1).ne.21)) then
+ if ((itype(i-1).ne.10).and.(itype(i-1).ne.ntyp1)) then
cost1=dcos(omicron(1,i))
sint1=sqrt(1-cost1*cost1)
cost2=dcos(omicron(2,i))
#else
do i=3,nres
#endif
- if ((itype(i-2).eq.21).or.(itype(i-2).eq.10)) cycle
+ if ((itype(i-2).eq.ntyp1).or.(itype(i-2).eq.10)) cycle
cc dtauangle(j,intertyp,dervityp,residue number)
cc INTERTYP=1 SC...Ca...Ca..Ca
c the conventional case
#else
do i=4,nres
#endif
- if ((itype(i-1).eq.21).or.(itype(i-1).eq.10)) cycle
+ if ((itype(i-1).eq.ntyp1).or.(itype(i-1).eq.10)) cycle
c the conventional case
sint=dsin(omicron(1,i))
sint1=dsin(theta(i-1))
do i=3,nres
#endif
c the conventional case
- if ((itype(i-1).eq.21).or.(itype(i-1).eq.10).or.
- &(itype(i-2).eq.21).or.(itype(i-2).eq.10)) cycle
+ if ((itype(i-1).eq.ntyp1).or.(itype(i-1).eq.10).or.
+ &(itype(i-2).eq.ntyp1).or.(itype(i-2).eq.10)) cycle
sint=dsin(omicron(1,i))
sint1=dsin(omicron(2,i-1))
sing=dsin(tauangle(3,i))
do j=1,ntortyp
do k=1,ntortyp
read (itordp,'(3a1)',end=114,err=114) t1,t2,t3
- if (t1.ne.onelett(i) .or. t2.ne.onelett(j)
- & .or. t3.ne.onelett(k)) then
+c write (iout,*) "OK onelett",
+c & i,j,k,t1,t2,t3
+
+ if (t1.ne.toronelet(i) .or. t2.ne.toronelet(j)
+ & .or. t3.ne.toronelet(k)) then
write (iout,*) "Error in double torsional parameter file",
& i,j,k,t1,t2,t3
#ifdef MPI
C
read (isccor,*,end=113,err=113) nsccortyp
read (isccor,*,end=113,err=113) (isccortyp(i),i=1,ntyp)
+ do i=-ntyp,-1
+ isccortyp(i)=-isccortyp(-i)
+ enddo
+ iscprol=isccortyp(20)
c write (iout,*) 'ntortyp',ntortyp
maxinter=3
cc maxinter is maximum interaction sites
do j=1,nsccortyp
read (isccor,*,end=113,err=113) nterm_sccor(i,j),nlor_sccor(i,j)
v0ijsccor=0.0d0
+ v0ijsccor1=0.0d0
+ v0ijsccor2=0.0d0
+ v0ijsccor3=0.0d0
si=-1.0d0
-
+ nterm_sccor(-i,j)=nterm_sccor(i,j)
+ nterm_sccor(-i,-j)=nterm_sccor(i,j)
+ nterm_sccor(i,-j)=nterm_sccor(i,j)
do k=1,nterm_sccor(i,j)
read (isccor,*,end=113,err=113) kk,v1sccor(k,l,i,j)
- & ,v2sccor(k,l,i,j)
+ & ,v2sccor(k,l,i,j)
+ if (j.eq.iscprol) then
+ if (i.eq.isccortyp(10)) then
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ else
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)*0.5d0
+ & +v2sccor(k,l,i,j)*dsqrt(0.75d0)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)*0.5d0
+ & +v1sccor(k,l,i,j)*dsqrt(0.75d0)
+ v1sccor(k,l,-i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,-j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,-j)
+ endif
+ else
+ if (i.eq.isccortyp(10)) then
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ else
+ if (j.eq.isccortyp(10)) then
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,j)
+ else
+ v1sccor(k,l,i,-j)=-v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,-j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,-j)
+ endif
+ endif
+ endif
v0ijsccor=v0ijsccor+si*v1sccor(k,l,i,j)
+ v0ijsccor1=v0ijsccor+si*v1sccor(k,l,-i,j)
+ v0ijsccor2=v0ijsccor+si*v1sccor(k,l,i,-j)
+ v0ijsccor3=v0ijsccor+si*v1sccor(k,l,-i,-j)
si=-si
enddo
do k=1,nlor_sccor(i,j)
v0ijsccor=v0ijsccor+vlor1sccor(k,i,j)/
&(1+vlor3sccor(k,i,j)**2)
enddo
+ v0sccor(l,i,j)=v0ijsccor
+ v0sccor(l,-i,j)=v0ijsccor1
+ v0sccor(l,i,-j)=v0ijsccor2
+ v0sccor(l,-i,-j)=v0ijsccor3
+ enddo
+ enddo
+ enddo
+ close (isccor)
+#else
+ read (isccor,*,end=113,err=113) (isccortyp(i),i=1,ntyp)
+c write (iout,*) 'ntortyp',ntortyp
+ maxinter=3
+cc maxinter is maximum interaction sites
+ do l=1,maxinter
+ do i=1,nsccortyp
+ do j=1,nsccortyp
+ read (isccor,*,end=113,err=113)
+ & nterm_sccor(i,j),nlor_sccor(i,j)
+ v0ijsccor=0.0d0
+ si=-1.0d0
+
+ do k=1,nterm_sccor(i,j)
+ read (isccor,*,end=113,err=113) kk,v1sccor(k,l,i,j)
+ & ,v2sccor(k,l,i,j)
+ v0ijsccor=v0ijsccor+si*v1sccor(k,l,i,j)
+ si=-si
+ enddo
+ do k=1,nlor_sccor(i,j)
+ read (isccor,*,end=113,err=113) kk,vlor1sccor(k,i,j),
+ & vlor2sccor(k,i,j),vlor3sccor(k,i,j)
+ v0ijsccor=v0ijsccor+vlor1sccor(k,i,j)/
+ &(1+vlor3sccor(k,i,j)**2)
+ enddo
v0sccor(i,j)=v0ijsccor
enddo
enddo
enddo
close (isccor)
-
+
+#endif
if (lprint) then
write (iout,'(/a/)') 'Torsional constants:'
do i=1,nsccortyp
c b1(1,i)=0.0d0
c b1(2,i)=0.0d0
B1tilde(1,i) = b(3)
- B1tilde(2,i) =-b(5)
+ B1tilde(2,i) =-b(5)
+ B1tilde(1,-i) =-b(3)
+ B1tilde(2,-i) =b(5)
c b1tilde(1,i)=0.0d0
c b1tilde(2,i)=0.0d0
B2(1,i) = b(2)
ishift=ires-1
if (res.ne.'GLY' .and. res.ne. 'ACE') then
ishift=ishift-1
- itype(1)=21
+ itype(1)=ntyp1
endif
ibeg=0
endif
nstart_sup=1
if (itype(nres).ne.10) then
nres=nres+1
- itype(nres)=21
+ itype(nres)=ntyp1
if (unres_pdb) then
c(1,nres)=c(1,nres-1)+3.8d0
c(2,nres)=c(2,nres-1)
c(j,nres+1)=c(j,1)
c(j,2*nres)=c(j,nres)
enddo
- if (itype(1).eq.21) then
+ if (itype(1).eq.ntyp1) then
nsup=nsup-1
nstart_sup=2
if (unres_pdb) then
c print '(20i4)',(itype(i),i=1,nres)
do i=1,nres
#ifdef PROCOR
- if (itype(i).eq.21 .or. itype(i+1).eq.21) then
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) then
#else
- if (itype(i).eq.21) then
+ if (itype(i).eq.ntyp1) then
#endif
itel(i)=0
#ifdef PROCOR
#endif
nct=nres
cd print *,'NNT=',NNT,' NCT=',NCT
- if (itype(1).eq.21) nnt=2
- if (itype(nres).eq.21) nct=nct-1
-
-C Juyong:READ init_vars
-C Initialize variables!
-C Juyong:READ read_info
-C READ fragment information!!
-C both routines should be in dfa.F file!!
-
- if (.not. (wdfa_dist.eq.0.0 .and. wdfa_tor.eq.0.0 .and.
- & wdfa_nei.eq.0.0 .and. wdfa_beta.eq.0.0)) then
- call init_dfa_vars
- print*, 'init_dfa_vars finished!'
- call read_dfa_info
- print*, 'read_dfa_info finished!'
- endif
-C
-C
-
-
+ if (itype(1).eq.ntyp1) nnt=2
+ if (itype(nres).eq.ntyp1) nct=nct-1
if (pdbref) then
if(me.eq.king.or..not.out1file)
& write (iout,'(a,i3)') 'nsup=',nsup
c Don't do glycine or ends
i=itype(res_pick)
- if (i.eq.10 .or. i.eq.21) return
+ if (i.eq.10 .or. i.eq.ntyp1) return
c Freeze everything (later will relax only selected side-chains)
mask_r=.true.
do j=1,3
ff(j)=ff(j)+force(j,i)
enddo
- if (itype(i+1).ne.21) then
+ if (itype(i+1).ne.ntyp1) then
do j=1,3
stochforc(j,i)=stochforc(j,i)+force(j,i+nres+1)
ff(j)=ff(j)+force(j,i+nres+1)
ind=ind+1
ii = ind+m
iti=itype(i)
- gamvec(ii)=gamsc(iti)
+ gamvec(ii)=gamsc(iabs(iti))
enddo
if (surfarea) call sdarea(gamvec)
c if (lprn) then
cd non_conv)
cd write (iout,'(a,f10.5)')
cd & 'Initial RMS deviation from reference structure:',rms
- if (itype(nres).eq.21) then
+ if (itype(nres).eq.ntyp1) then
do j=1,3
dcj=c(j,nres-2)-c(j,nres-3)
c(j,nres)=c(j,nres-1)+dcj
c(j,2*nres)=c(j,nres)
enddo
endif
- if (itype(1).eq.21) then
+ if (itype(1).eq.ntyp1) then
do j=1,3
dcj=c(j,4)-c(j,3)
c(j,1)=c(j,2)-dcj
& vbldsc0_all(maxbondterm,ntyp,max_parm),
& aksc_all(maxbondterm,ntyp,max_parm),
& abond0_all(maxbondterm,ntyp,max_parm),
- & a0thet_all(ntyp,max_parm),athet_all(2,ntyp,max_parm),
- & bthet_all(2,ntyp,max_parm),polthet_all(0:3,ntyp,max_parm),
- & gthet_all(3,ntyp,max_parm),theta0_all(ntyp,max_parm),
- & sig0_all(ntyp,max_parm),sigc0_all(ntyp,max_parm),
+ & a0thet_all(-ntyp:ntyp,max_parm),
+ & athet_all(2,-ntyp:ntyp,-1:1,-1:1,max_parm),
+ & bthet_all(2,-ntyp:ntyp,-1:1,-1:1,max_parm),
+ & polthet_all(0:3,-ntyp:ntyp,max_parm),
+ & gthet_all(3,-ntyp:ntyp,max_parm),theta0_all(-ntyp:ntyp,max_parm),
+ & sig0_all(-ntyp:ntyp,max_parm),sigc0_all(-ntyp:ntyp,max_parm),
& aa0thet_all(maxthetyp1,maxthetyp1,maxthetyp1,max_parm),
& aathet_all(maxtheterm,maxthetyp1,maxthetyp1,maxthetyp1,max_parm),
& bbthet_all(maxsingle,maxtheterm2,maxthetyp1,maxthetyp1,
& ggthet_all(maxdouble,maxdouble,maxtheterm3,maxthetyp1,maxthetyp1,
& maxthetyp1,max_parm),
& dsc_all(ntyp1,max_parm),bsc_all(maxlob,ntyp,max_parm),
- & censc_all(3,maxlob,ntyp,max_parm),
- & gaussc_all(3,3,maxlob,ntyp,max_parm),dsc0_all(ntyp1,max_parm),
+ & censc_all(3,maxlob,-ntyp:ntyp,max_parm),
+ & gaussc_all(3,3,maxlob,-ntyp:ntyp,max_parm),
+ & dsc0_all(ntyp1,max_parm),
& sc_parmin_all(65,ntyp,max_parm),
- & v0_all(maxtor,maxtor,max_parm),
- & v1_all(maxterm,maxtor,maxtor,max_parm),
- & v2_all(maxterm,maxtor,maxtor,max_parm),
+ & v0_all(-maxtor:maxtor,-maxtor:maxtor,2,max_parm),
+ & v1_all(maxterm,-maxtor:maxtor,-maxtor:maxtor,2,max_parm),
+ & v2_all(maxterm,-maxtor:maxtor,-maxtor:maxtor,2,max_parm),
& vlor1_all(maxlor,maxtor,maxtor,max_parm),
& vlor2_all(maxlor,maxtor,maxtor,max_parm),
& vlor3_all(maxlor,maxtor,maxtor,max_parm),
- & v1c_all(2,maxtermd_1,maxtor,maxtor,maxtor,max_parm),
- & v1s_all(2,maxtermd_1,maxtor,maxtor,maxtor,max_parm),
- & v2c_all(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor,max_parm),
- & v2s_all(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor,max_parm),
- & b1_all(2,maxtor,max_parm),b2_all(2,maxtor,max_parm),
- & cc_all(2,2,maxtor,max_parm),dd_all(2,2,maxtor,max_parm),
- & ee_all(2,2,maxtor,max_parm),ctilde_all(2,2,maxtor,max_parm),
- & dtilde_all(2,2,maxtor,max_parm),b1tilde_all(2,maxtor,max_parm),
+ & v1c_all(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2,max_parm),
+ & v1s_all(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2,max_parm),
+ & v2c_all(maxtermd_2,maxtermd_2,-maxtor:maxtor,
+ & -maxtor:maxtor,-maxtor:maxtor,2,max_parm),
+ & v2s_all(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2,max_parm),
+ & b1_all(2,-maxtor:maxtor,max_parm),
+ & b2_all(2,-maxtor:maxtor,max_parm),
+ & cc_all(2,2,-maxtor:maxtor,max_parm),
+ & dd_all(2,2,-maxtor:maxtor,max_parm),
+ & ee_all(2,2,-maxtor:maxtor,max_parm),
+ & ctilde_all(2,2,-maxtor:maxtor,max_parm),
+ & dtilde_all(2,2,-maxtor:maxtor,max_parm),
+ & b1tilde_all(2,-maxtor:maxtor,max_parm),
& app_all(2,2,max_parm),bpp_all(2,2,max_parm),
& ael6_all(2,2,max_parm),ael3_all(2,2,max_parm),
& aad_all(ntyp,2,max_parm),bad_all(ntyp,2,max_parm),
& alp_all(ntyp,max_parm),ebr_all(max_parm),d0cm_all(max_parm),
& akcm_all(max_parm),akth_all(max_parm),akct_all(max_parm),
& v1ss_all(max_parm),v2ss_all(max_parm),v3ss_all(max_parm),
- & v1sccor_all(maxterm_sccor,ntyp,ntyp,max_parm),
- & v2sccor_all(maxterm_sccor,ntyp,ntyp,max_parm)
- integer nlob_all(ntyp1,max_parm),nlor_all(maxtor,maxtor,max_parm),
- & nterm_all(maxtor,maxtor,max_parm),
- & ntermd1_all(maxtor,maxtor,maxtor,max_parm),
- & ntermd2_all(maxtor,maxtor,maxtor,max_parm),
+ & v1sccor_all(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp,max_parm),
+ & v2sccor_all(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp,max_parm)
+ integer nlob_all(ntyp1,max_parm),
+ & nlor_all(-maxtor:maxtor,-maxtor:maxtor,2,max_parm),
+ & nterm_all(-maxtor:maxtor,-maxtor:maxtor,2,max_parm),
+ & ntermd1_all(-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2,max_parm),
+ & ntermd2_all(-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2,max_parm),
& nbondterm_all(ntyp,max_parm),nthetyp_all(max_parm),
& ithetyp_all(ntyp1,max_parm),ntheterm_all(max_parm),
& ntheterm2_all(max_parm),ntheterm3_all(max_parm),
& nsingle_all(max_parm),ndouble_all(max_parm),
- & nntheterm_all(max_parm),nterm_sccor_all(max_parm)
+ & nntheterm_all(max_parm),
+ &nterm_sccor_all(-ntyp:ntyp,-ntyp:ntyp,max_parm)
common /allparm/ ww_all,vbldp0_all,akp_all,vbldsc0_all,aksc_all,
& abond0_all,aa0thet_all,aathet_all,bbthet_all,ccthet_all,
& ddthet_all,eethet_all,ffthet_all,ggthet_all,
integer ntheta,nphi,nside,nvar,ialph,ivar
double precision theta,phi,alph,omeg,vbld,vbld_ref,
& theta_ref,phi_ref,alph_ref,omeg_ref,
- & costtab,sinttab,cost2tab,sint2tab,
+ & costtab,sinttab,cost2tab,sint2tab,tauangle,omicron,
& xxtab,yytab,zztab
common /var/ theta(maxres),phi(maxres),alph(maxres),omeg(maxres),
& vbld(2*maxres),
& costtab(maxres), sinttab(maxres), cost2tab(maxres),
& sint2tab(maxres),xxtab(maxres),yytab(maxres),
& zztab(maxres),
- & ialph(maxres,2),ivar(4*maxres2),ntheta,nphi,nside,nvar
+ & ialph(maxres,2),ivar(4*maxres2),ntheta,nphi,nside,nvar,
+ & omicron(2,maxres),tauangle(3,maxres)
C Angles from experimental structure
common /varref/ vbld_ref(maxres),
& theta_ref(maxres),phi_ref(maxres),
parameter (maxtor=4,maxterm=10,maxlor=3,maxtermd_1=8,maxtermd_2=8)
c Max number of torsional terms in SCCOR
integer maxterm_sccor
- parameter (maxterm_sccor=3)
+ parameter (maxterm_sccor=6)
C Max. number of residue types and parameters in expressions for
C virtual-bond angle bending potentials
integer maxthetyp,maxthetyp1,maxtheterm,maxtheterm2,maxtheterm3,
INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh
-BIN = ../bin
+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 -lmpich ../../lib/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
* Derivatives in alpha and omega:
*
do i=2,nres-1
- dsci=dsc(itype(i))
+ dsci=dsc(iabs(itype(i)))
alphi=alph(i)
omegi=omeg(i)
cd print *,'i=',i,' dsci=',dsci,' alphi=',alphi,' omegi=',omegi
endif
110 format (a,'(',i3,')',9f8.3)
do i=ist,ien-kkk
- iti=itype(i)
+ iti=iabs(itype(i))
if (iti.le.0 .or. iti.gt.ntyp) cycle
do j=i+kkk,ien
- itj=itype(j)
+ itj=iabs(itype(j))
if (itj.le.0 .or. itj.gt.ntyp) cycle
itypi=iti
itypj=itj
it2=itype(i2)
write (iout,'(i3,2x,a,i4,2x,a,i4,5f8.3,3f10.5)')
& i,restyp(it1),i1,restyp(it2),i2,cscore(i),
- & sc_cutoff(it1,it2),ddsc(i),ddla(i),ddlb(i),
+ & sc_cutoff(iabs(it1),iabs(it2)),ddsc(i),ddla(i),ddlb(i),
& omt1(i),omt2(i),omt12(i)
enddo
endif
& " the value read in: ",energia(0),eini," point",
& iii+1,indstart(me1)+iii," T",
& 1.0d0/(1.987D-3*beta_h(ib,ipar))
+c call intout
+ call pdbout(indstart(me1)+iii,
+ & 1.0d0/(1.987D-3*beta_h(ib,ipar)),
+ &energia(0),eini,0.0d0,0.0d0)
+ call enerprint(energia(0),fT)
errmsg_count=errmsg_count+1
if (errmsg_count.gt.maxerrmsg_count)
& write (iout,*) "Too many warning messages"
endif
call int_from_cart1(.false.)
do j=nnt+1,nct
- if (itype(j-1).ne.21 .and. itype(j).ne.21 .and.
+ if (itype(j-1).ne.ntyp1 .and. itype(j).ne.ntyp1 .and.
& (vbld(j).lt.2.0d0 .or. vbld(j).gt.5.0d0)) then
if (iprint.gt.0)
& write (iout,*) "Bad CA-CA bond length",j," ",vbld(j),
enddo
do j=nnt,nct
itj=itype(j)
- if (itype(j).ne.10 .and.itype(j).ne.21 .and.
- & (vbld(nres+j)-dsc(itj)).gt.2.0d0) then
+ if (itype(j).ne.10 .and.itype(j).ne.ntyp1 .and.
+ & (vbld(nres+j)-dsc(iabs(itj))).gt.2.0d0) then
if (iprint.gt.0)
& write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j),
& " for conformation",ii
& +wturn3*fact(2)*gel_loc_turn3(i)
& +wturn6*fact(5)*gel_loc_turn6(i)
& +wel_loc*fact(2)*gel_loc_loc(i)
- & +wsccor*fact(1)*gsccor_loc(i)
enddo
endif
return
evdw=0.0D0
evdw_t=0.0d0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
cd write (iout,*) 'i=',i,' iint=',iint,' istart=',istart(i,iint),
cd & 'iend=',iend(i,iint)
do j=istart(i,iint),iend(i,iint)
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
evdw=0.0D0
evdw_t=0.0d0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
C
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
c endif
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
dscj_inv=vbld_inv(j+nres)
chi1=chi(itypi,itypj)
chi2=chi(itypj,itypi)
c if (icall.gt.0) lprn=.true.
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
dscj_inv=vbld_inv(j+nres)
sig0ij=sigma(itypi,itypj)
chi1=chi(itypi,itypj)
c if (icall.gt.0) lprn=.true.
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- if (itypi.eq.21) cycle
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ if (itypi.eq.ntyp1) cycle
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
dscj_inv=vbld_inv(j+nres)
sig0ij=sigma(itypi,itypj)
r0ij=r0(itypi,itypj)
gcorr_loc(i)=0.0d0
enddo
do i=iatel_s,iatel_e
- if (itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
if (itel(i).eq.0) goto 1215
dxi=dc(1,i)
dyi=dc(2,i)
num_conti=0
c write (iout,*) 'i',i,' ielstart',ielstart(i),' ielend',ielend(i)
do j=ielstart(i),ielend(i)
- if (itype(j).eq.21 .or. itype(j+1).eq.21) cycle
+ if (itype(j).eq.ntyp1 .or. itype(j+1).eq.ntyp1) cycle
if (itel(j).eq.0) goto 1216
ind=ind+1
iteli=itel(i)
& +0.5d0*(pizda(1,1)+pizda(2,2))
enddo
endif
- else if (j.eq.i+3 .and. itype(i+2).ne.21) then
+ else if (j.eq.i+3 .and. itype(i+2).ne.ntyp1) then
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C
C Fourth-order contributions
c write (iout,*) 'iatscp_s=',iatscp_s,' iatscp_e=',iatscp_e,
c & ' scal14',scal14
do i=iatscp_s,iatscp_e
- if (itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
iteli=itel(i)
c write (iout,*) "i",i," iteli",iteli," nscp_gr",nscp_gr(i),
c & " iscp",(iscpstart(i,j),iscpend(i,j),j=1,nscp_gr(i))
do iint=1,nscp_gr(i)
do j=iscpstart(i,iint),iscpend(i,iint)
- itypj=itype(j)
- if (itypj.eq.21) cycle
+ itypj=iabs(itype(j))
+ if (itypj.eq.ntyp1) cycle
C Uncomment following three lines for SC-p interactions
c xj=c(1,nres+j)-xi
c yj=c(2,nres+j)-yi
endif
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
+ if (ii.gt.nres .and. iabs(itype(iii)).eq.1 .and.
+ & iabs(itype(jjj)).eq.1) then
call ssbond_ene(iii,jjj,eij)
ehpb=ehpb+2*eij
else
include 'COMMON.VAR'
include 'COMMON.IOUNITS'
double precision erij(3),dcosom1(3),dcosom2(3),gg(3)
- itypi=itype(i)
+ itypi=iabs(itype(i))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
dyi=dc_norm(2,nres+i)
dzi=dc_norm(3,nres+i)
dsci_inv=dsc_inv(itypi)
- itypj=itype(j)
+ itypj=iabs(itype(j))
dscj_inv=dsc_inv(itypj)
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
logical energy_dec /.false./
double precision u(3),ud(3)
estr=0.0d0
- write (iout,*) "distchainmax",distchainmax
+ estr1=0.0d0
+c write (iout,*) "distchainmax",distchainmax
do i=nnt+1,nct
- if (itype(i-1).eq.21 .or. itype(i).eq.21) then
+ if (itype(i-1).eq.ntyp1 .or. itype(i).eq.ntyp1) then
estr1=estr1+gnmr1(vbld(i),-1.0d0,distchainmax)
do j=1,3
gradb(j,i-1)=gnmr1prim(vbld(i),-1.0d0,distchainmax)
endif
enddo
- estr=0.5d0*AKP*estr
+ estr=0.5d0*AKP*estr+estr1
c
c 09/18/07 AL: multimodal bond potential based on AM1 CA-SC PMF's included
c
do i=nnt,nct
- iti=itype(i)
- if (iti.ne.10 .and. iti.ne.21) then
+ iti=iabs(itype(i))
+ if (iti.ne.10 .and. iti.ne.ntyp1) then
nbi=nbondterm(iti)
if (nbi.eq.1) then
diff=vbld(i+nres)-vbldsc0(1,iti)
c write (*,'(a,i2)') 'EBEND ICG=',icg
c write (iout,*) ithet_start,ithet_end
do i=ithet_start,ithet_end
- if (itype(i-1).eq.21) cycle
+ if (itype(i-1).eq.ntyp1) cycle
C Zero the energy function and its derivative at 0 or pi.
call splinthet(theta(i),0.5d0*delta,ss,ssd)
it=itype(i-1)
- if (i.gt.3 .and. itype(i-2).ne.21) then
+ ichir1=isign(1,itype(i-2))
+ ichir2=isign(1,itype(i))
+ if (itype(i-2).eq.10) ichir1=isign(1,itype(i-1))
+ if (itype(i).eq.10) ichir2=isign(1,itype(i-1))
+ if (itype(i-1).eq.10) then
+ itype1=isign(10,itype(i-2))
+ ichir11=isign(1,itype(i-2))
+ ichir12=isign(1,itype(i-2))
+ itype2=isign(10,itype(i))
+ ichir21=isign(1,itype(i))
+ ichir22=isign(1,itype(i))
+ endif
+
+ if (i.gt.3 .and. itype(i-2).ne.ntyp1) then
#ifdef OSF
phii=phi(i)
icrc=0
y(1)=0.0D0
y(2)=0.0D0
endif
- if (i.lt.nres .and. itype(i).ne.21) then
+ if (i.lt.nres .and. itype(i).ne.ntyp1) then
#ifdef OSF
phii1=phi(i+1)
icrc=0
C In following comments this theta will be referred to as t_c.
thet_pred_mean=0.0d0
do k=1,2
- athetk=athet(k,it)
- bthetk=bthet(k,it)
+ athetk=athet(k,it,ichir1,ichir2)
+ bthetk=bthet(k,it,ichir1,ichir2)
+ if (it.eq.10) then
+ athetk=athet(k,itype1,ichir11,ichir12)
+ bthetk=bthet(k,itype2,ichir21,ichir22)
+ endif
thet_pred_mean=thet_pred_mean+athetk*y(k)+bthetk*z(k)
enddo
c write (iout,*) "thet_pred_mean",thet_pred_mean
thet_pred_mean=thet_pred_mean*ss+a0thet(it)
c write (iout,*) "thet_pred_mean",thet_pred_mean
C Derivatives of the "mean" values in gamma1 and gamma2.
- dthetg1=(-athet(1,it)*y(2)+athet(2,it)*y(1))*ss
- dthetg2=(-bthet(1,it)*z(2)+bthet(2,it)*z(1))*ss
+ dthetg1=(-athet(1,it,ichir1,ichir2)*y(2)
+ &+athet(2,it,ichir1,ichir2)*y(1))*ss
+ dthetg2=(-bthet(1,it,ichir1,ichir2)*z(2)
+ & +bthet(2,it,ichir1,ichir2)*z(1))*ss
+ if (it.eq.10) then
+ dthetg1=(-athet(1,itype1,ichir11,ichir12)*y(2)
+ &+athet(2,itype1,ichir11,ichir12)*y(1))*ss
+ dthetg2=(-bthet(1,itype2,ichir21,ichir22)*z(2)
+ & +bthet(2,itype2,ichir21,ichir22)*z(1))*ss
+ endif
if (theta(i).gt.pi-delta) then
call theteng(pi-delta,thet_pred_mean,theta0(it),f0,fprim0,
& E_tc0)
etheta=0.0D0
c write (iout,*) "ithetyp",(ithetyp(i),i=1,ntyp1)
do i=ithet_start,ithet_end
- if (itype(i-1).eq.21) cycle
+ if (itype(i-1).eq.ntyp1) cycle
dethetai=0.0d0
dephii=0.0d0
dephii1=0.0d0
theti2=0.5d0*theta(i)
- ityp2=ithetyp(itype(i-1))
+ ityp2=ithetyp(iabs(itype(i-1)))
do k=1,nntheterm
coskt(k)=dcos(k*theti2)
sinkt(k)=dsin(k*theti2)
enddo
- if (i.gt.3 .and. itype(i-2).ne.21) then
+ if (i.gt.3 .and. itype(i-2).ne.ntyp1) then
#ifdef OSF
phii=phi(i)
if (phii.ne.phii) phii=150.0
#else
phii=phi(i)
#endif
- ityp1=ithetyp(itype(i-2))
+ ityp1=ithetyp(iabs(itype(i-2)))
do k=1,nsingle
cosph1(k)=dcos(k*phii)
sinph1(k)=dsin(k*phii)
sinph1(k)=0.0d0
enddo
endif
- if (i.lt.nres .and. itype(i).ne.21) then
+ if (i.lt.nres .and. itype(i).ne.ntyp1) then
#ifdef OSF
phii1=phi(i+1)
if (phii1.ne.phii1) phii1=150.0
#else
phii1=phi(i+1)
#endif
- ityp3=ithetyp(itype(i))
+ ityp3=ithetyp(iabs(itype(i)))
do k=1,nsingle
cosph2(k)=dcos(k*phii1)
sinph2(k)=dsin(k*phii1)
c write (iout,'(a)') 'ESC'
do i=loc_start,loc_end
it=itype(i)
- if (it.eq.21) cycle
+ if (it.eq.ntyp1) cycle
if (it.eq.10) goto 1
- nlobit=nlob(it)
+ nlobit=nlob(iabs(it))
c print *,'i=',i,' it=',it,' nlobit=',nlobit
c write (iout,*) 'i=',i,' ssa=',ssa,' ssad=',ssad
theti=theta(i+1)-pipol
do iii=-1,1
do j=1,nlobit
- expfac=dexp(bsc(j,it)-0.5D0*contr(j,iii)+emin)
+ expfac=dexp(bsc(j,iabs(it))-0.5D0*contr(j,iii)+emin)
cd print *,'j=',j,' expfac=',expfac
escloc_i=escloc_i+expfac
do k=1,3
dersc12=0.0d0
do j=1,nlobit
- expfac=dexp(bsc(j,it)-0.5D0*contr(j)+emin)
+ expfac=dexp(bsc(j,iabs(it))-0.5D0*contr(j)+emin)
escloc_i=escloc_i+expfac
do k=1,2
dersc(k)=dersc(k)+Ax(k,j)*expfac
delta=0.02d0*pi
escloc=0.0D0
do i=loc_start,loc_end
- if (itype(i).eq.21) cycle
+ if (itype(i).eq.ntyp1) cycle
costtab(i+1) =dcos(theta(i+1))
sinttab(i+1) =dsqrt(1-costtab(i+1)*costtab(i+1))
cost2tab(i+1)=dsqrt(0.5d0*(1.0d0+costtab(i+1)))
cosfac=dsqrt(cosfac2)
sinfac2=0.5d0/(1.0d0-costtab(i+1))
sinfac=dsqrt(sinfac2)
- it=itype(i)
+ it=iabs(itype(i))
if (it.eq.10) goto 1
c
C Compute the axes of tghe local cartesian coordinates system; store in
do j = 1,3
xx = xx + x_prime(j)*dc_norm(j,i+nres)
yy = yy + y_prime(j)*dc_norm(j,i+nres)
- zz = zz + z_prime(j)*dc_norm(j,i+nres)
+ zz = zz + dsign(1.0,itype(i))*z_prime(j)*dc_norm(j,i+nres)
enddo
xxtab(i)=xx
C Compute the energy of the ith side cbain
C
c write (2,*) "xx",xx," yy",yy," zz",zz
- it=itype(i)
+ it=iabs(itype(i))
do j = 1,65
x(j) = sc_parmin(j,it)
enddo
Cc diagnostics - remove later
xx1 = dcos(alph(2))
yy1 = dsin(alph(2))*dcos(omeg(2))
- zz1 = -dsin(alph(2))*dsin(omeg(2))
+ zz1 = -dsign(1.0,itype(i))*dsin(alph(2))*dsin(omeg(2))
write(2,'(3f8.1,3f9.3,1x,3f9.3)')
& alph(2)*rad2deg,omeg(2)*rad2deg,theta(3)*rad2deg,xx,yy,zz,
& xx1,yy1,zz1
c lprn=.true.
etors=0.0D0
do i=iphi_start,iphi_end
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21
- & .or. itype(i).eq.21) cycle
+ if (itype(i-2).eq.ntyp1 .or. itype(i-1).eq.ntyp1
+ & .or. itype(i).eq.ntyp1) cycle
itori=itortyp(itype(i-2))
itori1=itortyp(itype(i-1))
phii=phi(i)
c lprn=.true.
etors=0.0D0
do i=iphi_start,iphi_end
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21
- & .or. itype(i).eq.21) cycle
+ if (itype(i-2).eq.ntyp1 .or. itype(i-1).eq.ntyp1
+ & .or. itype(i).eq.ntyp1) cycle
if (itel(i-2).eq.0 .or. itel(i-1).eq.0) goto 1215
+ if (iabs(itype(i)).eq.20) then
+ iblock=2
+ else
+ iblock=1
+ endif
itori=itortyp(itype(i-2))
itori1=itortyp(itype(i-1))
phii=phi(i)
gloci=0.0D0
C Regular cosine and sine terms
- do j=1,nterm(itori,itori1)
- v1ij=v1(j,itori,itori1)
- v2ij=v2(j,itori,itori1)
+ do j=1,nterm(itori,itori1,iblock)
+ v1ij=v1(j,itori,itori1,iblock)
+ v2ij=v2(j,itori,itori1,iblock)
cosphi=dcos(j*phii)
sinphi=dsin(j*phii)
etors=etors+v1ij*cosphi+v2ij*sinphi
C
cosphi=dcos(0.5d0*phii)
sinphi=dsin(0.5d0*phii)
- do j=1,nlor(itori,itori1)
+ do j=1,nlor(itori,itori1,iblock)
vl1ij=vlor1(j,itori,itori1)
vl2ij=vlor2(j,itori,itori1)
vl3ij=vlor3(j,itori,itori1)
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
pom=-pom*pom1*pom1
gloci=gloci+vl1ij*(vl3ij*cosphi-vl2ij*sinphi)*pom
enddo
C Subtract the constant term
- etors=etors-v0(itori,itori1)
+ etors=etors-v0(itori,itori1,iblock)
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,
- & (v1(j,itori,itori1),j=1,6),(v2(j,itori,itori1),j=1,6)
+ & (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)
1215 continue
c lprn=.true.
etors_d=0.0D0
do i=iphi_start,iphi_end-1
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21
- & .or. itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i-2).eq.ntyp1.or. itype(i-1).eq.ntyp1
+ & .or. itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
if (itel(i-2).eq.0 .or. itel(i-1).eq.0 .or. itel(i).eq.0)
& goto 1215
itori=itortyp(itype(i-2))
phii1=phi(i+1)
gloci1=0.0D0
gloci2=0.0D0
+ iblock=1
+ if (iabs(itype(i+1)).eq.20) iblock=2
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)
- v2cij=v1c(2,j,itori,itori1,itori2)
- v2sij=v1s(2,j,itori,itori1,itori2)
+ do j=1,ntermd_1(itori,itori1,itori2,iblock)
+ v1cij=v1c(1,j,itori,itori1,itori2,iblock)
+ v1sij=v1s(1,j,itori,itori1,itori2,iblock)
+ v2cij=v1c(2,j,itori,itori1,itori2,iblock)
+ v2sij=v1s(2,j,itori,itori1,itori2,iblock)
cosphi1=dcos(j*phii)
sinphi1=dsin(j*phii)
cosphi2=dcos(j*phii1)
gloci1=gloci1+j*(v1sij*cosphi1-v1cij*sinphi1)
gloci2=gloci2+j*(v2sij*cosphi2-v2cij*sinphi2)
enddo
- do k=2,ntermd_2(itori,itori1,itori2)
+ do k=2,ntermd_2(itori,itori1,itori2,iblock)
do l=1,k-1
- v1cdij = v2c(k,l,itori,itori1,itori2)
- v2cdij = v2c(l,k,itori,itori1,itori2)
- v1sdij = v2s(k,l,itori,itori1,itori2)
- v2sdij = v2s(l,k,itori,itori1,itori2)
+ v1cdij = v2c(k,l,itori,itori1,itori2,iblock)
+ v2cdij = v2c(l,k,itori,itori1,itori2,iblock)
+ v1sdij = v2s(k,l,itori,itori1,itori2,iblock)
+ v2sdij = v2s(l,k,itori,itori1,itori2,iblock)
cosphi1p2=dcos(l*phii+(k-l)*phii1)
cosphi1m2=dcos(l*phii-(k-l)*phii1)
sinphi1p2=dsin(l*phii+(k-l)*phii1)
gloci1=gloci1+l*(v1sdij*cosphi1p2+v2sdij*cosphi1m2
& -v1cdij*sinphi1p2-v2cdij*sinphi1m2)
gloci2=gloci2+(k-l)*(v1sdij*cosphi1p2-v2sdij*cosphi1m2
- & -v1cdij*sinphi1p2+v2cdij*sinphi1m2)
+ & -v1cdij*sinphi1p2+v2cdij*sinphi1m2)
enddo
enddo
gloc(i-3,icg)=gloc(i-3,icg)+wtor_d*fact2*gloci1
c lprn=.true.
c write (iout,*) "EBACK_SC_COR",iphi_start,iphi_end,nterm_sccor
esccor=0.0D0
- do i=iphi_start,iphi_end
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21) cycle
+ do i=itau_start,itau_end
+ if ((itype(i-2).eq.ntyp1).or.(itype(i-1).eq.ntyp1)) cycle
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)
+ 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)
- esccor=esccor+v1ij*cosphi+v2ij*sinphi
- gloci=gloci+j*(v2ij*cosphi-v1ij*sinphi)
- enddo
+ if (((intertyp.eq.3).and.((itype(i-2).eq.10).or.
+ & (itype(i-1).eq.10).or.(itype(i-2).eq.ntyp1).or.
+ & (itype(i-1).eq.ntyp1)))
+ & .or. ((intertyp.eq.1).and.((itype(i-2).eq.10)
+ & .or.(itype(i-2).eq.ntyp1).or.(itype(i-1).eq.ntyp1)
+ & .or.(itype(i).eq.ntyp1)))
+ & .or.((intertyp.eq.2).and.((itype(i-1).eq.10).or.
+ & (itype(i-1).eq.ntyp1).or.(itype(i-2).eq.ntyp1).or.
+ & (itype(i-3).eq.ntyp1)))) cycle
+ if ((intertyp.eq.2).and.(i.eq.4).and.(itype(1).eq.ntyp1)) cycle
+ if ((intertyp.eq.1).and.(i.eq.nres).and.(itype(nres).eq.ntyp1))
+ & 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
+c write (iout,*) "EBACK_SC_COR",i,v1ij*cosphi+v2ij*sinphi,intertyp,
+c & nterm_sccor(isccori,isccori1),isccori,isccori1
+c gloc_sc(intertyp,i-3,icg)=gloc_sc(intertyp,i-3,icg)+wsccor*gloci
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)
- gsccor_loc(i-3)=gloci
+ & (v1sccor(j,1,itori,itori1),j=1,6)
+ & ,(v2sccor(j,1,itori,itori1),j=1,6)
+c gsccor_loc(i-3)=gloci
+ enddo !intertyp
enddo
return
end
ires=0
do i=nnt,nct
iti=itype(i)
- if (iti.eq.21) then
+ if (iti.eq.ntyp1) then
ichain=ichain+1
ires=0
write (ipdb,'(a)') 'TER'
enddo
write (ipdb,'(a)') 'TER'
do i=nnt,nct-1
- if (itype(i).eq.21) cycle
- if (itype(i).eq.10 .and. itype(i+1).ne.21) then
+ if (itype(i).eq.ntyp1) cycle
+ if (itype(i).eq.10 .and. itype(i+1).ne.ntyp1) then
write (ipdb,30) ica(i),ica(i+1)
- else if (itype(i).ne.10 .and. itype(i+1).ne.21) then
+ else if (itype(i).ne.10 .and. itype(i+1).ne.ntyp1) then
write (ipdb,30) ica(i),ica(i+1),ica(i)+1
- else if (itype(i).ne.10 .and. itype(i+1).eq.21) then
+ else if (itype(i).ne.10 .and. itype(i+1).eq.ntyp1) then
write (ipdb,30) ica(i),ica(i)+1
endif
enddo
double precision a0thet,athet,bthet,polthet,gthet,theta0,sig0,
- & sigc0,dsc,dsc_inv,bsc,censc,gaussc,dsc0,vbl,vblinv,vblinv2,
- & vbl_cis,vbl0,vbld_inv
- integer nlob,loc_start,loc_end,ithet_start,ithet_end,
- & iphi_start,iphi_end
+ & sigc0,dsc,dsc_inv,bsc,censc,gaussc,dsc0
+ integer nlob
C Parameters of the virtual-bond-angle probability distribution
- common /thetas/ a0thet(ntyp),athet(2,ntyp),bthet(2,ntyp),
- & polthet(0:3,ntyp),gthet(3,ntyp),theta0(ntyp),sig0(ntyp),
- & sigc0(ntyp)
+ common /thetas/ a0thet(-ntyp:ntyp),athet(2,-ntyp:ntyp,-1:1,-1:1),
+ & bthet(2,-ntyp:ntyp,-1:1,-1:1),polthet(0:3,-ntyp:ntyp),
+ & gthet(3,-ntyp:ntyp),theta0(-ntyp:ntyp),sig0(-ntyp:ntyp),
+ & sigc0(-ntyp:ntyp)
+C Parameters of the side-chain probability distribution
+ common /sclocal/ dsc(ntyp1),dsc_inv(ntyp1),bsc(maxlob,ntyp),
+ & censc(3,maxlob,-ntyp:ntyp),gaussc(3,3,maxlob,-ntyp:ntyp),
+ &d sc0(ntyp1),
+ & nlob(ntyp1)
C Parameters of ab initio-derived potential of virtual-bond-angle bending
integer nthetyp,ntheterm,ntheterm2,ntheterm3,nsingle,ndouble,
& ithetyp(ntyp1),nntheterm
& ffthet,
& ggthet,ithetyp,nthetyp,ntheterm,ntheterm2,ntheterm3,nsingle,
& ndouble,nntheterm
-C Parameters of the side-chain probability distribution
- common /sclocal/ dsc(ntyp1),dsc_inv(ntyp1),bsc(maxlob,ntyp),
- & censc(3,maxlob,ntyp),gaussc(3,3,maxlob,ntyp),dsc0(ntyp1),
- & nlob(ntyp1)
C Virtual-bond lenghts
+ double precision vbl,vblinv,vblinv2,vbl_cis,vbl0,vbld_inv
+ integer loc_start,loc_end,ithet_start,ithet_end,iphi_start,
+ & iphi_end,iphid_start,iphid_end,ibond_start,ibond_end,
+ & ibondp_start,ibondp_end,ivec_start,ivec_end,iset_start,iset_end,
+ & iturn3_start,iturn3_end,iturn4_start,iturn4_end,iint_start,
+ & iint_end,iphi1_start,iphi1_end,itau_start,itau_end
common /peptbond/ vbl,vblinv,vblinv2,vbl_cis,vbl0
common /indices/ loc_start,loc_end,ithet_start,ithet_end,
- & iphi_start,iphi_end
+ & iphi_start,iphi_end,iphid_start,iphid_end,ibond_start,ibond_end,
+ & ibondp_start,ibondp_end,ivec_start,ivec_end,iset_start,iset_end,
+ & iturn3_start,iturn3_end,iturn4_start,iturn4_end,iint_start,
+ & iint_end,iphi1_start,iphi1_end,itau_start,itau_end
C Inverses of the actual virtual bond lengths
common /invlen/ vbld_inv(maxres2)
character*3 restyp
character*1 onelet
- common /names/ restyp(ntyp+1),onelet(ntyp+1)
+ common /names/ restyp(-ntyp1:ntyp1),
+ & onelet(-ntyp1:ntyp1)
character*10 ename,wname
integer nprint_ene,print_order
common /namterm/ ename(max_ene),wname(max_ene),nprint_ene,
-C Parameters of the SCCOR term
- double precision v1sccor,v2sccor
- integer nterm_sccor
- common/torsion/v1sccor(maxterm_sccor,20,20),
- & v2sccor(maxterm_sccor,20,20),
- & nterm_sccor
+cc Parameters of the SCCOR term
+ double precision v1sccor,v2sccor,vlor1sccor,
+ & vlor2sccor,vlor3sccor,gloc_sc,
+ & dcostau,dsintau,dtauangle,dcosomicron,
+ & domicron,v0sccor
+ integer nterm_sccor,isccortyp,nsccortyp,nlor_sccor
+ common /sccor/ v1sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp),
+ & v2sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp),
+ & v0sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & vlor1sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & vlor2sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & vlor3sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & gloc_sc(3,0:maxres2,10),
+ & dcostau(3,3,3,maxres2),dsintau(3,3,3,maxres2),
+ & dtauangle(3,3,3,maxres2),dcosomicron(3,3,3,maxres2),
+ & domicron(3,3,3,maxres2),
+ & nterm_sccor(-ntyp:ntyp,-ntyp:ntyp),isccortyp(-ntyp:ntyp),
+ & nsccortyp,
+ & nlor_sccor(-ntyp:ntyp,-ntyp:ntyp)
+
C Torsional constants of the rotation about virtual-bond dihedral angles
double precision v1,v2,vlor1,vlor2,vlor3,v0
integer itortyp,ntortyp,nterm,nlor,nterm_old
- common/torsion/v0(maxtor,maxtor),v1(maxterm,maxtor,maxtor),
- & v2(maxterm,maxtor,maxtor),vlor1(maxlor,maxtor,maxtor),
+ common/torsion/v0(-maxtor:maxtor,-maxtor:maxtor,2),
+ & v1(maxterm,-maxtor:maxtor,-maxtor:maxtor,2),
+ & v2(maxterm,-maxtor:maxtor,-maxtor:maxtor,2),
+ & vlor1(maxlor,-maxtor:maxtor,-maxtor:maxtor),
& vlor2(maxlor,maxtor,maxtor),vlor3(maxlor,maxtor,maxtor),
- & itortyp(ntyp),ntortyp,nterm(maxtor,maxtor),
- & nlor(maxtor,maxtor),nterm_old
+ & itortyp(-ntyp:ntyp),ntortyp,
+ & nterm(-maxtor:maxtor,-maxtor:maxtor,2),
+ & nlor(-maxtor:maxtor,-maxtor:maxtor,2)
+ & ,nterm_old
C 6/23/01 - constants for double torsionals
double precision v1c,v1s,v2c,v2s
integer ntermd_1,ntermd_2
- common /torsiond/ v1c(2,maxtermd_1,maxtor,maxtor,maxtor),
- & v1s(2,maxtermd_1,maxtor,maxtor,maxtor),
- & v2c(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor),
- & v2s(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor),
- & ntermd_1(maxtor,maxtor,maxtor),ntermd_2(maxtor,maxtor,maxtor)
+ common /torsiond/
+ &v1c(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ &v1s(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ &v2c(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2),
+ &v2s(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2),
+ & ntermd_1(-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ & ntermd_2(-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2)
C 9/18/99 - added Fourier coeffficients of the expansion of local energy
C surface
- double precision b1,b2,cc,dd,ee,ctilde,dtilde,b1tilde
+ double precision b1,b2,cc,dd,ee,ctilde,dtilde,b2tilde,b1tilde
integer nloctyp
- common/fourier/ b1(2,maxtor),b2(2,maxtor),cc(2,2,maxtor),
- & dd(2,2,maxtor),ee(2,2,maxtor),ctilde(2,2,maxtor),
- & dtilde(2,2,maxtor),b1tilde(2,maxtor),nloctyp
+ common/fourier/ b1(2,-maxtor:maxtor),b2(2,-maxtor:maxtor)
+ & ,cc(2,2,-maxtor:maxtor),
+ & dd(2,2,-maxtor:maxtor),ee(2,2,-maxtor:maxtor),
+ & ctilde(2,2,-maxtor:maxtor),
+ & dtilde(2,2,-maxtor:maxtor),b1tilde(2,-maxtor:maxtor),nloctyp
double precision b
- common /fourier1/ b(13,maxtor)
+ common /fourier1/ b(13,0:maxtor)
sigii(i)=0.0D0
rr0(i)=0.0D0
a0thet(i)=0.0D0
- do j=1,2
- athet(j,i)=0.0D0
- bthet(j,i)=0.0D0
+ do j=1,2
+ do ichir1=-1,1
+ do ichir2=-1,1
+ athet(j,i,ichir1,ichir2)=0.0D0
+ bthet(j,i,ichir1,ichir2)=0.0D0
+ enddo
+ enddo
enddo
do j=0,3
polthet(j,i)=0.0D0
enddo
nlob(ntyp1)=0
dsc(ntyp1)=0.0D0
- do i=1,maxtor
- itortyp(i)=0
- do j=1,maxtor
- do k=1,maxterm
- v1(k,j,i)=0.0D0
- v2(k,j,i)=0.0D0
+ do i=-maxtor,maxtor
+ itortyp(i)=0
+ do iblock=1,2
+ do j=-maxtor,maxtor
+ do k=1,maxterm
+ v1(k,j,i,iblock)=0.0D0
+ v2(k,j,i,iblock)=0.0D0
enddo
enddo
+ enddo
enddo
+ do iblock=1,2
+ do i=-maxtor,maxtor
+ do j=-maxtor,maxtor
+ do k=-maxtor,maxtor
+ do l=1,maxtermd_1
+ v1c(1,l,i,j,k,iblock)=0.0D0
+ v1s(1,l,i,j,k,iblock)=0.0D0
+ v1c(2,l,i,j,k,iblock)=0.0D0
+ v1s(2,l,i,j,k,iblock)=0.0D0
+ enddo !l
+ do l=1,maxtermd_2
+ do m=1,maxtermd_2
+ v2c(m,l,i,j,k,iblock)=0.0D0
+ v2s(m,l,i,j,k,iblock)=0.0D0
+ enddo !m
+ enddo !l
+ enddo !k
+ enddo !j
+ enddo !i
+ enddo !iblock
do i=1,maxres
itype(i)=0
itel(i)=0
include 'COMMON.WEIGHTS'
include 'COMMON.FFIELD'
data restyp /
+ &'DD' ,'DPR','DLY','DAR','DHI','DAS','DGL','DSG','DGN','DSN','DTH',
+ &'DYY','DAL','DTY','DTR','DVA','DLE','DIL','DPN','MED','DCY','ZER',
&'CYS','MET','PHE','ILE','LEU','VAL','TRP','TYR','ALA','GLY','THR',
&'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO','D'/
data onelet /
+ &'z','p','k','r','h','d','e','n','q','s','t','g',
+ &'a','y','w','v','l','i','f','m','c','x',
&'C','M','F','I','L','V','W','Y','A','G','T',
&'S','Q','N','E','D','H','R','K','P','X'/
data potname /'LJ','LJK','BP','GB','GBV'/
call int_bounds(nct-nnt-2,iphi_start,iphi_end)
iphi_start=iphi_start+nnt+2
iphi_end=iphi_end+nnt+2
+ call int_bounds(nres-3,itau_start,itau_end)
+ itau_start=itau_start+3
+ itau_end=itau_end+3
if (lprint) then
write (iout,*) 'Processor:',MyID,
& ' loc_start',loc_start,' loc_end',loc_end,
ithet_end=nres
iphi_start=nnt+3
iphi_end=nct
+ itau_start=4
+ itau_end=nres
#endif
return
end
enddo
be=0.0D0
if (i.gt.2) phi(i+1)=beta(i-2,i-1,i,i+1)
+ if (i.gt.2) tauangle(3,i+1)=beta(i+nres-1,i-1,i,i+nres)
+ if (i.gt.2) tauangle(1,i+1)=beta(i-1+nres,i-1,i,i+1)
+ if (i.gt.2) tauangle(2,i+1)=beta(i-2,i-1,i,i+nres)
omeg(i)=beta(nres+i,i,maxres2,i+1)
theta(i+1)=alpha(i-1,i,i+1)
alph(i)=alpha(nres+i,i,maxres2)
write (iout,'(20i4)') (itype(i),i=1,nres)
do i=1,nres-1
#ifdef PROCOR
- if (itype(i).eq.21 .or. itype(i+1).eq.21) then
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) then
#else
- if (itype(i).eq.21) then
+ if (itype(i).eq.ntyp1) then
#endif
itel(i)=0
#ifdef PROCOR
- else if (itype(i+1).ne.20) then
+ else if (iabs(itype(i+1)).ne.20) then
#else
- else if (itype(i).ne.20) then
+ else if (iabs(itype(i)).ne.20) then
#endif
itel(i)=1
else
nnt=1
nct=nres
- if (itype(1).eq.21) nnt=2
- if (itype(nres).eq.21) nct=nct-1
+ if (itype(1).eq.ntyp1) nnt=2
+ if (itype(nres).eq.ntyp1) nct=nct-1
write(iout,*) 'NNT=',NNT,' NCT=',NCT
call setup_var
call init_int_table
include 'COMMON.FREE'
character*1 t1,t2,t3
character*1 onelett(4) /"G","A","P","D"/
+ character*1 toronelet(-2:2) /"p","a","G","A","P"/
logical lprint
dimension blower(3,3,maxlob)
character*800 controlcard
call reads(controlcard,"TORDPAR",tordname_t,tordname)
open (itordp,file=tordname_t,status='old')
rewind(itordp)
- call reads(controlcard,"SCCORAR",sccorname_t,sccorname)
+ call reads(controlcard,"SCCORPAR",sccorname_t,sccorname)
open (isccor,file=sccorname_t,status='old')
rewind(isccor)
call reads(controlcard,"FOURIER",fouriername_t,fouriername)
C of the virtual-bond valence angles theta
C
do i=1,ntyp
- read (ithep,*) a0thet(i),(athet(j,i),j=1,2),(bthet(j,i),j=1,2)
+ read (ithep,*) a0thet(i),(athet(j,i,1,1),j=1,2),
+ & (bthet(j,i,1,1),j=1,2)
read (ithep,*) (polthet(j,i),j=0,3)
- read (ithep,*) (gthet(j,i),j=1,3)
- read (ithep,*) theta0(i),sig0(i),sigc0(i)
- sigc0(i)=sigc0(i)**2
+ read (ithep,*) (gthet(j,i),j=1,3)
+ read (ithep,*) theta0(i),sig0(i),sigc0(i)
+ sigc0(i)=sigc0(i)**2
+ enddo
+ do i=1,ntyp
+ athet(1,i,1,-1)=athet(1,i,1,1)
+ athet(2,i,1,-1)=athet(2,i,1,1)
+ bthet(1,i,1,-1)=-bthet(1,i,1,1)
+ bthet(2,i,1,-1)=-bthet(2,i,1,1)
+ athet(1,i,-1,1)=-athet(1,i,1,1)
+ athet(2,i,-1,1)=-athet(2,i,1,1)
+ bthet(1,i,-1,1)=bthet(1,i,1,1)
+ bthet(2,i,-1,1)=bthet(2,i,1,1)
+ enddo
+ do i=-ntyp,-1
+ a0thet(i)=a0thet(-i)
+ athet(1,i,-1,-1)=athet(1,-i,1,1)
+ athet(2,i,-1,-1)=-athet(2,-i,1,1)
+ bthet(1,i,-1,-1)=bthet(1,-i,1,1)
+ bthet(2,i,-1,-1)=-bthet(2,-i,1,1)
+ athet(1,i,-1,1)=athet(1,-i,1,1)
+ athet(2,i,-1,1)=-athet(2,-i,1,1)
+ bthet(1,i,-1,1)=-bthet(1,-i,1,1)
+ bthet(2,i,-1,1)=bthet(2,-i,1,1)
+ athet(1,i,1,-1)=-athet(1,-i,1,1)
+ athet(2,i,1,-1)=athet(2,-i,1,1)
+ bthet(1,i,1,-1)=bthet(1,-i,1,1)
+ bthet(2,i,1,-1)=-bthet(2,-i,1,1)
+ theta0(i)=theta0(-i)
+ sig0(i)=sig0(-i)
+ sigc0(i)=sigc0(-i)
+ do j=0,3
+ polthet(j,i)=polthet(j,-i)
+ enddo
+ do j=1,3
+ gthet(j,i)=gthet(j,-i)
+ enddo
enddo
close (ithep)
if (lprint) then
& ' b1*10^1 ',' b2*10^1 '
do i=1,ntyp
write(iout,'(a3,1h&,2x,5(f8.3,1h&))') restyp(i),
- & a0thet(i),(100*athet(j,i),j=1,2),(10*bthet(j,i),j=1,2)
+ & a0thet(i),(100*athet(j,i,1,1),j=1,2),
+ & (10*bthet(j,i,1,1),j=1,2)
enddo
write (iout,'(/a/9x,5a/79(1h-))')
& 'Parameters of the expression for sigma(theta_c):',
C of the side chains.
C
do i=1,ntyp
+cc write (iout,*) "tu dochodze",i
read (irotam,'(3x,i3,f8.3)') nlob(i),dsc(i)
if (i.eq.10) then
dsc_inv(i)=0.0D0
enddo
bsc(1,i)=0.0D0
read(irotam,*)(censc(k,1,i),k=1,3),((blower(k,l,1),l=1,k),k=1,3)
+ censc(1,1,-i)=censc(1,1,i)
+ censc(2,1,-i)=censc(2,1,i)
+ censc(3,1,-i)=-censc(3,1,i)
do j=2,nlob(i)
read (irotam,*) bsc(j,i)
read (irotam,*) (censc(k,j,i),k=1,3),
& ((blower(k,l,j),l=1,k),k=1,3)
+ censc(1,j,-i)=censc(1,j,i)
+ censc(2,j,-i)=censc(2,j,i)
+ censc(3,j,-i)=-censc(3,j,i)
+C BSC is amplitude of Gaussian
enddo
do j=1,nlob(i)
do k=1,3
enddo
gaussc(k,l,j,i)=akl
gaussc(l,k,j,i)=akl
+ if (((k.eq.3).and.(l.ne.3))
+ & .or.((l.eq.3).and.(k.ne.3))) then
+ gaussc(k,l,j,-i)=-akl
+ gaussc(l,k,j,-i)=-akl
+ else
+ gaussc(k,l,j,-i)=akl
+ gaussc(l,k,j,-i)=akl
+ endif
enddo
enddo
enddo
read (itorp,*) ntortyp
read (itorp,*) (itortyp(i),i=1,ntyp)
write (iout,*) 'ntortyp',ntortyp
- do i=1,ntortyp
- do j=1,ntortyp
- read (itorp,*) nterm(i,j),nlor(i,j)
+ do iblock=1,2
+ do i=-ntyp,-1
+ itortyp(i)=-itortyp(-i)
+ enddo
+c write (iout,*) 'ntortyp',ntortyp
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ read (itorp,*) nterm(i,j,iblock),
+ & nlor(i,j,iblock)
+ nterm(-i,-j,iblock)=nterm(i,j,iblock)
+ nlor(-i,-j,iblock)=nlor(i,j,iblock)
v0ij=0.0d0
si=-1.0d0
- do k=1,nterm(i,j)
- read (itorp,*) kk,v1(k,i,j),v2(k,i,j)
- v0ij=v0ij+si*v1(k,i,j)
+ do k=1,nterm(i,j,iblock)
+ read (itorp,*) kk,v1(k,i,j,iblock),
+ & v2(k,i,j,iblock)
+ v1(k,-i,-j,iblock)=v1(k,i,j,iblock)
+ v2(k,-i,-j,iblock)=-v2(k,i,j,iblock)
+ v0ij=v0ij+si*v1(k,i,j,iblock)
si=-si
- enddo
- do k=1,nlor(i,j)
- read (itorp,*) kk,vlor1(k,i,j),vlor2(k,i,j),vlor3(k,i,j)
+ enddo
+ do k=1,nlor(i,j,iblock)
+ read (itorp,*) kk,vlor1(k,i,j),
+ & vlor2(k,i,j),vlor3(k,i,j)
v0ij=v0ij+vlor1(k,i,j)/(1+vlor3(k,i,j)**2)
enddo
- v0(i,j)=v0ij
+ v0(i,j,iblock)=v0ij
+ v0(-i,-j,iblock)=v0ij
enddo
enddo
+ enddo
close (itorp)
if (lprint) then
- write (iout,'(/a/)') 'Torsional constants:'
- do i=1,ntortyp
- do j=1,ntortyp
+ write (iout,'(/a/)') 'Torsional constants:'
+ do i=1,ntortyp
+ do j=1,ntortyp
write (iout,*) 'ityp',i,' jtyp',j
write (iout,*) 'Fourier constants'
- do k=1,nterm(i,j)
- write (iout,'(2(1pe15.5))') v1(k,i,j),v2(k,i,j)
+ do k=1,nterm(i,j,iblock)
+ write (iout,'(2(1pe15.5))') v1(k,i,j,iblock),
+ & v2(k,i,j,iblock)
enddo
write (iout,*) 'Lorenz constants'
- do k=1,nlor(i,j)
- write (iout,'(3(1pe15.5))')
+ do k=1,nlor(i,j,iblock)
+ write (iout,'(3(1pe15.5))')
& vlor1(k,i,j),vlor2(k,i,j),vlor3(k,i,j)
enddo
enddo
C
C 6/23/01 Read parameters for double torsionals
C
- do i=1,ntortyp
- do j=1,ntortyp
- do k=1,ntortyp
+ do iblock=1,2
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ do k=-ntortyp+1,ntortyp-1
read (itordp,'(3a1)') t1,t2,t3
- if (t1.ne.onelett(i) .or. t2.ne.onelett(j)
- & .or. t3.ne.onelett(k)) then
+c write (iout,*) "OK onelett",
+c & i,j,k,t1,t2,t3
+
+ if (t1.ne.toronelet(i) .or. t2.ne.toronelet(j)
+ & .or. t3.ne.toronelet(k)) then
write (iout,*) "Error in double torsional parameter file",
& i,j,k,t1,t2,t3
+#ifdef MPI
+ call MPI_Finalize(Ierror)
+#endif
stop "Error in double torsional parameter file"
endif
- read (itordp,*) ntermd_1(i,j,k),ntermd_2(i,j,k)
- read (itordp,*) (v1c(1,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) (v1s(1,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) (v1c(2,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) (v1s(2,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) ((v2c(l,m,i,j,k),v2c(m,l,i,j,k),
- & v2s(l,m,i,j,k),v2s(m,l,i,j,k),m=1,l-1),l=1,ntermd_2(i,j,k))
- enddo
- enddo
- enddo
+ read (itordp,*) ntermd_1(i,j,k,iblock),
+ & ntermd_2(i,j,k,iblock)
+ ntermd_1(-i,-j,-k,iblock)=ntermd_1(i,j,k,iblock)
+ ntermd_2(-i,-j,-k,iblock)=ntermd_2(i,j,k,iblock)
+ read (itordp,*) (v1c(1,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*) (v1s(1,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*) (v1c(2,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*) (v1s(2,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+C Martix of D parameters for one dimesional foureir series
+ do l=1,ntermd_1(i,j,k,iblock)
+ v1c(1,l,-i,-j,-k,iblock)=v1c(1,l,i,j,k,iblock)
+ v1s(1,l,-i,-j,-k,iblock)=-v1s(1,l,i,j,k,iblock)
+ v1c(2,l,-i,-j,-k,iblock)=v1c(2,l,i,j,k,iblock)
+ v1s(2,l,-i,-j,-k,iblock)=-v1s(2,l,i,j,k,iblock)
+c write(iout,*) "whcodze" ,
+c & v1s(2,l,-i,-j,-k,iblock),v1s(2,l,i,j,k,iblock)
+ enddo
+ read (itordp,*) ((v2c(l,m,i,j,k,iblock),
+ & v2c(m,l,i,j,k,iblock),v2s(l,m,i,j,k,iblock),
+ & v2s(m,l,i,j,k,iblock),
+ & m=1,l-1),l=1,ntermd_2(i,j,k,iblock))
+C Martix of D parameters for two dimesional fourier series
+ do l=1,ntermd_2(i,j,k,iblock)
+ do m=1,l-1
+ v2c(l,m,-i,-j,-k,iblock)=v2c(l,m,i,j,k,iblock)
+ v2c(m,l,-i,-j,-k,iblock)=v2c(m,l,i,j,k,iblock)
+ v2s(l,m,-i,-j,-k,iblock)=-v2s(l,m,i,j,k,iblock)
+ v2s(m,l,-i,-j,-k,iblock)=-v2s(m,l,i,j,k,iblock)
+ enddo!m
+ enddo!l
+ enddo!k
+ enddo!j
+ enddo!i
+ enddo!iblock
if (lprint) then
- write (iout,*)
+ write (iout,*)
write (iout,*) 'Constants for double torsionals'
- do i=1,ntortyp
- do j=1,ntortyp
- do k=1,ntortyp
+ do iblock=1,2
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ do k=-ntortyp+1,ntortyp-1
write (iout,*) 'ityp',i,' jtyp',j,' ktyp',k,
- & ' nsingle',ntermd_1(i,j,k),' ndouble',ntermd_2(i,j,k)
+ & ' nsingle',ntermd_1(i,j,k,iblock),
+ & ' ndouble',ntermd_2(i,j,k,iblock)
write (iout,*)
write (iout,*) 'Single angles:'
- do l=1,ntermd_1(i,j,k)
- write (iout,'(i5,2f10.5,5x,2f10.5)') l,
- & v1c(1,l,i,j,k),v1s(1,l,i,j,k),
- & v1c(2,l,i,j,k),v1s(2,l,i,j,k)
+ do l=1,ntermd_1(i,j,k,iblock)
+ write (iout,'(i5,2f10.5,5x,2f10.5,5x,2f10.5)') l,
+ & v1c(1,l,i,j,k,iblock),v1s(1,l,i,j,k,iblock),
+ & v1c(2,l,i,j,k,iblock),v1s(2,l,i,j,k,iblock),
+ & v1s(1,l,-i,-j,-k,iblock),v1s(2,l,-i,-j,-k,iblock)
enddo
write (iout,*)
write (iout,*) 'Pairs of angles:'
- write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k))
- do l=1,ntermd_2(i,j,k)
- write (iout,'(i5,20f10.5)')
- & l,(v2c(l,m,i,j,k),m=1,ntermd_2(i,j,k))
+ write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k,iblock))
+ do l=1,ntermd_2(i,j,k,iblock)
+ write (iout,'(i5,20f10.5)')
+ & l,(v2c(l,m,i,j,k,iblock),m=1,ntermd_2(i,j,k,iblock))
enddo
write (iout,*)
- write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k))
- do l=1,ntermd_2(i,j,k)
- write (iout,'(i5,20f10.5)')
- & l,(v2s(l,m,i,j,k),m=1,ntermd_2(i,j,k))
+ write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k,iblock))
+ do l=1,ntermd_2(i,j,k,iblock)
+ write (iout,'(i5,20f10.5)')
+ & l,(v2s(l,m,i,j,k,iblock),m=1,ntermd_2(i,j,k,iblock)),
+ & (v2s(l,m,-i,-j,-k,iblock),m=1,ntermd_2(i,j,k,iblock))
enddo
write (iout,*)
enddo
enddo
enddo
+ enddo
endif
#endif
+C Read of Side-chain backbone correlation parameters
+C Modified 11 May 2012 by Adasko
+CCC
C
-C 5/21/07 (AL) Read coefficients of the backbone-local sidechain-local
-C correlation energies.
-C
- read (isccor,*) nterm_sccor
- do i=1,20
- do j=1,20
- read (isccor,'(a)')
- do k=1,nterm_sccor
- read (isccor,*)
- & kk,v1sccor(k,i,j),v2sccor(k,i,j)
+ read (isccor,*) nsccortyp
+ read (isccor,*) (isccortyp(i),i=1,ntyp)
+ do i=-ntyp,-1
+ isccortyp(i)=-isccortyp(-i)
+ enddo
+ iscprol=isccortyp(20)
+c write (iout,*) 'ntortyp',ntortyp
+ maxinter=3
+cc maxinter is maximum interaction sites
+ do l=1,maxinter
+ do i=1,nsccortyp
+ do j=1,nsccortyp
+ read (isccor,*)
+ &nterm_sccor(i,j),nlor_sccor(i,j)
+ write (iout,*) nterm_sccor(i,j)
+ v0ijsccor=0.0d0
+ v0ijsccor1=0.0d0
+ v0ijsccor2=0.0d0
+ v0ijsccor3=0.0d0
+ si=-1.0d0
+ nterm_sccor(-i,j)=nterm_sccor(i,j)
+ nterm_sccor(-i,-j)=nterm_sccor(i,j)
+ nterm_sccor(i,-j)=nterm_sccor(i,j)
+ write (iout,*) nterm_sccor(i,j),nterm_sccor(-i,j),
+ & nterm_sccor(-i,-j),nterm_sccor(i,-j)
+ do k=1,nterm_sccor(i,j)
+ read (isccor,*) kk,v1sccor(k,l,i,j)
+ & ,v2sccor(k,l,i,j)
+ if (j.eq.iscprol) then
+ if (i.eq.isccortyp(10)) then
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ else
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)*0.5d0
+ & +v2sccor(k,l,i,j)*dsqrt(0.75d0)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)*0.5d0
+ & +v1sccor(k,l,i,j)*dsqrt(0.75d0)
+ v1sccor(k,l,-i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,-j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,-j)
+ endif
+ else
+ if (i.eq.isccortyp(10)) then
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ else
+ if (j.eq.isccortyp(10)) then
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,j)
+ else
+ v1sccor(k,l,i,-j)=-v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,-j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,-j)
+ endif
+ endif
+ endif
+ v0ijsccor=v0ijsccor+si*v1sccor(k,l,i,j)
+ v0ijsccor1=v0ijsccor+si*v1sccor(k,l,-i,j)
+ v0ijsccor2=v0ijsccor+si*v1sccor(k,l,i,-j)
+ v0ijsccor3=v0ijsccor+si*v1sccor(k,l,-i,-j)
+ si=-si
+ enddo
+ do k=1,nlor_sccor(i,j)
+ read (isccor,*) kk,vlor1sccor(k,i,j),
+ & vlor2sccor(k,i,j),vlor3sccor(k,i,j)
+ v0ijsccor=v0ijsccor+vlor1sccor(k,i,j)/
+ &(1+vlor3sccor(k,i,j)**2)
+ enddo
+ v0sccor(l,i,j)=v0ijsccor
+ v0sccor(l,-i,j)=v0ijsccor1
+ v0sccor(l,i,-j)=v0ijsccor2
+ v0sccor(l,-i,-j)=v0ijsccor3
enddo
enddo
enddo
close (isccor)
if (lprint) then
write (iout,'(/a/)') 'Torsional constants of SCCORR:'
- do i=1,20
- do j=1,20
+ do i=1,nsccortyp
+ do j=1,nsccortyp
write (iout,*) 'ityp',i,' jtyp',j
- do k=1,nterm_sccor
- write (iout,'(2(1pe15.5))') v1sccor(k,i,j),v2sccor(k,i,j)
+ write (iout,*) 'Fourier constants'
+ do k=1,nterm_sccor(i,j)
+ write (iout,'(2(1pe15.5))')
+ & v1sccor(k,l,i,j),v2sccor(k,l,i,j)
+ enddo
+ write (iout,*) 'Lorenz constants'
+ do k=1,nlor_sccor(i,j)
+ write (iout,'(3(1pe15.5))')
+ & vlor1sccor(k,i,j),vlor2sccor(k,i,j),vlor3sccor(k,i,j)
enddo
enddo
enddo
C interaction energy of the Gly, Ala, and Pro prototypes.
C
read (ifourier,*) nloctyp
- do i=1,nloctyp
+ do i=0,nloctyp-1
read (ifourier,*)
read (ifourier,*) (b(ii,i),ii=1,13)
if (lprint) then
endif
B1(1,i) = b(3,i)
B1(2,i) = b(5,i)
+ B1(1,-i) = b(3,i)
+ B1(2,-i) = -b(5,i)
+c b1(1,i)=0.0d0
+c b1(2,i)=0.0d0
B1tilde(1,i) = b(3,i)
- B1tilde(2,i) =-b(5,i)
+ B1tilde(2,i) =-b(5,i)
+ B1tilde(1,-i) =-b(3,i)
+ B1tilde(2,-i) =b(5,i)
+c b1tilde(1,i)=0.0d0
+c b1tilde(2,i)=0.0d0
B2(1,i) = b(2,i)
B2(2,i) = b(4,i)
+ B2(1,-i) =b(2,i)
+ B2(2,-i) =-b(4,i)
+
+c b2(1,i)=0.0d0
+c b2(2,i)=0.0d0
CC(1,1,i)= b(7,i)
CC(2,2,i)=-b(7,i)
CC(2,1,i)= b(9,i)
CC(1,2,i)= b(9,i)
+ CC(1,1,-i)= b(7,i)
+ CC(2,2,-i)=-b(7,i)
+ CC(2,1,-i)=-b(9,i)
+ CC(1,2,-i)=-b(9,i)
+c CC(1,1,i)=0.0d0
+c CC(2,2,i)=0.0d0
+c CC(2,1,i)=0.0d0
+c CC(1,2,i)=0.0d0
Ctilde(1,1,i)=b(7,i)
Ctilde(1,2,i)=b(9,i)
Ctilde(2,1,i)=-b(9,i)
Ctilde(2,2,i)=b(7,i)
+ Ctilde(1,1,-i)=b(7,i)
+ Ctilde(1,2,-i)=-b(9,i)
+ Ctilde(2,1,-i)=b(9,i)
+ Ctilde(2,2,-i)=b(7,i)
+
+c Ctilde(1,1,i)=0.0d0
+c Ctilde(1,2,i)=0.0d0
+c Ctilde(2,1,i)=0.0d0
+c Ctilde(2,2,i)=0.0d0
DD(1,1,i)= b(6,i)
DD(2,2,i)=-b(6,i)
DD(2,1,i)= b(8,i)
DD(1,2,i)= b(8,i)
+ DD(1,1,-i)= b(6,i)
+ DD(2,2,-i)=-b(6,i)
+ DD(2,1,-i)=-b(8,i)
+ DD(1,2,-i)=-b(8,i)
+c DD(1,1,i)=0.0d0
+c DD(2,2,i)=0.0d0
+c DD(2,1,i)=0.0d0
+c DD(1,2,i)=0.0d0
Dtilde(1,1,i)=b(6,i)
Dtilde(1,2,i)=b(8,i)
Dtilde(2,1,i)=-b(8,i)
Dtilde(2,2,i)=b(6,i)
+ Dtilde(1,1,-i)=b(6,i)
+ Dtilde(1,2,-i)=-b(8,i)
+ Dtilde(2,1,-i)=b(8,i)
+ Dtilde(2,2,-i)=b(6,i)
+
+c Dtilde(1,1,i)=0.0d0
+c Dtilde(1,2,i)=0.0d0
+c Dtilde(2,1,i)=0.0d0
+c Dtilde(2,2,i)=0.0d0
EE(1,1,i)= b(10,i)+b(11,i)
EE(2,2,i)=-b(10,i)+b(11,i)
EE(2,1,i)= b(12,i)-b(13,i)
EE(1,2,i)= b(12,i)+b(13,i)
+ EE(1,1,-i)= b(10,i)+b(11,i)
+ EE(2,2,-i)=-b(10,i)+b(11,i)
+ EE(2,1,-i)=-b(12,i)+b(13,i)
+ EE(1,2,-i)=-b(12,i)-b(13,i)
+
+c ee(1,1,i)=1.0d0
+c ee(2,2,i)=1.0d0
+c ee(2,1,i)=0.0d0
+c ee(1,2,i)=0.0d0
+c ee(2,1,i)=ee(1,2,i)
+
enddo
if (lprint) then
do i=1,nloctyp
enddo
close (isidep1)
do i=1,ntyp1
- if (i.eq.10 .or. i.eq.21) then
+ if (i.eq.10 .or. i.eq.ntyp1) then
dsc_inv(i)=0.0d0
else
dsc_inv(i)=1.0d0/dsc(i)
else if (card(:3).eq.'TER') then
C End current chain
ires_old=ires+1
- itype(ires_old)=21
+ itype(ires_old)=ntyp1
ibeg=2
c write (iout,*) "Chain ended",ires,ishift,ires_old
call sccenter(ires,iii,sccor)
ishift=ires-1
if (res.ne.'GLY' .and. res.ne. 'ACE') then
ishift=ishift-1
- itype(1)=21
+ itype(1)=ntyp1
endif
c write (iout,*) "ires",ires," ibeg",ibeg," ishift",ishift
ibeg=0
nres=ires
do i=2,nres-1
c write (iout,*) i,itype(i)
- if (itype(i).eq.21) then
+ if (itype(i).eq.ntyp1) then
c write (iout,*) "dummy",i,itype(i)
do j=1,3
c(j,i)=((c(j,i-1)+c(j,i+1))/2+2*c(j,i-1)-c(j,i-2))/2
nstart_sup=1
if (itype(nres).ne.10) then
nres=nres+1
- itype(nres)=21
+ itype(nres)=ntyp1
do j=1,3
dcj=c(j,nres-2)-c(j,nres-3)
c(j,nres)=c(j,nres-1)+dcj
c(j,nres+1)=c(j,1)
c(j,2*nres)=c(j,nres)
enddo
- if (itype(1).eq.21) then
+ if (itype(1).eq.ntyp1) then
nsup=nsup-1
nstart_sup=2
do j=1,3
lll=lll+1
cc write (iout,*) "spraw lancuchy",(c(j,i),j=1,3)
if (i.gt.1) then
- if (itype(i-1).eq.21) then
+ if (itype(i-1).eq.ntyp1) then
chain_length=lll-1
kkk=kkk+1
c write (iout,*) "spraw lancuchy",(c(j,i),j=1,3)
do i=2,nres
iti=itype(i)
write (iout,*) i,i-1,(c(j,i),j=1,3),(c(j,i-1),j=1,3),dist(i,i-1)
- if (itype(i-1).ne.21 .and. itype(i).ne.21 .and.
+ if (itype(i-1).ne.ntyp1 .and. itype(i).ne.ntyp1 .and.
& (dist(i,i-1).lt.2.0D0 .or. dist(i,i-1).gt.5.0D0)) then
write (iout,'(a,i4)') 'Bad Cartesians for residue',i
stop
theta(i+1)=alpha(i-1,i,i+1)
if (i.gt.2) phi(i+1)=beta(i-2,i-1,i,i+1)
enddo
- if (itype(1).eq.21) then
+ if (itype(1).eq.ntyp1) then
do j=1,3
c(j,1)=c(j,2)+(c(j,3)-c(j,4))
enddo
endif
- if (itype(nres).eq.21) then
+ if (itype(nres).eq.ntyp1) then
do j=1,3
c(j,nres)=c(j,nres-1)+(c(j,nres-2)-c(j,nres-3))
enddo
if (itype.eq.0) then
- do i=1,ntyp1
+ do i=-ntyp1,ntyp1
if (ucase(nam).eq.restyp(i)) then
rescode=i
return
else
- do i=1,ntyp1
+ do i=-ntyp1,ntyp1
if (nam(1:1).eq.onelet(i)) then
rescode=i
return
do kkk=1,nperm
nnsup=0
do i=1,nres
- if (itype(i).ne.21) then
+ if (itype(i).ne.ntyp1) then
nnsup=nnsup+1
do j=1,3
cc(j,nnsup)=c(j,i)
- subroutine store_parm(iparm)
+ subroutine store_parm(iparm)
C
C Store parameters of set IPARM
C valence angles and the side chains and energy parameters.
include 'COMMON.SCROT'
include 'COMMON.SCCOR'
include 'COMMON.ALLPARM'
- integer i,j,k,l,m,mm,iparm
+ integer i,j,k,l,m,mm,iparm,ichir1,ichir2,iblock,iii
c Store weights
ww_all(1,iparm)=wsc
enddo
c Store bond angle parameters
#ifdef CRYST_THETA
- do i=1,ntyp
+ do i=-ntyp,ntyp
a0thet_all(i,iparm)=a0thet(i)
+ do ichir1=-1,1
+ do ichir2=-1,1
do j=1,2
- athet_all(j,i,iparm)=athet(j,i)
- bthet_all(j,i,iparm)=bthet(j,i)
+ athet_all(j,i,ichir1,ichir2,iparm)=athet(j,i,ichir1,ichir2)
+ bthet_all(j,i,ichir1,ichir2,iparm)=bthet(j,i,ichir1,ichir2)
+ enddo
+ enddo
enddo
do j=0,3
polthet_all(j,i,iparm)=polthet(j,i)
#endif
#ifdef CRYST_SC
c Store the sidechain rotamer parameters
- do i=1,ntyp
- nlob_all(i,iparm)=nlob(i)
- do j=1,nlob(i)
- bsc_all(j,i,iparm)=bsc(j,i)
+ do i=-ntyp,ntyp
+ iii=iabs(i)
+cc write (iout,*) i,"storeparm1"
+ if (i.eq.0) cycle
+ nlob_all(iii,iparm)=nlob(iii)
+ do j=1,nlob(iii)
+ bsc_all(j,iii,iparm)=bsc(j,iii)
do k=1,3
censc_all(k,j,i,iparm)=censc(k,j,i)
enddo
enddo
#endif
c Store the torsional parameters
- do i=1,ntortyp
- do j=1,ntortyp
- v0_all(i,j,iparm)=v0(i,j)
- nterm_all(i,j,iparm)=nterm(i,j)
- nlor_all(i,j,iparm)=nlor(i,j)
- do k=1,nterm(i,j)
- v1_all(k,i,j,iparm)=v1(k,i,j)
- v2_all(k,i,j,iparm)=v2(i,i,j)
+ do iblock=1,2
+ do i=-ntortyp+1,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ v0_all(i,j,iblock,iparm)=v0(i,j,iblock)
+ nterm_all(i,j,iblock,iparm)=nterm(i,j,iblock)
+ nlor_all(i,j,iblock,iparm)=nlor(i,j,iblock)
+ do k=1,nterm(i,j,iblock)
+ v1_all(k,i,j,iblock,iparm)=v1(k,i,j,iblock)
+ v2_all(k,i,j,iblock,iparm)=v2(k,i,j,iblock)
enddo
- do k=1,nlor(i,j)
+ do k=1,nlor(i,j,iblock)
vlor1_all(k,i,j,iparm)=vlor1(k,i,j)
vlor2_all(k,i,j,iparm)=vlor2(k,i,j)
vlor3_all(k,i,j,iparm)=vlor3(k,i,j)
enddo
enddo
+ enddo
enddo
c Store the double torsional parameters
- do i=1,ntortyp
- do j=1,ntortyp
- do k=1,ntortyp
- ntermd1_all(i,j,k,iparm)=ntermd_1(i,j,k)
- ntermd2_all(i,j,k,iparm)=ntermd_2(i,j,k)
- do l=1,ntermd_1(i,j,k)
- v1c_all(1,l,i,j,k,iparm)=v1c(1,l,i,j,k)
- v1c_all(2,l,i,j,k,iparm)=v1c(2,l,i,j,k)
- v2c_all(1,l,i,j,k,iparm)=v2c(1,l,i,j,k)
- v2c_all(2,l,i,j,k,iparm)=v2c(2,l,i,j,k)
+ do iblock=1,2
+ do i=-ntortyp+1,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ do k=-ntortyp+1,ntortyp-1
+ ntermd1_all(i,j,k,iblock,iparm)=ntermd_1(i,j,k,iblock)
+ ntermd2_all(i,j,k,iblock,iparm)=ntermd_2(i,j,k,iblock)
+ do l=1,ntermd_1(i,j,k,iblock)
+ v1c_all(1,l,i,j,k,iblock,iparm)=v1c(1,l,i,j,k,iblock)
+ v1c_all(2,l,i,j,k,iblock,iparm)=v1c(2,l,i,j,k,iblock)
+ v2c_all(1,l,i,j,k,iblock,iparm)=v2c(1,l,i,j,k,iblock)
+ v2c_all(2,l,i,j,k,iblock,iparm)=v2c(2,l,i,j,k,iblock)
enddo
- do l=1,ntermd_2(i,j,k)
- do m=1,ntermd_2(i,j,k)
- v2s_all(l,m,i,j,k,iparm)=v2s(l,m,i,j,k)
+ do l=1,ntermd_2(i,j,k,iblock)
+ do m=1,ntermd_2(i,j,k,iblock)
+ v2s_all(l,m,i,j,k,iblock,iparm)=v2s(l,m,i,j,k,iblock)
enddo
enddo
enddo
enddo
enddo
+ enddo
c Store parameters of the cumulants
- do i=1,nloctyp
+ do i=-nloctyp,nloctyp
do j=1,2
b1_all(j,i,iparm)=b1(j,i)
b1tilde_all(j,i,iparm)=b1tilde(j,i)
v2ss_all(iparm)=v2ss
v3ss_all(iparm)=v3ss
c Store SC-backbone correlation parameters
- nterm_sccor_all(iparm)=nterm_sccor
- do i=1,20
- do j=1,20
- do k=1,nterm_sccor
- v1sccor_all(k,i,j,iparm)=v1sccor(k,i,j)
- v2sccor_all(k,i,j,iparm)=v2sccor(k,i,j)
+ do i=-nsccortyp,nsccortyp
+ do j=-nsccortyp,nsccortyp
+
+ nterm_sccor_all(j,i,iparm)=nterm_sccor(j,i)
+c do i=1,20
+c do j=1,20
+ do l=1,3
+ do k=1,nterm_sccor(j,i)
+ v1sccor_all(k,l,j,i,iparm)=v1sccor(k,l,j,i)
+ v2sccor_all(k,l,j,i,iparm)=v2sccor(k,l,j,i)
+ enddo
enddo
enddo
enddo
include 'COMMON.SCROT'
include 'COMMON.SCCOR'
include 'COMMON.ALLPARM'
- integer i,j,k,l,m,mm,iparm
+ integer i,j,k,l,m,mm,iparm,ichir1,ichir2,iblock,iii
c Restore weights
wsc=ww_all(1,iparm)
enddo
c Restore bond angle parameters
#ifdef CRYST_THETA
- do i=1,ntyp
+ do i=-ntyp,ntyp
a0thet(i)=a0thet_all(i,iparm)
+ do ichir1=-1,1
+ do ichir2=-1,1
do j=1,2
- athet(j,i)=athet_all(j,i,iparm)
- bthet(j,i)=bthet_all(j,i,iparm)
+ athet(j,i,ichir1,ichir2)=athet_all(j,i,ichir1,ichir2,iparm)
+ bthet(j,i,ichir1,ichir2)=bthet_all(j,i,ichir1,ichir2,iparm)
+ enddo
+ enddo
enddo
do j=0,3
polthet(j,i)=polthet_all(j,i,iparm)
#endif
c Restore the sidechain rotamer parameters
#ifdef CRYST_SC
- do i=1,ntyp
- nlob(i)=nlob_all(i,iparm)
- do j=1,nlob(i)
- bsc(j,i)=bsc_all(j,i,iparm)
+ do i=-ntyp,ntyp
+ if (i.eq.0) cycle
+ iii=iabs(i)
+ nlob(iii)=nlob_all(iii,iparm)
+ do j=1,nlob(iii)
+ bsc(j,iii)=bsc_all(j,iii,iparm)
do k=1,3
censc(k,j,i)=censc_all(k,j,i,iparm)
enddo
enddo
#endif
c Restore the torsional parameters
- do i=1,ntortyp
- do j=1,ntortyp
- v0(i,j)=v0_all(i,j,iparm)
- nterm(i,j)=nterm_all(i,j,iparm)
- nlor(i,j)=nlor_all(i,j,iparm)
- do k=1,nterm(i,j)
- v1(k,i,j)=v1_all(k,i,j,iparm)
- v2(i,i,j)=v2_all(k,i,j,iparm)
+ do iblock=1,2
+ do i=-ntortyp+1,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ v0(i,j,iblock)=v0_all(i,j,iblock,iparm)
+ nterm(i,j,iblock)=nterm_all(i,j,iblock,iparm)
+ nlor(i,j,iblock)=nlor_all(i,j,iblock,iparm)
+ do k=1,nterm(i,j,iblock)
+ v1(k,i,j,iblock)=v1_all(k,i,j,iblock,iparm)
+ v2(k,i,j,iblock)=v2_all(k,i,j,iblock,iparm)
enddo
- do k=1,nlor(i,j)
+ do k=1,nlor(i,j,iblock)
vlor1(k,i,j)=vlor1_all(k,i,j,iparm)
vlor2(k,i,j)=vlor2_all(k,i,j,iparm)
vlor3(k,i,j)=vlor3_all(k,i,j,iparm)
enddo
enddo
enddo
+ enddo
c Restore the double torsional parameters
- do i=1,ntortyp
- do j=1,ntortyp
- do k=1,ntortyp
- ntermd_1(i,j,k)=ntermd1_all(i,j,k,iparm)
- ntermd_2(i,j,k)=ntermd2_all(i,j,k,iparm)
- do l=1,ntermd_1(i,j,k)
- v1c(1,l,i,j,k)=v1c_all(1,l,i,j,k,iparm)
- v1c(2,l,i,j,k)=v1c_all(2,l,i,j,k,iparm)
- v2c(1,l,i,j,k)=v2c_all(1,l,i,j,k,iparm)
- v2c(2,l,i,j,k)=v2c_all(2,l,i,j,k,iparm)
+ do iblock=1,2
+ do i=-ntortyp+1,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ do k=-ntortyp+1,ntortyp-1
+ ntermd_1(i,j,k,iblock)=ntermd1_all(i,j,k,iblock,iparm)
+ ntermd_2(i,j,k,iblock)=ntermd2_all(i,j,k,iblock,iparm)
+ do l=1,ntermd_1(i,j,k,iblock)
+ v1c(1,l,i,j,k,iblock)=v1c_all(1,l,i,j,k,iblock,iparm)
+ v1c(2,l,i,j,k,iblock)=v1c_all(2,l,i,j,k,iblock,iparm)
+ v2c(1,l,i,j,k,iblock)=v2c_all(1,l,i,j,k,iblock,iparm)
+ v2c(2,l,i,j,k,iblock)=v2c_all(2,l,i,j,k,iblock,iparm)
enddo
- do l=1,ntermd_2(i,j,k)
- do m=1,ntermd_2(i,j,k)
- v2s(l,m,i,j,k)=v2s_all(l,m,i,j,k,iparm)
+ do l=1,ntermd_2(i,j,k,iblock)
+ do m=1,ntermd_2(i,j,k,iblock)
+ v2s(l,m,i,j,k,iblock)=v2s_all(l,m,i,j,k,iblock,iparm)
enddo
enddo
enddo
enddo
enddo
+ enddo
c Restore parameters of the cumulants
- do i=1,nloctyp
+ do i=-nloctyp,nloctyp
do j=1,2
b1(j,i)=b1_all(j,i,iparm)
b1tilde(j,i)=b1tilde_all(j,i,iparm)
v2ss=v2ss_all(iparm)
v3ss=v3ss_all(iparm)
c Restore SC-backbone correlation parameters
- nterm_sccor=nterm_sccor_all(iparm)
- do i=1,20
- do j=1,20
- do k=1,nterm_sccor
- v1sccor(k,i,j)=v1sccor_all(k,i,j,iparm)
- v2sccor(k,i,j)=v2sccor_all(k,i,j,iparm)
+ do i=-nsccortyp,nsccortyp
+ do j=-nsccortyp,nsccortyp
+
+ nterm_sccor(j,i)=nterm_sccor_all(j,i,iparm)
+ do l=1,3
+ do k=1,nterm_sccor(j,i)
+ v1sccor(k,l,j,i)=v1sccor_all(k,l,j,i,iparm)
+ v2sccor(k,l,j,i)=v2sccor_all(k,l,j,i,iparm)
+ enddo
enddo
enddo
enddo
& vbldsc0_all(maxbondterm,ntyp,max_parm),
& aksc_all(maxbondterm,ntyp,max_parm),
& abond0_all(maxbondterm,ntyp,max_parm),
- & a0thet_all(ntyp,max_parm),athet_all(2,ntyp,max_parm),
- & bthet_all(2,ntyp,max_parm),polthet_all(0:3,ntyp,max_parm),
- & gthet_all(3,ntyp,max_parm),theta0_all(ntyp,max_parm),
- & sig0_all(ntyp,max_parm),sigc0_all(ntyp,max_parm),
+ & a0thet_all(-ntyp:ntyp,max_parm),
+ & athet_all(2,-ntyp:ntyp,-1:1,-1:1,max_parm),
+ & bthet_all(2,-ntyp:ntyp,-1:1,-1:1,max_parm),
+ & polthet_all(0:3,-ntyp:ntyp,max_parm),
+ & gthet_all(3,-ntyp:ntyp,max_parm),theta0_all(-ntyp:ntyp,max_parm),
+ & sig0_all(-ntyp:ntyp,max_parm),sigc0_all(-ntyp:ntyp,max_parm),
& aa0thet_all(maxthetyp1,maxthetyp1,maxthetyp1,max_parm),
& aathet_all(maxtheterm,maxthetyp1,maxthetyp1,maxthetyp1,max_parm),
& bbthet_all(maxsingle,maxtheterm2,maxthetyp1,maxthetyp1,
& ggthet_all(maxdouble,maxdouble,maxtheterm3,maxthetyp1,maxthetyp1,
& maxthetyp1,max_parm),
& dsc_all(ntyp1,max_parm),bsc_all(maxlob,ntyp,max_parm),
- & censc_all(3,maxlob,ntyp,max_parm),
- & gaussc_all(3,3,maxlob,ntyp,max_parm),dsc0_all(ntyp1,max_parm),
+ & censc_all(3,maxlob,-ntyp:ntyp,max_parm),
+ & gaussc_all(3,3,maxlob,-ntyp:ntyp,max_parm),
+ & dsc0_all(ntyp1,max_parm),
& sc_parmin_all(65,ntyp,max_parm),
- & v0_all(maxtor,maxtor,max_parm),
- & v1_all(maxterm,maxtor,maxtor,max_parm),
- & v2_all(maxterm,maxtor,maxtor,max_parm),
+ & v0_all(-maxtor:maxtor,-maxtor:maxtor,2,max_parm),
+ & v1_all(maxterm,-maxtor:maxtor,-maxtor:maxtor,2,max_parm),
+ & v2_all(maxterm,-maxtor:maxtor,-maxtor:maxtor,2,max_parm),
& vlor1_all(maxlor,maxtor,maxtor,max_parm),
& vlor2_all(maxlor,maxtor,maxtor,max_parm),
& vlor3_all(maxlor,maxtor,maxtor,max_parm),
- & v1c_all(2,maxtermd_1,maxtor,maxtor,maxtor,max_parm),
- & v1s_all(2,maxtermd_1,maxtor,maxtor,maxtor,max_parm),
- & v2c_all(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor,max_parm),
- & v2s_all(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor,max_parm),
- & b1_all(2,maxtor,max_parm),b2_all(2,maxtor,max_parm),
- & cc_all(2,2,maxtor,max_parm),dd_all(2,2,maxtor,max_parm),
- & ee_all(2,2,maxtor,max_parm),ctilde_all(2,2,maxtor,max_parm),
- & dtilde_all(2,2,maxtor,max_parm),b1tilde_all(2,maxtor,max_parm),
+ & v1c_all(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2,max_parm),
+ & v1s_all(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2,max_parm),
+ & v2c_all(maxtermd_2,maxtermd_2,-maxtor:maxtor,
+ & -maxtor:maxtor,-maxtor:maxtor,2,max_parm),
+ & v2s_all(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2,max_parm),
+ & b1_all(2,-maxtor:maxtor,max_parm),
+ & b2_all(2,-maxtor:maxtor,max_parm),
+ & cc_all(2,2,-maxtor:maxtor,max_parm),
+ & dd_all(2,2,-maxtor:maxtor,max_parm),
+ & ee_all(2,2,-maxtor:maxtor,max_parm),
+ & ctilde_all(2,2,-maxtor:maxtor,max_parm),
+ & dtilde_all(2,2,-maxtor:maxtor,max_parm),
+ & b1tilde_all(2,-maxtor:maxtor,max_parm),
& app_all(2,2,max_parm),bpp_all(2,2,max_parm),
& ael6_all(2,2,max_parm),ael3_all(2,2,max_parm),
& aad_all(ntyp,2,max_parm),bad_all(ntyp,2,max_parm),
& v1ss_all(max_parm),v2ss_all(max_parm),v3ss_all(max_parm),
& v1sccor_all(maxterm_sccor,3,ntyp,ntyp,max_parm),
& v2sccor_all(maxterm_sccor,3,ntyp,ntyp,max_parm)
- integer nlob_all(ntyp1,max_parm),nlor_all(maxtor,maxtor,max_parm),
- & nterm_all(maxtor,maxtor,max_parm),
- & ntermd1_all(maxtor,maxtor,maxtor,max_parm),
- & ntermd2_all(maxtor,maxtor,maxtor,max_parm),
+ integer nlob_all(ntyp1,max_parm),
+ & nlor_all(-maxtor:maxtor,-maxtor:maxtor,2,max_parm),
+ & nterm_all(-maxtor:maxtor,-maxtor:maxtor,2,max_parm),
+ & ntermd1_all(-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2,max_parm),
+ & ntermd2_all(-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2,max_parm),
& nbondterm_all(ntyp,max_parm),nthetyp_all(max_parm),
& ithetyp_all(ntyp1,max_parm),ntheterm_all(max_parm),
& ntheterm2_all(max_parm),ntheterm3_all(max_parm),
+++ /dev/null
-Makefile_MPICH_ifort
\ No newline at end of file
--- /dev/null
+INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh
+BIN = ../../../bin/wham/
+FC= ifort
+#OPT = -mcmodel=medium -O3 -ip -w
+OPT = -mcmodel=medium -g -CB
+FFLAGS = ${OPT} -c -I. -I./include_unres -I$(INSTALL_DIR)/include
+LIBS = -L$(INSTALL_DIR)/lib -lmpich -lpmpich ../../lib/xdrf/libxdrf.a
+CPPFLAGS = -DMPI -DLINUX -DUNRES -DSPLITELE -DPROCOR -DPGI -DISNAN -DAMD64 \
+ -DCRYST_BOND -DCRYST_THETA -DCRYST_SC
+
+.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 \
+ initialize_p.o \
+ molread_zs.o \
+ openunits.o \
+ gnmr1.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
+
+make_dbase: ${objects} ${objects_compar}
+ cc -o compinfo compinfo.c
+ ./compinfo
+ ${FC} -c ${FFLAGS} cinfo.f
+ $(FC) ${OPT} ${objects} ${objects_compar} cinfo.o \
+ ${LIBS} -static-intel -o ${BIN}/wham_multparm-ham_rep-oldparm
+
+clean:
+ /bin/rm *.o
* Derivatives in alpha and omega:
*
do i=2,nres-1
- dsci=dsc(itype(i))
+ dsci=dsc(iabs(itype(i)))
alphi=alph(i)
omegi=omeg(i)
cd print *,'i=',i,' dsci=',dsci,' alphi=',alphi,' omegi=',omegi
endif
110 format (a,'(',i3,')',9f8.3)
do i=ist,ien-kkk
- iti=itype(i)
+ iti=iabs(itype(i))
do j=i+kkk,ien
- itj=itype(j)
+ itj=iabs(itype(j))
itypi=iti
itypj=itj
xj = c(1,nres+j)-c(1,nres+i)
it2=itype(i2)
write (iout,'(i3,2x,a,i4,2x,a,i4,5f8.3,3f10.5)')
& i,restyp(it1),i1,restyp(it2),i2,cscore(i),
- & sc_cutoff(it1,it2),ddsc(i),ddla(i),ddlb(i),
+ & sc_cutoff(iabs(it1),iabs(it2)),ddsc(i),ddla(i),ddlb(i),
& omt1(i),omt2(i),omt12(i)
enddo
endif
& iii+1,indstart(me1)+iii," T",
& 1.0d0/(1.987D-3*beta_h(ib,ipar))
errmsg_count=errmsg_count+1
+
+ call pdbout(indstart(me1)+iii,
+ & 1.0d0/(1.987D-3*beta_h(ib,ipar)),
+ &energia(0),eini,0.0d0,0.0d0)
+ call enerprint(energia(0),fT)
if (errmsg_count.gt.maxerrmsg_count)
& write (iout,*) "Too many warning messages"
if (einicheck.gt.1) then
enddo
do j=nnt,nct
itj=itype(j)
- if (itype(j).ne.10 .and. (vbld(nres+j)-dsc(itj)).gt.2.0d0) then
+ if (itype(j).ne.10 .and.(vbld(nres+j)-dsc(iabs(itj))).gt.2.0d0)
+ & then
if (iprint.gt.0)
& write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j),
& " for conformation",ii
evdw=0.0D0
evdw_t=0.0d0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
cd write (iout,*) 'i=',i,' iint=',iint,' istart=',istart(i,iint),
cd & 'iend=',iend(i,iint)
do j=istart(i,iint),iend(i,iint)
- itypj=itype(j)
+ itypj=iabs(itype(j))
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
evdw=0.0D0
evdw_t=0.0d0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
C
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
- itypj=itype(j)
+ itypj=iabs(itype(j))
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
c endif
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
+ itypj=iabs(itype(j))
dscj_inv=vbld_inv(j+nres)
chi1=chi(itypi,itypj)
chi2=chi(itypj,itypi)
c if (icall.gt.0) lprn=.true.
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
+ itypj=iabs(itype(j))
dscj_inv=vbld_inv(j+nres)
sig0ij=sigma(itypi,itypj)
chi1=chi(itypi,itypj)
c if (icall.gt.0) lprn=.true.
ind=0
do i=iatsc_s,iatsc_e
- itypi=itype(i)
- itypi1=itype(i+1)
+ itypi=iabs(itype(i))
+ itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- itypj=itype(j)
+ itypj=iabs(itype(j))
dscj_inv=vbld_inv(j+nres)
sig0ij=sigma(itypi,itypj)
r0ij=r0(itypi,itypj)
do iint=1,nscp_gr(i)
do j=iscpstart(i,iint),iscpend(i,iint)
- itypj=itype(j)
+ itypj=iabs(itype(j))
C Uncomment following three lines for SC-p interactions
c xj=c(1,nres+j)-xi
c yj=c(2,nres+j)-yi
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
+ if (ii.gt.nres .and. iabs(itype(iii)).eq.1 .and.
+ & iabs(itype(jjj)).eq.1) then
call ssbond_ene(iii,jjj,eij)
ehpb=ehpb+2*eij
cd write (iout,*) "eij",eij
include 'COMMON.VAR'
include 'COMMON.IOUNITS'
double precision erij(3),dcosom1(3),dcosom2(3),gg(3)
- itypi=itype(i)
+ itypi=iabs(itype(i))
xi=c(1,nres+i)
yi=c(2,nres+i)
zi=c(3,nres+i)
dyi=dc_norm(2,nres+i)
dzi=dc_norm(3,nres+i)
dsci_inv=dsc_inv(itypi)
- itypj=itype(j)
+ itypj=iabs(itype(j))
dscj_inv=dsc_inv(itypj)
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
c 09/18/07 AL: multimodal bond potential based on AM1 CA-SC PMF's included
c
do i=nnt,nct
- iti=itype(i)
+ iti=iabs(itype(i))
if (iti.ne.10) then
nbi=nbondterm(iti)
if (nbi.eq.1) then
C Zero the energy function and its derivative at 0 or pi.
call splinthet(theta(i),0.5d0*delta,ss,ssd)
it=itype(i-1)
+ ichir1=isign(1,itype(i-2))
+ ichir2=isign(1,itype(i))
+ if (itype(i-2).eq.10) ichir1=isign(1,itype(i-1))
+ if (itype(i).eq.10) ichir2=isign(1,itype(i-1))
+ if (itype(i-1).eq.10) then
+ itype1=isign(10,itype(i-2))
+ ichir11=isign(1,itype(i-2))
+ ichir12=isign(1,itype(i-2))
+ itype2=isign(10,itype(i))
+ ichir21=isign(1,itype(i))
+ ichir22=isign(1,itype(i))
+ endif
c if (i.gt.ithet_start .and.
c & (itel(i-1).eq.0 .or. itel(i-2).eq.0)) goto 1215
c if (i.gt.3 .and. (i.le.4 .or. itel(i-3).ne.0)) then
C In following comments this theta will be referred to as t_c.
thet_pred_mean=0.0d0
do k=1,2
- athetk=athet(k,it)
- bthetk=bthet(k,it)
+ athetk=athet(k,it,ichir1,ichir2)
+ bthetk=bthet(k,it,ichir1,ichir2)
+ if (it.eq.10) then
+ athetk=athet(k,itype1,ichir11,ichir12)
+ bthetk=bthet(k,itype2,ichir21,ichir22)
+ endif
thet_pred_mean=thet_pred_mean+athetk*y(k)+bthetk*z(k)
enddo
c write (iout,*) "thet_pred_mean",thet_pred_mean
thet_pred_mean=thet_pred_mean*ss+a0thet(it)
c write (iout,*) "thet_pred_mean",thet_pred_mean
C Derivatives of the "mean" values in gamma1 and gamma2.
- dthetg1=(-athet(1,it)*y(2)+athet(2,it)*y(1))*ss
- dthetg2=(-bthet(1,it)*z(2)+bthet(2,it)*z(1))*ss
+ dthetg1=(-athet(1,it,ichir1,ichir2)*y(2)
+ &+athet(2,it,ichir1,ichir2)*y(1))*ss
+ dthetg2=(-bthet(1,it,ichir1,ichir2)*z(2)
+ & +bthet(2,it,ichir1,ichir2)*z(1))*ss
+ if (it.eq.10) then
+ dthetg1=(-athet(1,itype1,ichir11,ichir12)*y(2)
+ &+athet(2,itype1,ichir11,ichir12)*y(1))*ss
+ dthetg2=(-bthet(1,itype2,ichir21,ichir22)*z(2)
+ & +bthet(2,itype2,ichir21,ichir22)*z(1))*ss
+ endif
if (theta(i).gt.pi-delta) then
call theteng(pi-delta,thet_pred_mean,theta0(it),f0,fprim0,
& E_tc0)
dephii=0.0d0
dephii1=0.0d0
theti2=0.5d0*theta(i)
- ityp2=ithetyp(itype(i-1))
+ ityp2=ithetyp(iabs(itype(i-1)))
do k=1,nntheterm
coskt(k)=dcos(k*theti2)
sinkt(k)=dsin(k*theti2)
#else
phii=phi(i)
#endif
- ityp1=ithetyp(itype(i-2))
+ ityp1=ithetyp(iabs(itype(i-2)))
do k=1,nsingle
cosph1(k)=dcos(k*phii)
sinph1(k)=dsin(k*phii)
#else
phii1=phi(i+1)
#endif
- ityp3=ithetyp(itype(i))
+ ityp3=ithetyp(iabs(itype(i)))
do k=1,nsingle
cosph2(k)=dcos(k*phii1)
sinph2(k)=dsin(k*phii1)
do i=loc_start,loc_end
it=itype(i)
if (it.eq.10) goto 1
- nlobit=nlob(it)
+ nlobit=nlob(iabs(it))
c print *,'i=',i,' it=',it,' nlobit=',nlobit
c write (iout,*) 'i=',i,' ssa=',ssa,' ssad=',ssad
theti=theta(i+1)-pipol
do iii=-1,1
do j=1,nlobit
- expfac=dexp(bsc(j,it)-0.5D0*contr(j,iii)+emin)
+ expfac=dexp(bsc(j,iabs(it))-0.5D0*contr(j,iii)+emin)
cd print *,'j=',j,' expfac=',expfac
escloc_i=escloc_i+expfac
do k=1,3
dersc12=0.0d0
do j=1,nlobit
- expfac=dexp(bsc(j,it)-0.5D0*contr(j)+emin)
+ expfac=dexp(bsc(j,iabs(it))-0.5D0*contr(j)+emin)
escloc_i=escloc_i+expfac
do k=1,2
dersc(k)=dersc(k)+Ax(k,j)*expfac
cosfac=dsqrt(cosfac2)
sinfac2=0.5d0/(1.0d0-costtab(i+1))
sinfac=dsqrt(sinfac2)
- it=itype(i)
+ it=iabs(itype(i))
if (it.eq.10) goto 1
c
C Compute the axes of tghe local cartesian coordinates system; store in
do j = 1,3
xx = xx + x_prime(j)*dc_norm(j,i+nres)
yy = yy + y_prime(j)*dc_norm(j,i+nres)
- zz = zz + z_prime(j)*dc_norm(j,i+nres)
+ zz = zz + dsign(1.0,itype(i))*z_prime(j)*dc_norm(j,i+nres)
enddo
xxtab(i)=xx
C Compute the energy of the ith side cbain
C
c write (2,*) "xx",xx," yy",yy," zz",zz
- it=itype(i)
+ it=iabs(itype(i))
do j = 1,65
x(j) = sc_parmin(j,it)
enddo
Cc diagnostics - remove later
xx1 = dcos(alph(2))
yy1 = dsin(alph(2))*dcos(omeg(2))
- zz1 = -dsin(alph(2))*dsin(omeg(2))
+ zz1 = -dsign(1.0,itype(i))*dsin(alph(2))*dsin(omeg(2))
write(2,'(3f8.1,3f9.3,1x,3f9.3)')
& alph(2)*rad2deg,omeg(2)*rad2deg,theta(3)*rad2deg,xx,yy,zz,
& xx1,yy1,zz1
etors=0.0D0
do i=iphi_start,iphi_end
if (itel(i-2).eq.0 .or. itel(i-1).eq.0) goto 1215
+ if (iabs(itype(i)).eq.20) then
+ iblock=2
+ else
+ iblock=1
+ endif
itori=itortyp(itype(i-2))
itori1=itortyp(itype(i-1))
phii=phi(i)
gloci=0.0D0
C Regular cosine and sine terms
- do j=1,nterm(itori,itori1)
- v1ij=v1(j,itori,itori1)
- v2ij=v2(j,itori,itori1)
+ do j=1,nterm(itori,itori1,iblock)
+ v1ij=v1(j,itori,itori1,iblock)
+ v2ij=v2(j,itori,itori1,iblock)
cosphi=dcos(j*phii)
sinphi=dsin(j*phii)
etors=etors+v1ij*cosphi+v2ij*sinphi
C
cosphi=dcos(0.5d0*phii)
sinphi=dsin(0.5d0*phii)
- do j=1,nlor(itori,itori1)
+ do j=1,nlor(itori,itori1,iblock)
vl1ij=vlor1(j,itori,itori1)
vl2ij=vlor2(j,itori,itori1)
vl3ij=vlor3(j,itori,itori1)
gloci=gloci+vl1ij*(vl3ij*cosphi-vl2ij*sinphi)*pom
enddo
C Subtract the constant term
- etors=etors-v0(itori,itori1)
+ etors=etors-v0(itori,itori1,iblock)
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,
- & (v1(j,itori,itori1),j=1,6),(v2(j,itori,itori1),j=1,6)
+ & (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)
1215 continue
phii1=phi(i+1)
gloci1=0.0D0
gloci2=0.0D0
+ iblock=1
+ if (iabs(itype(i+1)).eq.20) iblock=2
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)
- v2cij=v1c(2,j,itori,itori1,itori2)
- v2sij=v1s(2,j,itori,itori1,itori2)
+ do j=1,ntermd_1(itori,itori1,itori2,iblock)
+ v1cij=v1c(1,j,itori,itori1,itori2,iblock)
+ v1sij=v1s(1,j,itori,itori1,itori2,iblock)
+ v2cij=v1c(2,j,itori,itori1,itori2,iblock)
+ v2sij=v1s(2,j,itori,itori1,itori2,iblock)
cosphi1=dcos(j*phii)
sinphi1=dsin(j*phii)
cosphi2=dcos(j*phii1)
gloci1=gloci1+j*(v1sij*cosphi1-v1cij*sinphi1)
gloci2=gloci2+j*(v2sij*cosphi2-v2cij*sinphi2)
enddo
- do k=2,ntermd_2(itori,itori1,itori2)
+ do k=2,ntermd_2(itori,itori1,itori2,iblock)
do l=1,k-1
- v1cdij = v2c(k,l,itori,itori1,itori2)
- v2cdij = v2c(l,k,itori,itori1,itori2)
- v1sdij = v2s(k,l,itori,itori1,itori2)
- v2sdij = v2s(l,k,itori,itori1,itori2)
+ v1cdij = v2c(k,l,itori,itori1,itori2,iblock)
+ v2cdij = v2c(l,k,itori,itori1,itori2,iblock)
+ v1sdij = v2s(k,l,itori,itori1,itori2,iblock)
+ v2sdij = v2s(l,k,itori,itori1,itori2,iblock)
cosphi1p2=dcos(l*phii+(k-l)*phii1)
cosphi1m2=dcos(l*phii-(k-l)*phii1)
sinphi1p2=dsin(l*phii+(k-l)*phii1)
esccor=0.0D0
do i=itau_start,itau_end
esccor_ii=0.0D0
- isccori=isccortyp(itype(i-2))
- isccori1=isccortyp(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 3 = SC...Ca...Ca...SCi
gloci=0.0D0
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)))
+ & (itype(i-1).eq.10).or.(itype(i-2).eq.ntyp1).or.
+ & (itype(i-1).eq.ntyp1)))
& .or. ((intertyp.eq.1).and.((itype(i-2).eq.10)
- & .or.(itype(i-2).eq.21)))
+ & .or.(itype(i-2).eq.ntyp1)))
& .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))
+ & (itype(i-1).eq.ntyp1)))) cycle
+ if ((intertyp.eq.2).and.(i.eq.4).and.(itype(1).eq.ntyp1)) cycle
+ if ((intertyp.eq.1).and.(i.eq.nres).and.(itype(nres).eq.ntyp1))
& cycle
do j=1,nterm_sccor(isccori,isccori1)
v1ij=v1sccor(j,intertyp,isccori,isccori1)
integer nlob,loc_start,loc_end,ithet_start,ithet_end,
& iphi_start,iphi_end,itau_start,itau_end
C Parameters of the virtual-bond-angle probability distribution
- common /thetas/ a0thet(ntyp),athet(2,ntyp),bthet(2,ntyp),
- & polthet(0:3,ntyp),gthet(3,ntyp),theta0(ntyp),sig0(ntyp),
- & sigc0(ntyp)
+ common /thetas/ a0thet(-ntyp:ntyp),athet(2,-ntyp:ntyp,-1:1,-1:1)
+ & ,bthet(2,-ntyp:ntyp,-1:1,-1:1),
+ & polthet(0:3,-ntyp:ntyp),gthet(3,-ntyp:ntyp),theta0(-ntyp:ntyp),
+ &sig0(-ntyp:ntyp), sigc0(-ntyp:ntyp)
C Parameters of ab initio-derived potential of virtual-bond-angle bending
integer nthetyp,ntheterm,ntheterm2,ntheterm3,nsingle,ndouble,
& ithetyp(ntyp1),nntheterm
& ndouble,nntheterm
C Parameters of the side-chain probability distribution
common /sclocal/ dsc(ntyp1),dsc_inv(ntyp1),bsc(maxlob,ntyp),
- & censc(3,maxlob,ntyp),gaussc(3,3,maxlob,ntyp),dsc0(ntyp1),
+ & censc(3,maxlob,-ntyp:ntyp),gaussc(3,3,maxlob,-ntyp:ntyp),
+ & dsc0(ntyp1),
& nlob(ntyp1)
C Virtual-bond lenghts
common /peptbond/ vbl,vblinv,vblinv2,vbl_cis,vbl0
character*3 restyp
character*1 onelet
- common /names/ restyp(ntyp+1),onelet(ntyp+1)
+ common /names/ restyp(-ntyp1:ntyp1),onelet(-ntyp1:ntyp1)
character*10 ename,wname
integer nprint_ene,print_order
common /namterm/ ename(max_ene),wname(max_ene),nprint_ene,
& dcostau,dsintau,dtauangle,dcosomicron,
& domicron,v0sccor
integer nterm_sccor,isccortyp,nsccortyp,nlor_sccor
- common /sccor/ v1sccor(maxterm_sccor,3,20,20),
- & v2sccor(maxterm_sccor,3,20,20),
- & v0sccor(ntyp,ntyp),
- & vlor1sccor(maxterm_sccor,20,20),
- & vlor2sccor(maxterm_sccor,20,20),
- & vlor3sccor(maxterm_sccor,20,20),gloc_sc(3,0:maxres2,10),
+ common /sccor/ v1sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp),
+ & v2sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp),
+ & v0sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & vlor1sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & vlor2sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & vlor3sccor(maxterm_sccor,-ntyp:ntyp,-ntyp:ntyp),
+ & gloc_sc(3,0:maxres2,10),
& dcostau(3,3,3,maxres2),dsintau(3,3,3,maxres2),
& dtauangle(3,3,3,maxres2),dcosomicron(3,3,3,maxres2),
& domicron(3,3,3,maxres2),
- & nterm_sccor(ntyp,ntyp),isccortyp(ntyp),nsccortyp,
- & nlor_sccor(ntyp,ntyp)
+ & nterm_sccor(-ntyp:ntyp,-ntyp:ntyp),isccortyp(-ntyp:ntyp),
+ & nsccortyp,
+ & nlor_sccor(-ntyp:ntyp,-ntyp:ntyp)
C Torsional constants of the rotation about virtual-bond dihedral angles
double precision v1,v2,vlor1,vlor2,vlor3,v0
integer itortyp,ntortyp,nterm,nlor,nterm_old
- common/torsion/v0(maxtor,maxtor),v1(maxterm,maxtor,maxtor),
- & v2(maxterm,maxtor,maxtor),vlor1(maxlor,maxtor,maxtor),
+ common/torsion/v0(-maxtor:maxtor,-maxtor:maxtor,2),
+ & v1(maxterm,-maxtor:maxtor,-maxtor:maxtor,2),
+ & v2(maxterm,-maxtor:maxtor,-maxtor:maxtor,2),
+ & vlor1(maxlor,maxtor,maxtor),
& vlor2(maxlor,maxtor,maxtor),vlor3(maxlor,maxtor,maxtor),
- & itortyp(ntyp),ntortyp,nterm(maxtor,maxtor),nlor(maxtor,maxtor)
+ & itortyp(-ntyp:ntyp),ntortyp,
+ & nterm(-maxtor:maxtor,-maxtor:maxtor,2),
+ & nlor(-maxtor:maxtor,-maxtor:maxtor,2)
& ,nterm_old
C 6/23/01 - constants for double torsionals
double precision v1c,v1s,v2c,v2s
integer ntermd_1,ntermd_2
- common /torsiond/ v1c(2,maxtermd_1,maxtor,maxtor,maxtor),
- & v1s(2,maxtermd_1,maxtor,maxtor,maxtor),
- & v2c(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor),
- & v2s(maxtermd_2,maxtermd_2,maxtor,maxtor,maxtor),
- & ntermd_1(maxtor,maxtor,maxtor),ntermd_2(maxtor,maxtor,maxtor)
+ common /torsiond/
+ &v1c(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ &v1s(2,maxtermd_1,-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ &v2c(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2),
+ &v2s(maxtermd_2,maxtermd_2,-maxtor:maxtor,-maxtor:maxtor,
+ & -maxtor:maxtor,2),
+ & ntermd_1(-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2),
+ & ntermd_2(-maxtor:maxtor,-maxtor:maxtor,-maxtor:maxtor,2)
C 9/18/99 - added Fourier coeffficients of the expansion of local energy
C surface
double precision b1,b2,cc,dd,ee,ctilde,dtilde,b1tilde
integer nloctyp
- common/fourier/ b1(2,maxtor),b2(2,maxtor),cc(2,2,maxtor),
- & dd(2,2,maxtor),ee(2,2,maxtor),ctilde(2,2,maxtor),
- & dtilde(2,2,maxtor),b1tilde(2,maxtor),nloctyp
+ common/fourier/ b1(2,-maxtor:maxtor),b2(2,-maxtor:maxtor),
+ & cc(2,2,-maxtor:maxtor),
+ & dd(2,2,-maxtor:maxtor),ee(2,2,-maxtor:maxtor),
+ & ctilde(2,2,-maxtor:maxtor),
+ & dtilde(2,2,-maxtor:maxtor),b1tilde(2,-maxtor:maxtor),nloctyp
double precision b
- common /fourier1/ b(13,maxtor)
+ common /fourier1/ b(13)
sigii(i)=0.0D0
rr0(i)=0.0D0
a0thet(i)=0.0D0
- do j=1,2
- athet(j,i)=0.0D0
- bthet(j,i)=0.0D0
+ do j=1,2
+ do ichir1=-1,1
+ do ichir2=-1,1
+ athet(j,i,ichir1,ichir2)=0.0D0
+ bthet(j,i,ichir1,ichir2)=0.0D0
+ enddo
+ enddo
enddo
do j=0,3
polthet(j,i)=0.0D0
enddo
nlob(ntyp1)=0
dsc(ntyp1)=0.0D0
- do i=1,maxtor
- itortyp(i)=0
- do j=1,maxtor
- do k=1,maxterm
- v1(k,j,i)=0.0D0
- v2(k,j,i)=0.0D0
+ do i=-maxtor,maxtor
+ itortyp(i)=0
+ do iblock=1,2
+ do j=-maxtor,maxtor
+ do k=1,maxterm
+ v1(k,j,i,iblock)=0.0D0
+ v2(k,j,i,iblock)=0.0D0
enddo
enddo
+ enddo
enddo
+ do iblock=1,2
+ do i=-maxtor,maxtor
+ do j=-maxtor,maxtor
+ do k=-maxtor,maxtor
+ do l=1,maxtermd_1
+ v1c(1,l,i,j,k,iblock)=0.0D0
+ v1s(1,l,i,j,k,iblock)=0.0D0
+ v1c(2,l,i,j,k,iblock)=0.0D0
+ v1s(2,l,i,j,k,iblock)=0.0D0
+ enddo !l
+ do l=1,maxtermd_2
+ do m=1,maxtermd_2
+ v2c(m,l,i,j,k,iblock)=0.0D0
+ v2s(m,l,i,j,k,iblock)=0.0D0
+ enddo !m
+ enddo !l
+ enddo !k
+ enddo !j
+ enddo !i
+ enddo !iblock
do i=1,maxres
itype(i)=0
itel(i)=0
include 'COMMON.WEIGHTS'
include 'COMMON.FFIELD'
data restyp /
+ &'DD' ,'DPR','DLY','DAR','DHI','DAS','DGL','DSG','DGN','DSN','DTH',
+ &'DYY','DAL','DTY','DTR','DVA','DLE','DIL','DPN','MED','DCY','ZER',
&'CYS','MET','PHE','ILE','LEU','VAL','TRP','TYR','ALA','GLY','THR',
&'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO','D'/
data onelet /
+ &'z','p','k','r','h','d','e','n','q','s','t','g',
+ &'a','y','w','v','l','i','f','m','c','x',
&'C','M','F','I','L','V','W','Y','A','G','T',
&'S','Q','N','E','D','H','R','K','P','X'/
data potname /'LJ','LJK','BP','GB','GBV'/
nint_gr(i)=1
istart(i,1)=i+1
iend(i,1)=nct
- ind_scint=int_scint+nct-i
+ ind_scint=ind_scint+nct-i
#endif
endif
#ifdef MPL
if (i.gt.2) tauangle(3,i+1)=beta(i+nres-1,i-1,i,i+nres)
if (i.gt.2) tauangle(1,i+1)=beta(i-1+nres,i-1,i,i+1)
if (i.gt.2) tauangle(2,i+1)=beta(i-2,i-1,i,i+nres)
-
omeg(i)=beta(nres+i,i,maxres2,i+1)
theta(i+1)=alpha(i-1,i,i+1)
alph(i)=alpha(nres+i,i,maxres2)
write (iout,'(20i4)') (itype(i),i=1,nres)
do i=1,nres-1
#ifdef PROCOR
- if (itype(i).eq.21 .or. itype(i+1).eq.21) then
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) then
#else
- if (itype(i).eq.21) then
+ if (itype(i).eq.ntyp1) then
#endif
itel(i)=0
#ifdef PROCOR
- else if (itype(i+1).ne.20) then
+ else if (iabs(itype(i+1)).ne.20) then
#else
- else if (itype(i).ne.20) then
+ else if (iabs(itype(i)).ne.20) then
#endif
itel(i)=1
else
nnt=1
nct=nres
- if (itype(1).eq.21) nnt=2
- if (itype(nres).eq.21) nct=nct-1
+ if (itype(1).eq.ntyp1) nnt=2
+ if (itype(nres).eq.ntyp1) nct=nct-1
write(iout,*) 'NNT=',NNT,' NCT=',NCT
c Read distance restraints
if (constr_dist.gt.0) then
C of the virtual-bond valence angles theta
C
do i=1,ntyp
- read (ithep,*) a0thet(i),(athet(j,i),j=1,2),(bthet(j,i),j=1,2)
+ read (ithep,*) a0thet(i),(athet(j,i,1,1),j=1,2),
+ & (bthet(j,i,1,1),j=1,2)
read (ithep,*) (polthet(j,i),j=0,3)
read (ithep,*) (gthet(j,i),j=1,3)
read (ithep,*) theta0(i),sig0(i),sigc0(i)
sigc0(i)=sigc0(i)**2
enddo
+ do i=1,ntyp
+ athet(1,i,1,-1)=athet(1,i,1,1)
+ athet(2,i,1,-1)=athet(2,i,1,1)
+ bthet(1,i,1,-1)=-bthet(1,i,1,1)
+ bthet(2,i,1,-1)=-bthet(2,i,1,1)
+ athet(1,i,-1,1)=-athet(1,i,1,1)
+ athet(2,i,-1,1)=-athet(2,i,1,1)
+ bthet(1,i,-1,1)=bthet(1,i,1,1)
+ bthet(2,i,-1,1)=bthet(2,i,1,1)
+ enddo
+ do i=-ntyp,-1
+ a0thet(i)=a0thet(-i)
+ athet(1,i,-1,-1)=athet(1,-i,1,1)
+ athet(2,i,-1,-1)=-athet(2,-i,1,1)
+ bthet(1,i,-1,-1)=bthet(1,-i,1,1)
+ bthet(2,i,-1,-1)=-bthet(2,-i,1,1)
+ athet(1,i,-1,1)=athet(1,-i,1,1)
+ athet(2,i,-1,1)=-athet(2,-i,1,1)
+ bthet(1,i,-1,1)=-bthet(1,-i,1,1)
+ bthet(2,i,-1,1)=bthet(2,-i,1,1)
+ athet(1,i,1,-1)=-athet(1,-i,1,1)
+ athet(2,i,1,-1)=athet(2,-i,1,1)
+ bthet(1,i,1,-1)=bthet(1,-i,1,1)
+ bthet(2,i,1,-1)=-bthet(2,-i,1,1)
+ theta0(i)=theta0(-i)
+ sig0(i)=sig0(-i)
+ sigc0(i)=sigc0(-i)
+ do j=0,3
+ polthet(j,i)=polthet(j,-i)
+ enddo
+ do j=1,3
+ gthet(j,i)=gthet(j,-i)
+ enddo
+ enddo
close (ithep)
if (lprint) then
c write (iout,'(a)')
& ' b1*10^1 ',' b2*10^1 '
do i=1,ntyp
write(iout,'(a3,1h&,2x,5(f8.3,1h&))') restyp(i),
- & a0thet(i),(100*athet(j,i),j=1,2),(10*bthet(j,i),j=1,2)
+ & a0thet(i),(100*athet(j,i,1,1),j=1,2),
+ & (10*bthet(j,i,1,1),j=1,2)
enddo
write (iout,'(/a/9x,5a/79(1h-))')
& 'Parameters of the expression for sigma(theta_c):',
enddo
bsc(1,i)=0.0D0
read(irotam,*)(censc(k,1,i),k=1,3),((blower(k,l,1),l=1,k),k=1,3)
+ censc(1,1,-i)=censc(1,1,i)
+ censc(2,1,-i)=censc(2,1,i)
+ censc(3,1,-i)=-censc(3,1,i)
do j=2,nlob(i)
read (irotam,*) bsc(j,i)
read (irotam,*) (censc(k,j,i),k=1,3),
& ((blower(k,l,j),l=1,k),k=1,3)
+ censc(1,j,-i)=censc(1,j,i)
+ censc(2,j,-i)=censc(2,j,i)
+ censc(3,j,-i)=-censc(3,j,i)
enddo
do j=1,nlob(i)
do k=1,3
enddo
gaussc(k,l,j,i)=akl
gaussc(l,k,j,i)=akl
+ if (((k.eq.3).and.(l.ne.3))
+ & .or.((l.eq.3).and.(k.ne.3))) then
+ gaussc(k,l,j,-i)=-akl
+ gaussc(l,k,j,-i)=-akl
+ else
+ gaussc(k,l,j,-i)=akl
+ gaussc(l,k,j,-i)=akl
+ endif
enddo
enddo
enddo
C
read (itorp,*) ntortyp
read (itorp,*) (itortyp(i),i=1,ntyp)
- write (iout,*) 'ntortyp',ntortyp
- do i=1,ntortyp
- do j=1,ntortyp
- read (itorp,*) nterm(i,j),nlor(i,j)
+ do iblock=1,2
+ do i=-ntyp,-1
+ itortyp(i)=-itortyp(-i)
+ enddo
+c write (iout,*) 'ntortyp',ntortyp
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ read (itorp,*) nterm(i,j,iblock),
+ & nlor(i,j,iblock)
+ nterm(-i,-j,iblock)=nterm(i,j,iblock)
+ nlor(-i,-j,iblock)=nlor(i,j,iblock)
v0ij=0.0d0
si=-1.0d0
- do k=1,nterm(i,j)
- read (itorp,*) kk,v1(k,i,j),v2(k,i,j)
- v0ij=v0ij+si*v1(k,i,j)
+ do k=1,nterm(i,j,iblock)
+ read (itorp,*) kk,v1(k,i,j,iblock),v2(k,i,j,iblock)
+ v1(k,-i,-j,iblock)=v1(k,i,j,iblock)
+ v2(k,-i,-j,iblock)=-v2(k,i,j,iblock)
+ v0ij=v0ij+si*v1(k,i,j,iblock)
si=-si
enddo
- do k=1,nlor(i,j)
+ do k=1,nlor(i,j,iblock)
read (itorp,*) kk,vlor1(k,i,j),vlor2(k,i,j),vlor3(k,i,j)
v0ij=v0ij+vlor1(k,i,j)/(1+vlor3(k,i,j)**2)
enddo
- v0(i,j)=v0ij
+ v0(i,j,iblock)=v0ij
+ v0(-i,-j,iblock)=v0ij
enddo
enddo
+ enddo
close (itorp)
if (lprint) then
write (iout,'(/a/)') 'Torsional constants:'
do j=1,ntortyp
write (iout,*) 'ityp',i,' jtyp',j
write (iout,*) 'Fourier constants'
- do k=1,nterm(i,j)
- write (iout,'(2(1pe15.5))') v1(k,i,j),v2(k,i,j)
+ do k=1,nterm(i,j,iblock)
+ write (iout,'(2(1pe15.5))') v1(k,i,j,iblock),
+ & v2(k,i,j,iblock)
enddo
write (iout,*) 'Lorenz constants'
- do k=1,nlor(i,j)
+ do k=1,nlor(i,j,iblock)
write (iout,'(3(1pe15.5))')
& vlor1(k,i,j),vlor2(k,i,j),vlor3(k,i,j)
enddo
C
C 6/23/01 Read parameters for double torsionals
C
- do i=1,ntortyp
- do j=1,ntortyp
- do k=1,ntortyp
+ do iblock=1,2
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ do k=-ntortyp+1,ntortyp-1
read (itordp,'(3a1)') t1,t2,t3
if (t1.ne.onelett(i) .or. t2.ne.onelett(j)
& .or. t3.ne.onelett(k)) then
& i,j,k,t1,t2,t3
stop "Error in double torsional parameter file"
endif
- read (itordp,*) ntermd_1(i,j,k),ntermd_2(i,j,k)
- read (itordp,*) (v1c(1,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) (v1s(1,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) (v1c(2,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) (v1s(2,l,i,j,k),l=1,ntermd_1(i,j,k))
- read (itordp,*) ((v2c(l,m,i,j,k),v2c(m,l,i,j,k),
- & v2s(l,m,i,j,k),v2s(m,l,i,j,k),m=1,l-1),l=1,ntermd_2(i,j,k))
- enddo
- enddo
- enddo
+ read (itordp,*) ntermd_1(i,j,k,iblock),
+ & ntermd_2(i,j,k,iblock)
+ ntermd_1(-i,-j,-k,iblock)=ntermd_1(i,j,k,iblock)
+ ntermd_2(-i,-j,-k,iblock)=ntermd_2(i,j,k,iblock)
+ read (itordp,*) (v1c(1,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*) (v1s(1,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*) (v1c(2,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+ read (itordp,*) (v1s(2,l,i,j,k,iblock),l=1,
+ & ntermd_1(i,j,k,iblock))
+C Martix of D parameters for one dimesional foureir series
+ do l=1,ntermd_1(i,j,k,iblock)
+ v1c(1,l,-i,-j,-k,iblock)=v1c(1,l,i,j,k,iblock)
+ v1s(1,l,-i,-j,-k,iblock)=-v1s(1,l,i,j,k,iblock)
+ v1c(2,l,-i,-j,-k,iblock)=v1c(2,l,i,j,k,iblock)
+ v1s(2,l,-i,-j,-k,iblock)=-v1s(2,l,i,j,k,iblock)
+c write(iout,*) "whcodze" ,
+c & v1s(2,l,-i,-j,-k,iblock),v1s(2,l,i,j,k,iblock)
+ enddo
+ read (itordp,*) ((v2c(l,m,i,j,k,iblock),
+ & v2c(m,l,i,j,k,iblock),v2s(l,m,i,j,k,iblock),
+ & v2s(m,l,i,j,k,iblock),
+ & m=1,l-1),l=1,ntermd_2(i,j,k,iblock))
+C Martix of D parameters for two dimesional fourier series
+ do l=1,ntermd_2(i,j,k,iblock)
+ do m=1,l-1
+ v2c(l,m,-i,-j,-k,iblock)=v2c(l,m,i,j,k,iblock)
+ v2c(m,l,-i,-j,-k,iblock)=v2c(m,l,i,j,k,iblock)
+ v2s(l,m,-i,-j,-k,iblock)=-v2s(l,m,i,j,k,iblock)
+ v2s(m,l,-i,-j,-k,iblock)=-v2s(m,l,i,j,k,iblock)
+ enddo!m
+ enddo!l
+ enddo!k
+ enddo!j
+ enddo!i
+ enddo!iblock
if (lprint) then
write (iout,*)
write (iout,*) 'Constants for double torsionals'
- do i=1,ntortyp
- do j=1,ntortyp
- do k=1,ntortyp
+ do iblock=1,2
+ do i=0,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ do k=-ntortyp+1,ntortyp-1
write (iout,*) 'ityp',i,' jtyp',j,' ktyp',k,
- & ' nsingle',ntermd_1(i,j,k),' ndouble',ntermd_2(i,j,k)
+ & ' nsingle',ntermd_1(i,j,k,iblock),
+ & ' ndouble',ntermd_2(i,j,k,iblock)
write (iout,*)
write (iout,*) 'Single angles:'
- do l=1,ntermd_1(i,j,k)
+ do l=1,ntermd_1(i,j,k,iblock)
write (iout,'(i5,2f10.5,5x,2f10.5)') l,
- & v1c(1,l,i,j,k),v1s(1,l,i,j,k),
- & v1c(2,l,i,j,k),v1s(2,l,i,j,k)
+ & v1c(1,l,i,j,k,iblock),v1s(1,l,i,j,k,iblock),
+ & v1c(2,l,i,j,k,iblock),v1s(2,l,i,j,k,iblock)
enddo
write (iout,*)
write (iout,*) 'Pairs of angles:'
- write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k))
- do l=1,ntermd_2(i,j,k)
+ write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k,iblock))
+ do l=1,ntermd_2(i,j,k,iblock)
write (iout,'(i5,20f10.5)')
- & l,(v2c(l,m,i,j,k),m=1,ntermd_2(i,j,k))
+ & l,(v2c(l,m,i,j,k,iblock),m=1,ntermd_2(i,j,k,iblock))
enddo
write (iout,*)
- write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k))
- do l=1,ntermd_2(i,j,k)
+ write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k,iblock))
+ do l=1,ntermd_2(i,j,k,iblock)
write (iout,'(i5,20f10.5)')
- & l,(v2s(l,m,i,j,k),m=1,ntermd_2(i,j,k))
+ & l,(v2s(l,m,i,j,k,iblock),m=1,ntermd_2(i,j,k,iblock))
enddo
write (iout,*)
enddo
enddo
enddo
+ enddo
endif
#endif
C Read of Side-chain backbone correlation parameters
C
read (isccor,*) nsccortyp
read (isccor,*) (isccortyp(i),i=1,ntyp)
+ do i=-ntyp,-1
+ isccortyp(i)=-isccortyp(-i)
+ enddo
+ iscprol=isccortyp(20)
c write (iout,*) 'ntortyp',ntortyp
maxinter=3
cc maxinter is maximum interaction sites
do j=1,nsccortyp
read (isccor,*) nterm_sccor(i,j),nlor_sccor(i,j)
v0ijsccor=0.0d0
+ v0ijsccor1=0.0d0
+ v0ijsccor2=0.0d0
+ v0ijsccor3=0.0d0
si=-1.0d0
-
+ nterm_sccor(-i,j)=nterm_sccor(i,j)
+ nterm_sccor(-i,-j)=nterm_sccor(i,j)
+ nterm_sccor(i,-j)=nterm_sccor(i,j)
do k=1,nterm_sccor(i,j)
read (isccor,*) kk,v1sccor(k,l,i,j)
& ,v2sccor(k,l,i,j)
+ if (j.eq.iscprol) then
+ if (i.eq.isccortyp(10)) then
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ else
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)*0.5d0
+ & +v2sccor(k,l,i,j)*dsqrt(0.75d0)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)*0.5d0
+ & +v1sccor(k,l,i,j)*dsqrt(0.75d0)
+ v1sccor(k,l,-i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,-j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,-j)
+ endif
+ else
+ if (i.eq.isccortyp(10)) then
+ v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ else
+ if (j.eq.isccortyp(10)) then
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,j)
+ else
+ v1sccor(k,l,i,-j)=-v1sccor(k,l,i,j)
+ v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,-j)=v1sccor(k,l,i,j)
+ v2sccor(k,l,-i,-j)=-v2sccor(k,l,i,j)
+ v1sccor(k,l,-i,j)=v1sccor(k,l,i,-j)
+ v2sccor(k,l,-i,j)=-v2sccor(k,l,i,-j)
+ endif
+ endif
+ endif
v0ijsccor=v0ijsccor+si*v1sccor(k,l,i,j)
+ v0ijsccor1=v0ijsccor+si*v1sccor(k,l,-i,j)
+ v0ijsccor2=v0ijsccor+si*v1sccor(k,l,i,-j)
+ v0ijsccor3=v0ijsccor+si*v1sccor(k,l,-i,-j)
si=-si
enddo
do k=1,nlor_sccor(i,j)
v0ijsccor=v0ijsccor+vlor1sccor(k,i,j)/
&(1+vlor3sccor(k,i,j)**2)
enddo
- v0sccor(i,j)=v0ijsccor
+ v0sccor(l,i,j)=v0ijsccor
+ v0sccor(l,-i,j)=v0ijsccor1
+ v0sccor(l,i,-j)=v0ijsccor2
+ v0sccor(l,-i,-j)=v0ijsccor3
enddo
enddo
enddo
C interaction energy of the Gly, Ala, and Pro prototypes.
C
read (ifourier,*) nloctyp
- do i=1,nloctyp
+ do i=0,nloctyp-1
read (ifourier,*)
- read (ifourier,*) (b(ii,i),ii=1,13)
+ read (ifourier,*) (b(ii),ii=1,13)
if (lprint) then
write (iout,*) 'Type',i
- write (iout,'(a,i2,a,f10.5)') ('b(',ii,')=',b(ii,i),ii=1,13)
+ write (iout,'(a,i2,a,f10.5)') ('b(',ii,')=',b(ii),ii=1,13)
endif
- B1(1,i) = b(3,i)
- B1(2,i) = b(5,i)
- B1tilde(1,i) = b(3,i)
- B1tilde(2,i) =-b(5,i)
- B2(1,i) = b(2,i)
- B2(2,i) = b(4,i)
- CC(1,1,i)= b(7,i)
- CC(2,2,i)=-b(7,i)
- CC(2,1,i)= b(9,i)
- CC(1,2,i)= b(9,i)
- Ctilde(1,1,i)=b(7,i)
- Ctilde(1,2,i)=b(9,i)
- Ctilde(2,1,i)=-b(9,i)
- Ctilde(2,2,i)=b(7,i)
- DD(1,1,i)= b(6,i)
- DD(2,2,i)=-b(6,i)
- DD(2,1,i)= b(8,i)
- DD(1,2,i)= b(8,i)
- Dtilde(1,1,i)=b(6,i)
- Dtilde(1,2,i)=b(8,i)
- Dtilde(2,1,i)=-b(8,i)
- Dtilde(2,2,i)=b(6,i)
- EE(1,1,i)= b(10,i)+b(11,i)
- EE(2,2,i)=-b(10,i)+b(11,i)
- EE(2,1,i)= b(12,i)-b(13,i)
- EE(1,2,i)= b(12,i)+b(13,i)
+ B1(1,i) = b(3)
+ B1(2,i) = b(5)
+ B1(1,-i) = b(3)
+ B1(2,-i) = -b(5)
+c b1(1,i)=0.0d0
+c b1(2,i)=0.0d0
+ B1tilde(1,i) = b(3)
+ B1tilde(2,i) =-b(5)
+ B1tilde(1,-i) =-b(3)
+ B1tilde(2,-i) =b(5)
+c b1tilde(1,i)=0.0d0
+c b1tilde(2,i)=0.0d0
+ B2(1,i) = b(2)
+ B2(2,i) = b(4)
+ B2(1,-i) =b(2)
+ B2(2,-i) =-b(4)
+
+c b2(1,i)=0.0d0
+c b2(2,i)=0.0d0
+ CC(1,1,i)= b(7)
+ CC(2,2,i)=-b(7)
+ CC(2,1,i)= b(9)
+ CC(1,2,i)= b(9)
+ CC(1,1,-i)= b(7)
+ CC(2,2,-i)=-b(7)
+ CC(2,1,-i)=-b(9)
+ CC(1,2,-i)=-b(9)
+c CC(1,1,i)=0.0d0
+c CC(2,2,i)=0.0d0
+c CC(2,1,i)=0.0d0
+c CC(1,2,i)=0.0d0
+ Ctilde(1,1,i)=b(7)
+ Ctilde(1,2,i)=b(9)
+ Ctilde(2,1,i)=-b(9)
+ Ctilde(2,2,i)=b(7)
+ Ctilde(1,1,-i)=b(7)
+ Ctilde(1,2,-i)=-b(9)
+ Ctilde(2,1,-i)=b(9)
+ Ctilde(2,2,-i)=b(7)
+
+c Ctilde(1,1,i)=0.0d0
+c Ctilde(1,2,i)=0.0d0
+c Ctilde(2,1,i)=0.0d0
+c Ctilde(2,2,i)=0.0d0
+ DD(1,1,i)= b(6)
+ DD(2,2,i)=-b(6)
+ DD(2,1,i)= b(8)
+ DD(1,2,i)= b(8)
+ DD(1,1,-i)= b(6)
+ DD(2,2,-i)=-b(6)
+ DD(2,1,-i)=-b(8)
+ DD(1,2,-i)=-b(8)
+c DD(1,1,i)=0.0d0
+c DD(2,2,i)=0.0d0
+c DD(2,1,i)=0.0d0
+c DD(1,2,i)=0.0d0
+ Dtilde(1,1,i)=b(6)
+ Dtilde(1,2,i)=b(8)
+ Dtilde(2,1,i)=-b(8)
+ Dtilde(2,2,i)=b(6)
+ Dtilde(1,1,-i)=b(6)
+ Dtilde(1,2,-i)=-b(8)
+ Dtilde(2,1,-i)=b(8)
+ Dtilde(2,2,-i)=b(6)
+
+c Dtilde(1,1,i)=0.0d0
+c Dtilde(1,2,i)=0.0d0
+c Dtilde(2,1,i)=0.0d0
+c Dtilde(2,2,i)=0.0d0
+ EE(1,1,i)= b(10)+b(11)
+ EE(2,2,i)=-b(10)+b(11)
+ EE(2,1,i)= b(12)-b(13)
+ EE(1,2,i)= b(12)+b(13)
+ EE(1,1,-i)= b(10)+b(11)
+ EE(2,2,-i)=-b(10)+b(11)
+ EE(2,1,-i)=-b(12)+b(13)
+ EE(1,2,-i)=-b(12)-b(13)
+
+c ee(1,1,i)=1.0d0
+c ee(2,2,i)=1.0d0
+c ee(2,1,i)=0.0d0
+c ee(1,2,i)=0.0d0
+c ee(2,1,i)=ee(1,2,i)
enddo
if (lprint) then
do i=1,nloctyp
enddo
close (isidep1)
do i=1,ntyp1
- if (i.eq.10 .or. i.eq.21) then
+ if (i.eq.10 .or. i.eq.ntyp1) then
dsc_inv(i)=0.0d0
else
dsc_inv(i)=1.0d0/dsc(i)
ishift=ires-1
if (res.ne.'GLY' .and. res.ne. 'ACE') then
ishift=ishift-1
- itype(1)=21
+ itype(1)=ntyp1
endif
ibeg=0
else
nstart_sup=1
if (itype(nres).ne.10) then
nres=nres+1
- itype(nres)=21
+ itype(nres)=ntyp1
do j=1,3
dcj=c(j,nres-2)-c(j,nres-3)
c(j,nres)=c(j,nres-1)+dcj
c(j,nres+1)=c(j,1)
c(j,2*nres)=c(j,nres)
enddo
- if (itype(1).eq.21) then
+ if (itype(1).eq.ntyp1) then
nsup=nsup-1
nstart_sup=2
do j=1,3
do i=2,nres
iti=itype(i)
write (iout,*) i,i-1,(c(j,i),j=1,3),(c(j,i-1),j=1,3),dist(i,i-1)
- if (itype(i-1).ne.21 .and. itype(i).ne.21 .and.
+ if (itype(i-1).ne.ntyp1 .and. itype(i).ne.ntyp1 .and.
& (dist(i,i-1).lt.2.0D0 .or. dist(i,i-1).gt.5.0D0)) then
write (iout,'(a,i4)') 'Bad Cartesians for residue',i
stop
theta(i+1)=alpha(i-1,i,i+1)
if (i.gt.2) phi(i+1)=beta(i-2,i-1,i,i+1)
enddo
- if (itype(1).eq.21) then
+ if (itype(1).eq.ntyp1) then
do j=1,3
c(j,1)=c(j,2)+(c(j,3)-c(j,4))
enddo
endif
- if (itype(nres).eq.21) then
+ if (itype(nres).eq.ntyp1) then
do j=1,3
c(j,nres)=c(j,nres-1)+(c(j,nres-2)-c(j,nres-3))
enddo
endif
if (lprn)
& write (iout,'(a3,i4,7f10.3)') restyp(iti),i,dist(i,i-1),
- & rad2deg*theta(i),rad2deg*phi(i),dsc(iti),di,
+ & rad2deg*theta(i),rad2deg*phi(i),dsc(iabs(iti)),di,
& rad2deg*alph(i),rad2deg*omeg(i)
enddo
else if (lprn) then
if (itype.eq.0) then
- do i=1,ntyp1
+ do i=-ntyp1,ntyp1
if (ucase(nam).eq.restyp(i)) then
rescode=i
return
else
- do i=1,ntyp1
+ do i=-ntyp1,ntyp1
if (nam(1:1).eq.onelet(i)) then
rescode=i
return
include 'COMMON.SCROT'
include 'COMMON.SCCOR'
include 'COMMON.ALLPARM'
- integer i,j,k,l,m,mm,iparm
+ integer i,j,k,l,m,mm,iparm,ichir1,ichir2,iblock,iii
c Store weights
ww_all(1,iparm)=wsc
enddo
c Store bond angle parameters
#ifdef CRYST_THETA
- do i=1,ntyp
+ do i=-ntyp,ntyp
a0thet_all(i,iparm)=a0thet(i)
+ do ichir1=-1,1
+ do ichir2=-1,1
do j=1,2
- athet_all(j,i,iparm)=athet(j,i)
- bthet_all(j,i,iparm)=bthet(j,i)
+ athet_all(j,i,ichir1,ichir2,iparm)=athet(j,i,ichir1,ichir2)
+ bthet_all(j,i,ichir1,ichir2,iparm)=bthet(j,i,ichir1,ichir2)
+ enddo
+ enddo
enddo
do j=0,3
polthet_all(j,i,iparm)=polthet(j,i)
#endif
#ifdef CRYST_SC
c Store the sidechain rotamer parameters
- do i=1,ntyp
- nlob_all(i,iparm)=nlob(i)
- do j=1,nlob(i)
- bsc_all(j,i,iparm)=bsc(j,i)
+ do i=-ntyp,ntyp
+ iii=iabs(i)
+ if (i.eq.0) cycle
+ nlob_all(iii,iparm)=nlob(iii)
+ do j=1,nlob(iii)
+ bsc_all(j,iii,iparm)=bsc(j,iii)
do k=1,3
censc_all(k,j,i,iparm)=censc(k,j,i)
enddo
enddo
#endif
c Store the torsional parameters
- do i=1,ntortyp
- do j=1,ntortyp
- v0_all(i,j,iparm)=v0(i,j)
- nterm_all(i,j,iparm)=nterm(i,j)
- nlor_all(i,j,iparm)=nlor(i,j)
- do k=1,nterm(i,j)
- v1_all(k,i,j,iparm)=v1(k,i,j)
- v2_all(k,i,j,iparm)=v2(i,i,j)
- enddo
- do k=1,nlor(i,j)
- vlor1_all(k,i,j,iparm)=vlor1(k,i,j)
- vlor2_all(k,i,j,iparm)=vlor2(k,i,j)
- vlor3_all(k,i,j,iparm)=vlor3(k,i,j)
- enddo
- enddo
- enddo
+ do iblock=1,2
+ do i=-ntortyp+1,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ v0_all(i,j,iblock,iparm)=v0(i,j,iblock)
+ nterm_all(i,j,iblock,iparm)=nterm(i,j,iblock)
+ nlor_all(i,j,iblock,iparm)=nlor(i,j,iblock)
+ do k=1,nterm(i,j,iblock)
+ v1_all(k,i,j,iblock,iparm)=v1(k,i,j,iblock)
+ v2_all(k,i,j,iblock,iparm)=v2(k,i,j,iblock)
+ enddo
+ do k=1,nlor(i,j,iblock)
+ vlor1_all(k,i,j,iparm)=vlor1(k,i,j)
+ vlor2_all(k,i,j,iparm)=vlor2(k,i,j)
+ vlor3_all(k,i,j,iparm)=vlor3(k,i,j)
+ enddo
+ enddo
+ enddo
+ enddo
c Store the double torsional parameters
- do i=1,ntortyp
- do j=1,ntortyp
- do k=1,ntortyp
- ntermd1_all(i,j,k,iparm)=ntermd_1(i,j,k)
- ntermd2_all(i,j,k,iparm)=ntermd_2(i,j,k)
- do l=1,ntermd_1(i,j,k)
- v1c_all(1,l,i,j,k,iparm)=v1c(1,l,i,j,k)
- v1c_all(2,l,i,j,k,iparm)=v1c(2,l,i,j,k)
- v2c_all(1,l,i,j,k,iparm)=v2c(1,l,i,j,k)
- v2c_all(2,l,i,j,k,iparm)=v2c(2,l,i,j,k)
- enddo
- do l=1,ntermd_2(i,j,k)
- do m=1,ntermd_2(i,j,k)
- v2s_all(l,m,i,j,k,iparm)=v2s(l,m,i,j,k)
- enddo
- enddo
- enddo
- enddo
+ do iblock=1,2
+ do i=-ntortyp+1,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ do k=-ntortyp+1,ntortyp-1
+ ntermd1_all(i,j,k,iblock,iparm)=ntermd_1(i,j,k,iblock)
+ ntermd2_all(i,j,k,iblock,iparm)=ntermd_2(i,j,k,iblock)
+ do l=1,ntermd_1(i,j,k,iblock)
+ v1c_all(1,l,i,j,k,iblock,iparm)=v1c(1,l,i,j,k,iblock)
+ v1c_all(2,l,i,j,k,iblock,iparm)=v1c(2,l,i,j,k,iblock)
+ v2c_all(1,l,i,j,k,iblock,iparm)=v2c(1,l,i,j,k,iblock)
+ v2c_all(2,l,i,j,k,iblock,iparm)=v2c(2,l,i,j,k,iblock)
+ enddo
+ do l=1,ntermd_2(i,j,k,iblock)
+ do m=1,ntermd_2(i,j,k,iblock)
+ v2s_all(l,m,i,j,k,iblock,iparm)=v2s(l,m,i,j,k,iblock)
+ enddo
+ enddo
+ enddo
+ enddo
+ enddo
enddo
c Store parameters of the cumulants
- do i=1,nloctyp
+ do i=-nloctyp,nloctyp
do j=1,2
b1_all(j,i,iparm)=b1(j,i)
b1tilde_all(j,i,iparm)=b1tilde(j,i)
include 'COMMON.SCROT'
include 'COMMON.SCCOR'
include 'COMMON.ALLPARM'
- integer i,j,k,l,m,mm,iparm
+ integer i,j,k,l,m,mm,iparm,ichir1,ichir2,iblock,iii
c Restore weights
wsc=ww_all(1,iparm)
enddo
c Restore bond angle parameters
#ifdef CRYST_THETA
- do i=1,ntyp
+ do i=-ntyp,ntyp
a0thet(i)=a0thet_all(i,iparm)
+
+ do ichir1=-1,1
+ do ichir2=-1,1
do j=1,2
- athet(j,i)=athet_all(j,i,iparm)
- bthet(j,i)=bthet_all(j,i,iparm)
- enddo
+ athet(j,i,ichir1,ichir2)=athet_all(j,i,ichir1,ichir2,iparm)
+ bthet(j,i,ichir1,ichir2)=bthet_all(j,i,ichir1,ichir2,iparm)
+ enddo
+ enddo
+ enddo
do j=0,3
polthet(j,i)=polthet_all(j,i,iparm)
enddo
#endif
c Restore the sidechain rotamer parameters
#ifdef CRYST_SC
- do i=1,ntyp
- nlob(i)=nlob_all(i,iparm)
- do j=1,nlob(i)
- bsc(j,i)=bsc_all(j,i,iparm)
+ do i=-ntyp,ntyp
+ if (i.eq.0) cycle
+ iii=iabs(i)
+ nlob(iii)=nlob_all(iii,iparm)
+ do j=1,nlob(iii)
+ bsc(j,iii)=bsc_all(j,iii,iparm)
do k=1,3
censc(k,j,i)=censc_all(k,j,i,iparm)
enddo
enddo
#endif
c Restore the torsional parameters
- do i=1,ntortyp
- do j=1,ntortyp
- v0(i,j)=v0_all(i,j,iparm)
- nterm(i,j)=nterm_all(i,j,iparm)
- nlor(i,j)=nlor_all(i,j,iparm)
- do k=1,nterm(i,j)
- v1(k,i,j)=v1_all(k,i,j,iparm)
- v2(i,i,j)=v2_all(k,i,j,iparm)
- enddo
- do k=1,nlor(i,j)
- vlor1(k,i,j)=vlor1_all(k,i,j,iparm)
- vlor2(k,i,j)=vlor2_all(k,i,j,iparm)
- vlor3(k,i,j)=vlor3_all(k,i,j,iparm)
- enddo
- enddo
- enddo
+ do iblock=1,2
+ do i=-ntortyp+1,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ v0(i,j,iblock)=v0_all(i,j,iblock,iparm)
+ nterm(i,j,iblock)=nterm_all(i,j,iblock,iparm)
+ nlor(i,j,iblock)=nlor_all(i,j,iblock,iparm)
+ do k=1,nterm(i,j,iblock)
+ v1(k,i,j,iblock)=v1_all(k,i,j,iblock,iparm)
+ v2(k,i,j,iblock)=v2_all(k,i,j,iblock,iparm)
+ enddo
+ do k=1,nlor(i,j,iblock)
+ vlor1(k,i,j)=vlor1_all(k,i,j,iparm)
+ vlor2(k,i,j)=vlor2_all(k,i,j,iparm)
+ vlor3(k,i,j)=vlor3_all(k,i,j,iparm)
+ enddo
+ enddo
+ enddo
+ enddo
c Restore the double torsional parameters
- do i=1,ntortyp
- do j=1,ntortyp
- do k=1,ntortyp
- ntermd_1(i,j,k)=ntermd1_all(i,j,k,iparm)
- ntermd_2(i,j,k)=ntermd2_all(i,j,k,iparm)
- do l=1,ntermd_1(i,j,k)
- v1c(1,l,i,j,k)=v1c_all(1,l,i,j,k,iparm)
- v1c(2,l,i,j,k)=v1c_all(2,l,i,j,k,iparm)
- v2c(1,l,i,j,k)=v2c_all(1,l,i,j,k,iparm)
- v2c(2,l,i,j,k)=v2c_all(2,l,i,j,k,iparm)
- enddo
- do l=1,ntermd_2(i,j,k)
- do m=1,ntermd_2(i,j,k)
- v2s(l,m,i,j,k)=v2s_all(l,m,i,j,k,iparm)
- enddo
- enddo
- enddo
- enddo
+ do iblock=1,2
+ do i=-ntortyp+1,ntortyp-1
+ do j=-ntortyp+1,ntortyp-1
+ do k=-ntortyp+1,ntortyp-1
+ ntermd_1(i,j,k,iblock)=ntermd1_all(i,j,k,iblock,iparm)
+ ntermd_2(i,j,k,iblock)=ntermd2_all(i,j,k,iblock,iparm)
+ do l=1,ntermd_1(i,j,k,iblock)
+ v1c(1,l,i,j,k,iblock)=v1c_all(1,l,i,j,k,iblock,iparm)
+ v1c(2,l,i,j,k,iblock)=v1c_all(2,l,i,j,k,iblock,iparm)
+ v2c(1,l,i,j,k,iblock)=v2c_all(1,l,i,j,k,iblock,iparm)
+ v2c(2,l,i,j,k,iblock)=v2c_all(2,l,i,j,k,iblock,iparm)
+ enddo
+ do l=1,ntermd_2(i,j,k,iblock)
+ do m=1,ntermd_2(i,j,k,iblock)
+ v2s(l,m,i,j,k,iblock)=v2s_all(l,m,i,j,k,iblock,iparm)
+ enddo
+ enddo
+ enddo
+ enddo
+ enddo
enddo
c Restore parameters of the cumulants
- do i=1,nloctyp
+ do i=-nloctyp,nloctyp
do j=1,2
b1(j,i)=b1_all(j,i,iparm)
b1tilde(j,i)=b1tilde_all(j,i,iparm)