--- /dev/null
+*.[oa]
+*~
+*.swp
--- /dev/null
+0
+0
+0
+0
--- /dev/null
+--------------------------------------------------------------------------------
+ FILE ASSIGNMENT
+--------------------------------------------------------------------------------
+ Input file : protA.inp
+ Output file : protA.out_LJ000
+
+ Sidechain potential file : ../../../../../PARAM/scinter_LJ.parm
+ SCp potential file : ../../../../../PARAM/scp.parm
+ Electrostatic potential file : ../../../../../PARAM/electr.parm
+ Cumulant coefficient file : ../../../../../PARAM/fourier_GAP.parm
+ Torsional parameter file : ../../../../../PARAM/torsion_cryst.parm
+ Double torsional parameter file :
+ ../../../../../PARAM/torsion_double_631Gdp.parm
+ SCCOR parameter file : ../../../../../PARAM/rotcorr_AM1.parm
+ Bond & inertia constant file : ../../../../../PARAM/bond.parm
+ Bending parameter file : ../../../../../PARAM/thetaml.5parm
+ Rotamer parameter file : ../../../../../PARAM/scgauss.parm
+ Threading database : ../../../../../PARAM/patterns.cart
+--------------------------------------------------------------------------------
+********************************************************************************
+United-residue force field calculation - parallel job.
+********************************************************************************
+ ### LAST MODIFIED 11/03/09 1:19PM by czarek
+ ++++ Compile info ++++
+ Version CSA and DFA only
+
+Potential is LJ , exponents are 6 12
+
+Disulfide bridge parameters:
+S-S bridge energy: -5.50
+d0cm: 3.78 akcm: 15.10
+akth: 11.00 akct: 12.00
+v1ss: -1.08 v2ss: 7.61 v3ss: 13.70
+ MPI: node= 0 iseed= -3059742
+ ran_num 0.273754117333397
+RMSDBC = 3.0
+RMSDBC1 = 0.5
+RMSDBC1MAX = 1.5
+DRMS = 0.1
+RMSDBCM = 3.0
+Time limit (min): 960.0
+ RESCALE_MODE 1
+Library routine used to diagonalize matrices.
+
+********************************************************************************
+ Options in energy minimization:
+********************************************************************************
+MaxMin: 2000 MaxFun: 5000MinMin: 2000 MinFun: 2000 TolF: 1.00000E-02 RTolF: 1.00000E-04
+
+Energy-term weights (unscaled):
+
+WSCC= 1.000000 (SC-SC)
+WSCP= 1.000000 (SC-p)
+WELEC= 1.500000 (p-p electr)
+WVDWPP= 1.500000 (p-p VDW)
+WBOND= 1.000000 (stretching)
+WANG= 0.103840 (bending)
+WSCLOC= 0.103840 (SC local)
+WTOR= 0.086170 (torsional)
+WTORD= 0.000000 (double torsional)
+WSTRAIN= 1.000000 (SS bridges & dist. cnstr.)
+WEL_LOC= 0.000000 (multi-body 3-rd order)
+WCORR4= 1.500000 (multi-body 4th order)
+WCORR5= 0.000000 (multi-body 5th order)
+WCORR6= 0.000000 (multi-body 6th order)
+WSCCOR= 1.000000 (back-scloc correlation)
+WTURN3= 0.000000 (turns, 3rd order)
+WTURN4= 0.000000 (turns, 4th order)
+WTURN6= 0.000000 (turns, 6th order)
+WDFA_D= 1.000000 (DFA, distance)
+WDFA_T= 1.000000 (DFA, torsional)
+WDFA_N= 1.000000 (DFA, number of neighbor)
+WDFA_B= 1.000000 (DFA, beta formation)
+
+Hydrogen-bonding correlation between contact pairs of peptide groups
+
+Scaling factor of 1,4 SC-p interactions: 0.400
+General scaling factor of SC-p interactions: 1.000
+
+Energy-term weights (scaled):
+
+WSCC= 1.000000 (SC-SC)
+WSCP= 1.000000 (SC-p)
+WELEC= 2.571429 (p-p electr)
+WVDWPP= 1.500000 (p-p VDW)
+WBOND= 1.000000 (stretching)
+WANG= 0.103840 (bending)
+WSCLOC= 0.103840 (SC local)
+WTOR= 0.147720 (torsional)
+WTORD= 0.000000 (double torsional)
+WSTRAIN= 1.000000 (SS bridges & dist. cnstr.)
+WEL_LOC= 0.000000 (multi-body 3-rd order)
+WCORR4= 1.616968 (multi-body 4th order)
+WCORR5= 0.000000 (multi-body 5th order)
+WCORR6= 0.000000 (multi-body 6th order)
+WSCCOR= 1.714286 (back-scloc correlatkion)
+WTURN3= 0.000000 (turns, 3rd order)
+WTURN4= 0.000000 (turns, 4th order)
+WTURN6= 0.000000 (turns, 6th order)
+WDFA_D= 1.000000 (DFA, distance)
+WDFA_T= 1.000000 (DFA, torsional)
+WDFA_N= 1.000000 (DFA, number of neighbor)
+WDFA_B= 1.000000 (DFA, beta formation)
+ Reference temperature for weights calculation: 300.000000000000
+ Parameters of the SS-bond potential:
+ D0CM 3.78000000000000 AKCM 15.1000000000000 AKTH
+ 11.0000000000000 AKCT 12.0000000000000
+ V1SS -1.08000000000000 V2SS 7.61000000000000 V3SS
+ 13.7000000000000
+ EBR -5.50000000000000
+ ITEL
+ 1 21 0
+ 2 13 1
+ 3 13 1
+ 4 14 1
+ 5 9 1
+ 6 3 1
+ 7 8 1
+ 8 15 1
+ 9 4 1
+ 10 5 1
+ 11 17 1
+ 12 5 1
+ 13 20 2
+ 14 14 1
+ 15 5 1
+ 16 14 1
+ 17 15 1
+ 18 15 1
+ 19 13 1
+ 20 18 1
+ 21 14 1
+ 22 10 1
+ 23 3 1
+ 24 4 1
+ 25 13 1
+ 26 12 1
+ 27 5 1
+ 28 19 1
+ 29 16 1
+ 30 16 1
+ 31 20 2
+ 32 12 1
+ 33 13 1
+ 34 12 1
+ 35 9 1
+ 36 14 1
+ 37 5 1
+ 38 5 1
+ 39 9 1
+ 40 15 1
+ 41 9 1
+ 42 19 1
+ 43 19 1
+ 44 5 1
+ 45 14 1
+ 46 16 1
+ 47 9 1
+ ns= 0 iss:
+Boundaries in phi angle sampling:
+D 1 -180.0 180.0
+GLN 2 -180.0 180.0
+GLN 3 -180.0 180.0
+ASN 4 -180.0 180.0
+ALA 5 -180.0 180.0
+PHE 6 -180.0 180.0
+TYR 7 -180.0 180.0
+GLU 8 -180.0 180.0
+ILE 9 -180.0 180.0
+LEU 10 -180.0 180.0
+HIS 11 -180.0 180.0
+LEU 12 -180.0 180.0
+PRO 13 -180.0 180.0
+ASN 14 -180.0 180.0
+LEU 15 -180.0 180.0
+ASN 16 -180.0 180.0
+GLU 17 -180.0 180.0
+GLU 18 -180.0 180.0
+GLN 19 -180.0 180.0
+ARG 20 -180.0 180.0
+ASN 21 -180.0 180.0
+GLY 22 -180.0 180.0
+PHE 23 -180.0 180.0
+ILE 24 -180.0 180.0
+GLN 25 -180.0 180.0
+SER 26 -180.0 180.0
+LEU 27 -180.0 180.0
+LYS 28 -180.0 180.0
+ASP 29 -180.0 180.0
+ASP 30 -180.0 180.0
+PRO 31 -180.0 180.0
+SER 32 -180.0 180.0
+GLN 33 -180.0 180.0
+SER 34 -180.0 180.0
+ALA 35 -180.0 180.0
+ASN 36 -180.0 180.0
+LEU 37 -180.0 180.0
+LEU 38 -180.0 180.0
+ALA 39 -180.0 180.0
+GLU 40 -180.0 180.0
+ALA 41 -180.0 180.0
+LYS 42 -180.0 180.0
+LYS 43 -180.0 180.0
+LEU 44 -180.0 180.0
+ASN 45 -180.0 180.0
+ASP 46 -180.0 180.0
+ALA 47 -180.0 180.0
+D 48 -180.0 180.0
+dist_dfa.dat is opened!
+Error opening dist_dfa.dat file
--- /dev/null
+ATOM 146 N GLN 10 6.514 5.664 1.428 1.00 1.00
+ATOM 147 HN GLN 10 7.446 5.967 1.464 1.00 0.00
+ATOM 148 CA GLN 10 6.189 4.203 1.357 1.00 1.00
+ATOM 149 HA GLN 10 5.240 4.096 0.869 1.00 0.00
+ATOM 150 CB GLN 10 7.294 3.444 0.565 1.00 1.00
+ATOM 151 HB1 GLN 10 6.877 2.537 0.151 1.00 0.00
+ATOM 152 HB2 GLN 10 8.104 3.185 1.227 1.00 0.00
+ATOM 153 CG GLN 10 7.833 4.313 -0.568 1.00 1.00
+ATOM 154 HG1 GLN 10 8.657 3.806 -1.050 1.00 0.00
+ATOM 155 HG2 GLN 10 8.180 5.247 -0.172 1.00 0.00
+ATOM 156 CD GLN 10 6.731 4.567 -1.601 1.00 1.00
+ATOM 157 OE1 GLN 10 5.589 4.205 -1.413 1.00 1.00
+ATOM 158 NE2 GLN 10 7.034 5.175 -2.716 1.00 1.00
+ATOM 159 HE21 GLN 10 7.955 5.462 -2.883 1.00 0.00
+ATOM 160 HE22 GLN 10 6.339 5.343 -3.386 1.00 0.00
+ATOM 161 C GLN 10 6.071 3.571 2.746 1.00 1.00
+ATOM 162 O GLN 10 4.990 3.264 3.204 1.00 1.00
+ATOM 163 N GLN 11 7.188 3.395 3.381 1.00 1.00
+ATOM 164 HN GLN 11 8.021 3.685 2.975 1.00 0.00
+ATOM 165 CA GLN 11 7.192 2.779 4.731 1.00 1.00
+ATOM 166 HA GLN 11 7.059 1.704 4.624 1.00 0.00
+ATOM 167 CB GLN 11 8.551 3.094 5.412 1.00 1.00
+ATOM 168 HB1 GLN 11 9.046 2.169 5.668 1.00 0.00
+ATOM 169 HB2 GLN 11 8.375 3.656 6.316 1.00 0.00
+ATOM 170 CG GLN 11 9.462 3.918 4.466 1.00 1.00
+ATOM 171 HG1 GLN 11 9.589 3.405 3.522 1.00 0.00
+ATOM 172 HG2 GLN 11 10.437 4.052 4.920 1.00 0.00
+ATOM 173 CD GLN 11 8.835 5.295 4.225 1.00 1.00
+ATOM 174 OE1 GLN 11 8.616 6.059 5.145 1.00 1.00
+ATOM 175 NE2 GLN 11 8.531 5.649 3.007 1.00 1.00
+ATOM 176 HE21 GLN 11 8.705 5.037 2.262 1.00 0.00
+ATOM 177 HE22 GLN 11 8.130 6.527 2.838 1.00 0.00
+ATOM 178 C GLN 11 6.060 3.329 5.602 1.00 1.00
+ATOM 179 O GLN 11 5.210 2.587 6.097 1.00 1.00
+ATOM 180 N ASN 12 6.060 4.614 5.763 1.00 1.00
+ATOM 181 HN ASN 12 6.752 5.162 5.330 1.00 0.00
+ATOM 182 CA ASN 12 5.013 5.253 6.593 1.00 1.00
+ATOM 183 HA ASN 12 5.149 4.943 7.626 1.00 0.00
+ATOM 184 CB ASN 12 5.161 6.773 6.458 1.00 1.00
+ATOM 185 HB1 ASN 12 5.658 7.171 7.331 1.00 0.00
+ATOM 186 HB2 ASN 12 4.185 7.228 6.365 1.00 0.00
+ATOM 187 CG ASN 12 5.993 7.098 5.208 1.00 1.00
+ATOM 188 OD1 ASN 12 6.834 7.976 5.223 1.00 1.00
+ATOM 189 ND2 ASN 12 5.792 6.418 4.103 1.00 1.00
+ATOM 190 HD21 ASN 12 5.115 5.709 4.076 1.00 0.00
+ATOM 191 HD22 ASN 12 6.320 6.619 3.303 1.00 0.00
+ATOM 192 C ASN 12 3.611 4.863 6.148 1.00 1.00
+ATOM 193 O ASN 12 2.818 4.389 6.938 1.00 1.00
+ATOM 194 N ALA 13 3.322 5.067 4.897 1.00 1.00
+ATOM 195 HN ALA 13 3.986 5.445 4.289 1.00 0.00
+ATOM 196 CA ALA 13 1.971 4.716 4.407 1.00 1.00
+ATOM 197 HA ALA 13 1.240 5.309 4.952 1.00 0.00
+ATOM 198 CB ALA 13 1.891 5.014 2.916 1.00 1.00
+ATOM 199 HB1 ALA 13 1.899 6.082 2.753 1.00 0.00
+ATOM 200 HB2 ALA 13 0.976 4.601 2.522 1.00 0.00
+ATOM 201 HB3 ALA 13 2.733 4.568 2.408 1.00 0.00
+ATOM 202 C ALA 13 1.656 3.246 4.622 1.00 1.00
+ATOM 203 O ALA 13 0.611 2.924 5.124 1.00 1.00
+ATOM 204 N PHE 14 2.561 2.380 4.232 1.00 1.00
+ATOM 205 HN PHE 14 3.396 2.687 3.826 1.00 0.00
+ATOM 206 CA PHE 14 2.306 0.920 4.418 1.00 1.00
+ATOM 207 HA PHE 14 1.645 0.558 3.616 1.00 0.00
+ATOM 208 CB PHE 14 3.660 0.180 4.383 1.00 1.00
+ATOM 209 HB1 PHE 14 4.432 0.814 4.787 1.00 0.00
+ATOM 210 HB2 PHE 14 3.908 -0.071 3.363 1.00 0.00
+ATOM 211 CG PHE 14 3.584 -1.110 5.214 1.00 1.00
+ATOM 212 CD1 PHE 14 4.614 -1.448 6.077 1.00 1.00
+ATOM 213 HD1 PHE 14 5.472 -0.796 6.170 1.00 0.00
+ATOM 214 CD2 PHE 14 2.492 -1.960 5.108 1.00 1.00
+ATOM 215 HD2 PHE 14 1.679 -1.709 4.444 1.00 0.00
+ATOM 216 CE1 PHE 14 4.554 -2.612 6.816 1.00 1.00
+ATOM 217 HE1 PHE 14 5.364 -2.869 7.484 1.00 0.00
+ATOM 218 CE2 PHE 14 2.438 -3.123 5.849 1.00 1.00
+ATOM 219 HE2 PHE 14 1.584 -3.779 5.760 1.00 0.00
+ATOM 220 CZ PHE 14 3.467 -3.446 6.704 1.00 1.00
+ATOM 221 HZ PHE 14 3.421 -4.354 7.288 1.00 0.00
+ATOM 222 C PHE 14 1.626 0.668 5.750 1.00 1.00
+ATOM 223 O PHE 14 0.516 0.173 5.790 1.00 1.00
+ATOM 224 N TYR 15 2.262 1.044 6.823 1.00 1.00
+ATOM 225 HN TYR 15 3.150 1.491 6.768 1.00 0.00
+ATOM 226 CA TYR 15 1.603 0.795 8.131 1.00 1.00
+ATOM 227 HA TYR 15 1.595 -0.283 8.311 1.00 0.00
+ATOM 228 CB TYR 15 2.371 1.539 9.235 1.00 1.00
+ATOM 229 HB1 TYR 15 1.846 1.441 10.173 1.00 0.00
+ATOM 230 HB2 TYR 15 2.453 2.584 8.982 1.00 0.00
+ATOM 231 CG TYR 15 3.771 0.941 9.376 1.00 1.00
+ATOM 232 CD1 TYR 15 3.939 -0.344 9.849 1.00 1.00
+ATOM 233 HD1 TYR 15 3.076 -0.932 10.124 1.00 0.00
+ATOM 234 CD2 TYR 15 4.888 1.680 9.035 1.00 1.00
+ATOM 235 HD2 TYR 15 4.772 2.687 8.666 1.00 0.00
+ATOM 236 CE1 TYR 15 5.204 -0.882 9.980 1.00 1.00
+ATOM 237 HE1 TYR 15 5.322 -1.889 10.351 1.00 0.00
+ATOM 238 CE2 TYR 15 6.151 1.142 9.167 1.00 1.00
+ATOM 239 HE2 TYR 15 7.016 1.730 8.897 1.00 0.00
+ATOM 240 CZ TYR 15 6.318 -0.142 9.640 1.00 1.00
+ATOM 241 OH TYR 15 7.582 -0.679 9.771 1.00 1.00
+ATOM 242 HH TYR 15 8.128 -0.329 9.064 1.00 0.00
+ATOM 243 C TYR 15 0.156 1.291 8.111 1.00 1.00
+ATOM 244 O TYR 15 -0.700 0.737 8.771 1.00 1.00
+ATOM 245 N GLU 16 -0.091 2.325 7.354 1.00 1.00
+ATOM 246 HN GLU 16 0.630 2.755 6.856 1.00 0.00
+ATOM 247 CA GLU 16 -1.480 2.859 7.281 1.00 1.00
+ATOM 248 HA GLU 16 -1.928 2.796 8.272 1.00 0.00
+ATOM 249 CB GLU 16 -1.422 4.321 6.809 1.00 1.00
+ATOM 250 HB1 GLU 16 -2.406 4.760 6.872 1.00 0.00
+ATOM 251 HB2 GLU 16 -1.084 4.364 5.788 1.00 0.00
+ATOM 252 CG GLU 16 -0.455 5.098 7.707 1.00 1.00
+ATOM 253 HG1 GLU 16 0.524 5.130 7.251 1.00 0.00
+ATOM 254 HG2 GLU 16 -0.384 4.616 8.672 1.00 0.00
+ATOM 255 CD GLU 16 -0.976 6.525 7.891 1.00 1.00
+ATOM 256 OE1 GLU 16 -1.834 6.681 8.744 1.00 1.00
+ATOM 257 OE2 GLU 16 -0.485 7.377 7.170 1.00 1.00
+ATOM 258 C GLU 16 -2.342 2.047 6.298 1.00 1.00
+ATOM 259 O GLU 16 -3.448 1.674 6.620 1.00 1.00
+ATOM 260 N ILE 17 -1.818 1.794 5.114 1.00 1.00
+ATOM 261 HN ILE 17 -0.927 2.116 4.892 1.00 0.00
+ATOM 262 CA ILE 17 -2.605 1.006 4.111 1.00 1.00
+ATOM 263 HA ILE 17 -3.345 1.651 3.644 1.00 0.00
+ATOM 264 CB ILE 17 -1.631 0.419 3.058 1.00 1.00
+ATOM 265 HB ILE 17 -0.966 -0.293 3.547 1.00 0.00
+ATOM 266 CG1 ILE 17 -0.798 1.518 2.432 1.00 1.00
+ATOM 267 HG11 ILE 17 -0.184 1.979 3.181 1.00 0.00
+ATOM 268 HG12 ILE 17 -1.447 2.260 1.999 1.00 0.00
+ATOM 269 CG2 ILE 17 -2.427 -0.268 1.920 1.00 1.00
+ATOM 270 HG21 ILE 17 -2.438 0.370 1.040 1.00 0.00
+ATOM 271 HG22 ILE 17 -3.444 -0.460 2.224 1.00 0.00
+ATOM 272 HG23 ILE 17 -1.952 -1.210 1.664 1.00 0.00
+ATOM 273 CD1 ILE 17 0.091 0.910 1.342 1.00 1.00
+ATOM 274 HD11 ILE 17 0.123 -0.163 1.448 1.00 0.00
+ATOM 275 HD12 ILE 17 1.085 1.298 1.433 1.00 0.00
+ATOM 276 HD13 ILE 17 -0.302 1.159 0.366 1.00 0.00
+ATOM 277 C ILE 17 -3.309 -0.158 4.785 1.00 1.00
+ATOM 278 O ILE 17 -4.378 -0.556 4.381 1.00 1.00
+ATOM 279 N LEU 18 -2.710 -0.667 5.820 1.00 1.00
+ATOM 280 HN LEU 18 -1.850 -0.293 6.137 1.00 0.00
+ATOM 281 CA LEU 18 -3.334 -1.820 6.517 1.00 1.00
+ATOM 282 HA LEU 18 -3.803 -2.452 5.770 1.00 0.00
+ATOM 283 CB LEU 18 -2.218 -2.574 7.236 1.00 1.00
+ATOM 284 HB1 LEU 18 -2.621 -3.164 8.039 1.00 0.00
+ATOM 285 HB2 LEU 18 -1.525 -1.859 7.641 1.00 0.00
+ATOM 286 CG LEU 18 -1.489 -3.481 6.221 1.00 1.00
+ATOM 287 HG LEU 18 -0.615 -3.910 6.689 1.00 0.00
+ATOM 288 CD1 LEU 18 -1.055 -2.625 5.016 1.00 1.00
+ATOM 289 HD11 LEU 18 -0.354 -3.169 4.412 1.00 0.00
+ATOM 290 HD12 LEU 18 -0.590 -1.734 5.365 1.00 0.00
+ATOM 291 HD13 LEU 18 -1.909 -2.357 4.417 1.00 0.00
+ATOM 292 CD2 LEU 18 -2.428 -4.619 5.748 1.00 1.00
+ATOM 293 HD21 LEU 18 -1.916 -5.565 5.817 1.00 0.00
+ATOM 294 HD22 LEU 18 -2.727 -4.456 4.720 1.00 0.00
+ATOM 295 HD23 LEU 18 -3.311 -4.649 6.370 1.00 0.00
+ATOM 296 C LEU 18 -4.404 -1.396 7.513 1.00 1.00
+ATOM 297 O LEU 18 -4.560 -1.998 8.559 1.00 1.00
+ATOM 298 N HIS 19 -5.117 -0.367 7.165 1.00 1.00
+ATOM 299 HN HIS 19 -4.916 0.099 6.331 1.00 0.00
+ATOM 300 CA HIS 19 -6.201 0.118 8.071 1.00 1.00
+ATOM 301 HA HIS 19 -6.433 -0.675 8.779 1.00 0.00
+ATOM 302 CB HIS 19 -5.693 1.341 8.815 1.00 1.00
+ATOM 303 HB1 HIS 19 -6.507 1.851 9.298 1.00 0.00
+ATOM 304 HB2 HIS 19 -5.191 2.012 8.138 1.00 0.00
+ATOM 305 CG HIS 19 -4.719 0.842 9.859 1.00 1.00
+ATOM 306 ND1 HIS 19 -3.529 1.186 9.944 1.00 1.00
+ATOM 307 HD1 HIS 19 -3.106 1.865 9.377 1.00 0.00
+ATOM 308 CD2 HIS 19 -4.900 -0.112 10.840 1.00 1.00
+ATOM 309 HD2 HIS 19 -5.820 -0.640 11.038 1.00 0.00
+ATOM 310 CE1 HIS 19 -2.937 0.552 10.861 1.00 1.00
+ATOM 311 HE1 HIS 19 -1.911 0.667 11.080 1.00 0.00
+ATOM 312 NE2 HIS 19 -3.736 -0.300 11.492 1.00 1.00
+ATOM 313 C HIS 19 -7.475 0.474 7.287 1.00 1.00
+ATOM 314 O HIS 19 -8.558 0.480 7.831 1.00 1.00
+ATOM 315 N LEU 20 -7.307 0.749 6.019 1.00 1.00
+ATOM 316 HN LEU 20 -6.409 0.719 5.632 1.00 0.00
+ATOM 317 CA LEU 20 -8.470 1.107 5.152 1.00 1.00
+ATOM 318 HA LEU 20 -8.716 2.138 5.313 1.00 0.00
+ATOM 319 CB LEU 20 -7.992 0.901 3.730 1.00 1.00
+ATOM 320 HB1 LEU 20 -8.808 1.051 3.040 1.00 0.00
+ATOM 321 HB2 LEU 20 -7.616 -0.103 3.636 1.00 0.00
+ATOM 322 CG LEU 20 -6.855 1.906 3.448 1.00 1.00
+ATOM 323 HG LEU 20 -6.110 1.834 4.229 1.00 0.00
+ATOM 324 CD1 LEU 20 -7.414 3.336 3.414 1.00 1.00
+ATOM 325 HD11 LEU 20 -8.451 3.324 3.115 1.00 0.00
+ATOM 326 HD12 LEU 20 -6.849 3.927 2.710 1.00 0.00
+ATOM 327 HD13 LEU 20 -7.333 3.783 4.394 1.00 0.00
+ATOM 328 CD2 LEU 20 -6.208 1.594 2.099 1.00 1.00
+ATOM 329 HD21 LEU 20 -6.909 1.795 1.304 1.00 0.00
+ATOM 330 HD22 LEU 20 -5.917 0.555 2.065 1.00 0.00
+ATOM 331 HD23 LEU 20 -5.331 2.213 1.964 1.00 0.00
+ATOM 332 C LEU 20 -9.703 0.176 5.430 1.00 1.00
+ATOM 333 O LEU 20 -9.779 -0.931 4.903 1.00 1.00
+ATOM 334 N PRO 21 -10.694 0.676 6.188 1.00 1.00
+ATOM 335 CA PRO 21 -11.882 -0.127 6.533 1.00 1.00
+ATOM 336 HA PRO 21 -11.578 -1.074 6.961 1.00 0.00
+ATOM 337 CB PRO 21 -12.624 0.729 7.579 1.00 1.00
+ATOM 338 HB1 PRO 21 -12.495 0.305 8.564 1.00 0.00
+ATOM 339 HB2 PRO 21 -13.677 0.773 7.340 1.00 0.00
+ATOM 340 CG PRO 21 -12.008 2.158 7.530 1.00 1.00
+ATOM 341 HG1 PRO 21 -11.761 2.494 8.522 1.00 0.00
+ATOM 342 HG2 PRO 21 -12.706 2.848 7.074 1.00 0.00
+ATOM 343 CD PRO 21 -10.743 2.076 6.680 1.00 1.00
+ATOM 344 HD1 PRO 21 -10.819 2.762 5.845 1.00 0.00
+ATOM 345 HD2 PRO 21 -9.876 2.304 7.277 1.00 0.00
+ATOM 346 C PRO 21 -12.832 -0.363 5.365 1.00 1.00
+ATOM 347 O PRO 21 -13.766 -1.130 5.490 1.00 1.00
+ATOM 348 N ASN 22 -12.589 0.277 4.256 1.00 1.00
+ATOM 349 HN ASN 22 -11.824 0.885 4.185 1.00 0.00
+ATOM 350 CA ASN 22 -13.506 0.082 3.107 1.00 1.00
+ATOM 351 HA ASN 22 -14.473 -0.233 3.487 1.00 0.00
+ATOM 352 CB ASN 22 -13.651 1.427 2.392 1.00 1.00
+ATOM 353 HB1 ASN 22 -14.550 1.917 2.729 1.00 0.00
+ATOM 354 HB2 ASN 22 -13.706 1.271 1.324 1.00 0.00
+ATOM 355 CG ASN 22 -12.445 2.314 2.714 1.00 1.00
+ATOM 356 OD1 ASN 22 -11.319 1.989 2.395 1.00 1.00
+ATOM 357 ND2 ASN 22 -12.638 3.442 3.343 1.00 1.00
+ATOM 358 HD21 ASN 22 -13.545 3.711 3.601 1.00 0.00
+ATOM 359 HD22 ASN 22 -11.878 4.020 3.558 1.00 0.00
+ATOM 360 C ASN 22 -13.030 -0.959 2.090 1.00 1.00
+ATOM 361 O ASN 22 -13.647 -1.087 1.051 1.00 1.00
+ATOM 362 N LEU 23 -11.959 -1.690 2.373 1.00 1.00
+ATOM 363 HN LEU 23 -11.438 -1.546 3.199 1.00 0.00
+ATOM 364 CA LEU 23 -11.517 -2.699 1.361 1.00 1.00
+ATOM 365 HA LEU 23 -12.284 -2.817 0.605 1.00 0.00
+ATOM 366 CB LEU 23 -10.203 -2.249 0.715 1.00 1.00
+ATOM 367 HB1 LEU 23 -10.229 -2.495 -0.329 1.00 0.00
+ATOM 368 HB2 LEU 23 -9.394 -2.785 1.174 1.00 0.00
+ATOM 369 CG LEU 23 -9.963 -0.747 0.877 1.00 1.00
+ATOM 370 HG LEU 23 -10.183 -0.432 1.879 1.00 0.00
+ATOM 371 CD1 LEU 23 -8.485 -0.470 0.583 1.00 1.00
+ATOM 372 HD11 LEU 23 -8.080 -1.257 -0.019 1.00 0.00
+ATOM 373 HD12 LEU 23 -7.941 -0.436 1.489 1.00 0.00
+ATOM 374 HD13 LEU 23 -8.376 0.471 0.079 1.00 0.00
+ATOM 375 CD2 LEU 23 -10.854 0.009 -0.116 1.00 1.00
+ATOM 376 HD21 LEU 23 -10.348 0.113 -1.063 1.00 0.00
+ATOM 377 HD22 LEU 23 -11.086 0.986 0.275 1.00 0.00
+ATOM 378 HD23 LEU 23 -11.771 -0.537 -0.267 1.00 0.00
+ATOM 379 C LEU 23 -11.224 -4.056 1.955 1.00 1.00
+ATOM 380 O LEU 23 -10.995 -4.198 3.141 1.00 1.00
+ATOM 381 N ASN 24 -11.245 -5.043 1.091 1.00 1.00
+ATOM 382 HN ASN 24 -11.460 -4.869 0.151 1.00 0.00
+ATOM 383 CA ASN 24 -10.949 -6.410 1.539 1.00 1.00
+ATOM 384 HA ASN 24 -11.210 -6.509 2.581 1.00 0.00
+ATOM 385 CB ASN 24 -11.707 -7.413 0.675 1.00 1.00
+ATOM 386 HB1 ASN 24 -12.584 -7.761 1.199 1.00 0.00
+ATOM 387 HB2 ASN 24 -11.064 -8.256 0.451 1.00 0.00
+ATOM 388 CG ASN 24 -12.127 -6.734 -0.617 1.00 1.00
+ATOM 389 OD1 ASN 24 -12.974 -5.864 -0.626 1.00 1.00
+ATOM 390 ND2 ASN 24 -11.566 -7.092 -1.725 1.00 1.00
+ATOM 391 HD21 ASN 24 -10.882 -7.795 -1.726 1.00 0.00
+ATOM 392 HD22 ASN 24 -11.819 -6.659 -2.552 1.00 0.00
+ATOM 393 C ASN 24 -9.464 -6.619 1.370 1.00 1.00
+ATOM 394 O ASN 24 -8.818 -5.864 0.651 1.00 1.00
+ATOM 395 N GLU 25 -8.930 -7.628 1.971 1.00 1.00
+ATOM 396 HN GLU 25 -9.474 -8.257 2.491 1.00 0.00
+ATOM 397 CA GLU 25 -7.477 -7.810 1.818 1.00 1.00
+ATOM 398 HA GLU 25 -7.049 -6.828 1.710 1.00 0.00
+ATOM 399 CB GLU 25 -6.898 -8.462 3.058 1.00 1.00
+ATOM 400 HB1 GLU 25 -6.529 -9.451 2.822 1.00 0.00
+ATOM 401 HB2 GLU 25 -7.652 -8.530 3.829 1.00 0.00
+ATOM 402 CG GLU 25 -5.748 -7.566 3.523 1.00 1.00
+ATOM 403 HG1 GLU 25 -6.135 -6.588 3.804 1.00 0.00
+ATOM 404 HG2 GLU 25 -5.039 -7.443 2.712 1.00 0.00
+ATOM 405 CD GLU 25 -5.045 -8.203 4.723 1.00 1.00
+ATOM 406 OE1 GLU 25 -3.852 -8.414 4.598 1.00 1.00
+ATOM 407 OE2 GLU 25 -5.741 -8.441 5.695 1.00 1.00
+ATOM 408 C GLU 25 -7.076 -8.589 0.589 1.00 1.00
+ATOM 409 O GLU 25 -5.932 -8.543 0.211 1.00 1.00
+ATOM 410 N GLU 26 -7.977 -9.294 -0.024 1.00 1.00
+ATOM 411 HN GLU 26 -8.902 -9.337 0.297 1.00 0.00
+ATOM 412 CA GLU 26 -7.543 -10.030 -1.233 1.00 1.00
+ATOM 413 HA GLU 26 -6.855 -10.827 -0.941 1.00 0.00
+ATOM 414 CB GLU 26 -8.777 -10.586 -1.967 1.00 1.00
+ATOM 415 HB1 GLU 26 -9.090 -9.891 -2.733 1.00 0.00
+ATOM 416 HB2 GLU 26 -9.585 -10.729 -1.265 1.00 0.00
+ATOM 417 CG GLU 26 -8.408 -11.927 -2.608 1.00 1.00
+ATOM 418 HG1 GLU 26 -8.288 -12.677 -1.840 1.00 0.00
+ATOM 419 HG2 GLU 26 -7.482 -11.828 -3.155 1.00 0.00
+ATOM 420 CD GLU 26 -9.518 -12.361 -3.568 1.00 1.00
+ATOM 421 OE1 GLU 26 -9.194 -13.137 -4.452 1.00 1.00
+ATOM 422 OE2 GLU 26 -10.626 -11.895 -3.364 1.00 1.00
+ATOM 423 C GLU 26 -6.813 -9.041 -2.135 1.00 1.00
+ATOM 424 O GLU 26 -5.678 -9.256 -2.536 1.00 1.00
+ATOM 425 N GLN 27 -7.466 -7.940 -2.384 1.00 1.00
+ATOM 426 HN GLN 27 -8.354 -7.799 -1.996 1.00 0.00
+ATOM 427 CA GLN 27 -6.854 -6.903 -3.239 1.00 1.00
+ATOM 428 HA GLN 27 -6.434 -7.372 -4.127 1.00 0.00
+ATOM 429 CB GLN 27 -7.926 -5.862 -3.614 1.00 1.00
+ATOM 430 HB1 GLN 27 -7.599 -5.309 -4.481 1.00 0.00
+ATOM 431 HB2 GLN 27 -8.066 -5.176 -2.792 1.00 0.00
+ATOM 432 CG GLN 27 -9.253 -6.562 -3.928 1.00 1.00
+ATOM 433 HG1 GLN 27 -10.002 -5.825 -4.180 1.00 0.00
+ATOM 434 HG2 GLN 27 -9.587 -7.123 -3.072 1.00 0.00
+ATOM 435 CD GLN 27 -9.057 -7.509 -5.113 1.00 1.00
+ATOM 436 OE1 GLN 27 -8.364 -8.502 -5.021 1.00 1.00
+ATOM 437 NE2 GLN 27 -9.652 -7.239 -6.243 1.00 1.00
+ATOM 438 HE21 GLN 27 -10.215 -6.440 -6.322 1.00 0.00
+ATOM 439 HE22 GLN 27 -9.536 -7.834 -7.012 1.00 0.00
+ATOM 440 C GLN 27 -5.744 -6.197 -2.470 1.00 1.00
+ATOM 441 O GLN 27 -4.635 -6.039 -2.968 1.00 1.00
+ATOM 442 N ARG 28 -6.053 -5.777 -1.257 1.00 1.00
+ATOM 443 HN ARG 28 -6.959 -5.918 -0.885 1.00 0.00
+ATOM 444 CA ARG 28 -5.011 -5.088 -0.467 1.00 1.00
+ATOM 445 HA ARG 28 -4.693 -4.232 -1.000 1.00 0.00
+ATOM 446 CB ARG 28 -5.567 -4.708 0.910 1.00 1.00
+ATOM 447 HB1 ARG 28 -5.231 -5.415 1.643 1.00 0.00
+ATOM 448 HB2 ARG 28 -6.646 -4.708 0.878 1.00 0.00
+ATOM 449 CG ARG 28 -5.070 -3.315 1.289 1.00 1.00
+ATOM 450 HG1 ARG 28 -5.641 -2.568 0.763 1.00 0.00
+ATOM 451 HG2 ARG 28 -4.029 -3.217 1.026 1.00 0.00
+ATOM 452 CD ARG 28 -5.238 -3.121 2.792 1.00 1.00
+ATOM 453 HD1 ARG 28 -5.455 -2.087 3.003 1.00 0.00
+ATOM 454 HD2 ARG 28 -4.333 -3.412 3.306 1.00 0.00
+ATOM 455 NE ARG 28 -6.369 -3.966 3.263 1.00 1.00
+ATOM 456 HE ARG 28 -6.931 -4.442 2.619 1.00 0.00
+ATOM 457 CZ ARG 28 -6.608 -4.063 4.539 1.00 1.00
+ATOM 458 NH1 ARG 28 -5.723 -4.641 5.303 1.00 1.00
+ATOM 459 HH11 ARG 28 -4.876 -4.998 4.905 1.00 0.00
+ATOM 460 HH12 ARG 28 -5.890 -4.727 6.285 1.00 0.00
+ATOM 461 NH2 ARG 28 -7.727 -3.580 5.011 1.00 1.00
+ATOM 462 HH21 ARG 28 -8.384 -3.143 4.393 1.00 0.00
+ATOM 463 HH22 ARG 28 -7.927 -3.645 5.987 1.00 0.00
+ATOM 464 C ARG 28 -3.823 -5.971 -0.311 1.00 1.00
+ATOM 465 O ARG 28 -2.769 -5.652 -0.819 1.00 1.00
+ATOM 466 N ASN 29 -3.988 -7.059 0.386 1.00 1.00
+ATOM 467 HN ASN 29 -4.850 -7.260 0.803 1.00 0.00
+ATOM 468 CA ASN 29 -2.840 -7.965 0.553 1.00 1.00
+ATOM 469 HA ASN 29 -2.160 -7.557 1.305 1.00 0.00
+ATOM 470 CB ASN 29 -3.342 -9.361 0.949 1.00 1.00
+ATOM 471 HB1 ASN 29 -3.977 -9.753 0.173 1.00 0.00
+ATOM 472 HB2 ASN 29 -3.895 -9.306 1.874 1.00 0.00
+ATOM 473 CG ASN 29 -2.147 -10.296 1.125 1.00 1.00
+ATOM 474 OD1 ASN 29 -1.296 -10.087 1.966 1.00 1.00
+ATOM 475 ND2 ASN 29 -2.047 -11.340 0.347 1.00 1.00
+ATOM 476 HD21 ASN 29 -2.732 -11.511 -0.333 1.00 0.00
+ATOM 477 HD22 ASN 29 -1.289 -11.951 0.443 1.00 0.00
+ATOM 478 C ASN 29 -2.111 -8.078 -0.763 1.00 1.00
+ATOM 479 O ASN 29 -0.942 -8.236 -0.792 1.00 1.00
+ATOM 480 N GLY 30 -2.829 -7.953 -1.841 1.00 1.00
+ATOM 481 HN GLY 30 -3.799 -7.793 -1.787 1.00 0.00
+ATOM 482 CA GLY 30 -2.163 -8.055 -3.155 1.00 1.00
+ATOM 483 HA1 GLY 30 -2.886 -7.864 -3.935 1.00 0.00
+ATOM 484 HA2 GLY 30 -1.770 -9.055 -3.278 1.00 0.00
+ATOM 485 C GLY 30 -1.013 -7.042 -3.276 1.00 1.00
+ATOM 486 O GLY 30 0.172 -7.412 -3.216 1.00 1.00
+ATOM 487 N PHE 31 -1.353 -5.773 -3.391 1.00 1.00
+ATOM 488 HN PHE 31 -2.301 -5.492 -3.360 1.00 0.00
+ATOM 489 CA PHE 31 -0.258 -4.785 -3.533 1.00 1.00
+ATOM 490 HA PHE 31 0.247 -5.001 -4.471 1.00 0.00
+ATOM 491 CB PHE 31 -0.764 -3.302 -3.545 1.00 1.00
+ATOM 492 HB1 PHE 31 -0.863 -2.973 -4.547 1.00 0.00
+ATOM 493 HB2 PHE 31 -0.029 -2.690 -3.053 1.00 0.00
+ATOM 494 CG PHE 31 -2.076 -3.039 -2.858 1.00 1.00
+ATOM 495 CD1 PHE 31 -3.267 -3.186 -3.534 1.00 1.00
+ATOM 496 HD1 PHE 31 -3.289 -3.700 -4.483 1.00 0.00
+ATOM 497 CD2 PHE 31 -2.082 -2.393 -1.640 1.00 1.00
+ATOM 498 HD2 PHE 31 -1.165 -2.271 -1.097 1.00 0.00
+ATOM 499 CE1 PHE 31 -4.427 -2.678 -3.000 1.00 1.00
+ATOM 500 HE1 PHE 31 -5.349 -2.800 -3.520 1.00 0.00
+ATOM 501 CE2 PHE 31 -3.238 -1.896 -1.124 1.00 1.00
+ATOM 502 HE2 PHE 31 -3.230 -1.398 -0.198 1.00 0.00
+ATOM 503 CZ PHE 31 -4.399 -2.028 -1.786 1.00 1.00
+ATOM 504 HZ PHE 31 -5.298 -1.656 -1.343 1.00 0.00
+ATOM 505 C PHE 31 0.773 -4.897 -2.432 1.00 1.00
+ATOM 506 O PHE 31 1.942 -5.149 -2.673 1.00 1.00
+ATOM 507 N ILE 32 0.344 -4.746 -1.251 1.00 1.00
+ATOM 508 HN ILE 32 -0.605 -4.608 -1.078 1.00 0.00
+ATOM 509 CA ILE 32 1.310 -4.819 -0.162 1.00 1.00
+ATOM 510 HA ILE 32 2.084 -4.088 -0.379 1.00 0.00
+ATOM 511 CB ILE 32 0.626 -4.452 1.126 1.00 1.00
+ATOM 512 HB ILE 32 1.064 -5.019 1.940 1.00 0.00
+ATOM 513 CG1 ILE 32 -0.865 -4.752 1.027 1.00 1.00
+ATOM 514 HG11 ILE 32 -0.996 -5.740 0.644 1.00 0.00
+ATOM 515 HG12 ILE 32 -1.335 -4.051 0.366 1.00 0.00
+ATOM 516 CG2 ILE 32 0.840 -2.947 1.306 1.00 1.00
+ATOM 517 HG21 ILE 32 0.598 -2.438 0.383 1.00 0.00
+ATOM 518 HG22 ILE 32 1.874 -2.758 1.547 1.00 0.00
+ATOM 519 HG23 ILE 32 0.216 -2.575 2.091 1.00 0.00
+ATOM 520 CD1 ILE 32 -1.517 -4.646 2.399 1.00 1.00
+ATOM 521 HD11 ILE 32 -0.842 -4.993 3.162 1.00 0.00
+ATOM 522 HD12 ILE 32 -2.410 -5.242 2.422 1.00 0.00
+ATOM 523 HD13 ILE 32 -1.776 -3.623 2.588 1.00 0.00
+ATOM 524 C ILE 32 1.982 -6.170 -0.026 1.00 1.00
+ATOM 525 O ILE 32 3.148 -6.218 0.292 1.00 1.00
+ATOM 526 N GLN 33 1.279 -7.247 -0.267 1.00 1.00
+ATOM 527 HN GLN 33 0.348 -7.192 -0.532 1.00 0.00
+ATOM 528 CA GLN 33 1.976 -8.551 -0.119 1.00 1.00
+ATOM 529 HA GLN 33 2.164 -8.704 0.942 1.00 0.00
+ATOM 530 CB GLN 33 1.158 -9.717 -0.719 1.00 1.00
+ATOM 531 HB1 GLN 33 0.785 -9.441 -1.695 1.00 0.00
+ATOM 532 HB2 GLN 33 0.331 -9.956 -0.068 1.00 0.00
+ATOM 533 CG GLN 33 2.058 -10.953 -0.851 1.00 1.00
+ATOM 534 HG1 GLN 33 2.642 -11.077 0.050 1.00 0.00
+ATOM 535 HG2 GLN 33 2.722 -10.839 -1.694 1.00 0.00
+ATOM 536 CD GLN 33 1.186 -12.190 -1.064 1.00 1.00
+ATOM 537 OE1 GLN 33 0.550 -12.345 -2.087 1.00 1.00
+ATOM 538 NE2 GLN 33 1.131 -13.095 -0.127 1.00 1.00
+ATOM 539 HE21 GLN 33 1.644 -12.977 0.699 1.00 0.00
+ATOM 540 HE22 GLN 33 0.575 -13.893 -0.248 1.00 0.00
+ATOM 541 C GLN 33 3.292 -8.473 -0.831 1.00 1.00
+ATOM 542 O GLN 33 4.262 -9.081 -0.423 1.00 1.00
+ATOM 543 N SER 34 3.318 -7.718 -1.896 1.00 1.00
+ATOM 544 HN SER 34 2.496 -7.238 -2.215 1.00 0.00
+ATOM 545 CA SER 34 4.593 -7.600 -2.617 1.00 1.00
+ATOM 546 HA SER 34 5.064 -8.582 -2.662 1.00 0.00
+ATOM 547 CB SER 34 4.326 -7.054 -4.019 1.00 1.00
+ATOM 548 HB1 SER 34 4.633 -7.767 -4.770 1.00 0.00
+ATOM 549 HB2 SER 34 4.832 -6.114 -4.165 1.00 0.00
+ATOM 550 OG SER 34 2.917 -6.880 -4.056 1.00 1.00
+ATOM 551 HG SER 34 2.521 -7.717 -4.309 1.00 0.00
+ATOM 552 C SER 34 5.513 -6.643 -1.856 1.00 1.00
+ATOM 553 O SER 34 6.709 -6.824 -1.834 1.00 1.00
+ATOM 554 N LEU 35 4.926 -5.638 -1.229 1.00 1.00
+ATOM 555 HN LEU 35 3.959 -5.514 -1.283 1.00 0.00
+ATOM 556 CA LEU 35 5.740 -4.668 -0.465 1.00 1.00
+ATOM 557 HA LEU 35 6.411 -4.170 -1.148 1.00 0.00
+ATOM 558 CB LEU 35 4.772 -3.656 0.192 1.00 1.00
+ATOM 559 HB1 LEU 35 4.055 -4.179 0.777 1.00 0.00
+ATOM 560 HB2 LEU 35 4.266 -3.096 -0.577 1.00 0.00
+ATOM 561 CG LEU 35 5.540 -2.712 1.099 1.00 1.00
+ATOM 562 HG LEU 35 6.576 -2.776 0.865 1.00 0.00
+ATOM 563 CD1 LEU 35 5.306 -3.115 2.559 1.00 1.00
+ATOM 564 HD11 LEU 35 5.597 -4.141 2.709 1.00 0.00
+ATOM 565 HD12 LEU 35 4.258 -3.004 2.803 1.00 0.00
+ATOM 566 HD13 LEU 35 5.889 -2.481 3.210 1.00 0.00
+ATOM 567 CD2 LEU 35 5.031 -1.266 0.915 1.00 1.00
+ATOM 568 HD21 LEU 35 5.656 -0.588 1.475 1.00 0.00
+ATOM 569 HD22 LEU 35 4.016 -1.190 1.278 1.00 0.00
+ATOM 570 HD23 LEU 35 5.052 -0.986 -0.125 1.00 0.00
+ATOM 571 C LEU 35 6.567 -5.355 0.625 1.00 1.00
+ATOM 572 O LEU 35 7.691 -4.970 0.875 1.00 1.00
+ATOM 573 N LYS 36 6.008 -6.354 1.259 1.00 1.00
+ATOM 574 HN LYS 36 5.097 -6.638 1.038 1.00 0.00
+ATOM 575 CA LYS 36 6.784 -7.045 2.332 1.00 1.00
+ATOM 576 HA LYS 36 7.454 -6.319 2.786 1.00 0.00
+ATOM 577 CB LYS 36 5.817 -7.610 3.397 1.00 1.00
+ATOM 578 HB1 LYS 36 5.718 -6.895 4.196 1.00 0.00
+ATOM 579 HB2 LYS 36 6.229 -8.522 3.801 1.00 0.00
+ATOM 580 CG LYS 36 4.430 -7.907 2.784 1.00 1.00
+ATOM 581 HG1 LYS 36 3.982 -8.744 3.302 1.00 0.00
+ATOM 582 HG2 LYS 36 4.541 -8.168 1.742 1.00 0.00
+ATOM 583 CD LYS 36 3.513 -6.673 2.914 1.00 1.00
+ATOM 584 HD1 LYS 36 2.581 -6.866 2.408 1.00 0.00
+ATOM 585 HD2 LYS 36 3.989 -5.814 2.459 1.00 0.00
+ATOM 586 CE LYS 36 3.222 -6.383 4.397 1.00 1.00
+ATOM 587 HE1 LYS 36 3.838 -5.562 4.734 1.00 0.00
+ATOM 588 HE2 LYS 36 3.443 -7.256 4.992 1.00 0.00
+ATOM 589 NZ LYS 36 1.788 -6.022 4.580 1.00 1.00
+ATOM 590 HZ1 LYS 36 1.193 -6.848 4.367 1.00 0.00
+ATOM 591 HZ2 LYS 36 1.543 -5.243 3.937 1.00 0.00
+ATOM 592 HZ3 LYS 36 1.629 -5.723 5.563 1.00 0.00
+ATOM 593 C LYS 36 7.633 -8.194 1.781 1.00 1.00
+ATOM 594 O LYS 36 8.790 -8.330 2.132 1.00 1.00
+ATOM 595 N ASP 37 7.055 -9.001 0.933 1.00 1.00
+ATOM 596 HN ASP 37 6.122 -8.862 0.674 1.00 0.00
+ATOM 597 CA ASP 37 7.833 -10.140 0.367 1.00 1.00
+ATOM 598 HA ASP 37 8.514 -10.513 1.128 1.00 0.00
+ATOM 599 CB ASP 37 6.847 -11.232 -0.066 1.00 1.00
+ATOM 600 HB1 ASP 37 7.389 -12.078 -0.464 1.00 0.00
+ATOM 601 HB2 ASP 37 6.184 -10.846 -0.826 1.00 0.00
+ATOM 602 CG ASP 37 6.024 -11.682 1.142 1.00 1.00
+ATOM 603 OD1 ASP 37 5.766 -10.824 1.970 1.00 1.00
+ATOM 604 OD2 ASP 37 5.698 -12.859 1.167 1.00 1.00
+ATOM 605 C ASP 37 8.645 -9.708 -0.852 1.00 1.00
+ATOM 606 O ASP 37 9.464 -10.453 -1.349 1.00 1.00
+ATOM 607 N ASP 38 8.403 -8.517 -1.308 1.00 1.00
+ATOM 608 HN ASP 38 7.733 -7.949 -0.871 1.00 0.00
+ATOM 609 CA ASP 38 9.147 -8.019 -2.491 1.00 1.00
+ATOM 610 HA ASP 38 10.142 -8.451 -2.496 1.00 0.00
+ATOM 611 CB ASP 38 8.375 -8.442 -3.751 1.00 1.00
+ATOM 612 HB1 ASP 38 8.430 -7.662 -4.496 1.00 0.00
+ATOM 613 HB2 ASP 38 7.340 -8.629 -3.503 1.00 0.00
+ATOM 614 CG ASP 38 9.001 -9.721 -4.310 1.00 1.00
+ATOM 615 OD1 ASP 38 9.649 -9.603 -5.337 1.00 1.00
+ATOM 616 OD2 ASP 38 8.799 -10.744 -3.678 1.00 1.00
+ATOM 617 C ASP 38 9.229 -6.487 -2.453 1.00 1.00
+ATOM 618 O ASP 38 8.419 -5.811 -3.057 1.00 1.00
+ATOM 619 N PRO 39 10.203 -5.957 -1.725 1.00 1.00
+ATOM 620 CA PRO 39 10.363 -4.508 -1.618 1.00 1.00
+ATOM 621 HA PRO 39 9.444 -4.085 -1.245 1.00 0.00
+ATOM 622 CB PRO 39 11.508 -4.314 -0.595 1.00 1.00
+ATOM 623 HB1 PRO 39 11.160 -3.724 0.240 1.00 0.00
+ATOM 624 HB2 PRO 39 12.343 -3.820 -1.062 1.00 0.00
+ATOM 625 CG PRO 39 11.938 -5.724 -0.102 1.00 1.00
+ATOM 626 HG1 PRO 39 11.687 -5.843 0.943 1.00 0.00
+ATOM 627 HG2 PRO 39 13.001 -5.854 -0.237 1.00 0.00
+ATOM 628 CD PRO 39 11.172 -6.751 -0.943 1.00 1.00
+ATOM 629 HD1 PRO 39 11.853 -7.268 -1.604 1.00 0.00
+ATOM 630 HD2 PRO 39 10.653 -7.455 -0.309 1.00 0.00
+ATOM 631 C PRO 39 10.745 -3.854 -2.966 1.00 1.00
+ATOM 632 O PRO 39 11.449 -2.864 -2.996 1.00 1.00
+ATOM 633 N SER 40 10.263 -4.415 -4.051 1.00 1.00
+ATOM 634 HN SER 40 9.704 -5.205 -3.989 1.00 0.00
+ATOM 635 CA SER 40 10.591 -3.842 -5.388 1.00 1.00
+ATOM 636 HA SER 40 11.574 -3.378 -5.335 1.00 0.00
+ATOM 637 CB SER 40 10.601 -4.998 -6.396 1.00 1.00
+ATOM 638 HB1 SER 40 9.602 -5.353 -6.582 1.00 0.00
+ATOM 639 HB2 SER 40 11.226 -5.804 -6.042 1.00 0.00
+ATOM 640 OG SER 40 11.150 -4.433 -7.575 1.00 1.00
+ATOM 641 HG SER 40 11.846 -3.824 -7.316 1.00 0.00
+ATOM 642 C SER 40 9.568 -2.783 -5.847 1.00 1.00
+ATOM 643 O SER 40 9.811 -1.599 -5.732 1.00 1.00
+ATOM 644 N GLN 41 8.441 -3.233 -6.365 1.00 1.00
+ATOM 645 HN GLN 41 8.282 -4.195 -6.433 1.00 0.00
+ATOM 646 CA GLN 41 7.400 -2.264 -6.840 1.00 1.00
+ATOM 647 HA GLN 41 7.890 -1.438 -7.351 1.00 0.00
+ATOM 648 CB GLN 41 6.448 -3.014 -7.790 1.00 1.00
+ATOM 649 HB1 GLN 41 5.449 -2.612 -7.694 1.00 0.00
+ATOM 650 HB2 GLN 41 6.432 -4.062 -7.531 1.00 0.00
+ATOM 651 CG GLN 41 6.931 -2.852 -9.234 1.00 1.00
+ATOM 652 HG1 GLN 41 7.016 -1.804 -9.480 1.00 0.00
+ATOM 653 HG2 GLN 41 6.228 -3.319 -9.908 1.00 0.00
+ATOM 654 CD GLN 41 8.297 -3.523 -9.389 1.00 1.00
+ATOM 655 OE1 GLN 41 9.247 -3.187 -8.710 1.00 1.00
+ATOM 656 NE2 GLN 41 8.436 -4.478 -10.268 1.00 1.00
+ATOM 657 HE21 GLN 41 7.671 -4.755 -10.816 1.00 0.00
+ATOM 658 HE22 GLN 41 9.305 -4.917 -10.382 1.00 0.00
+ATOM 659 C GLN 41 6.583 -1.714 -5.673 1.00 1.00
+ATOM 660 O GLN 41 5.580 -1.055 -5.860 1.00 1.00
+ATOM 661 N SER 42 7.040 -1.994 -4.501 1.00 1.00
+ATOM 662 HN SER 42 7.858 -2.526 -4.414 1.00 0.00
+ATOM 663 CA SER 42 6.338 -1.522 -3.281 1.00 1.00
+ATOM 664 HA SER 42 5.454 -2.122 -3.117 1.00 0.00
+ATOM 665 CB SER 42 7.308 -1.693 -2.151 1.00 1.00
+ATOM 666 HB1 SER 42 6.802 -1.908 -1.241 1.00 0.00
+ATOM 667 HB2 SER 42 7.922 -0.813 -2.046 1.00 0.00
+ATOM 668 OG SER 42 8.080 -2.803 -2.568 1.00 1.00
+ATOM 669 HG SER 42 7.806 -3.566 -2.054 1.00 0.00
+ATOM 670 C SER 42 5.951 -0.049 -3.347 1.00 1.00
+ATOM 671 O SER 42 4.928 0.351 -2.829 1.00 1.00
+ATOM 672 N ALA 43 6.780 0.736 -3.955 1.00 1.00
+ATOM 673 HN ALA 43 7.607 0.381 -4.345 1.00 0.00
+ATOM 674 CA ALA 43 6.463 2.177 -4.048 1.00 1.00
+ATOM 675 HA ALA 43 6.213 2.540 -3.063 1.00 0.00
+ATOM 676 CB ALA 43 7.701 2.889 -4.599 1.00 1.00
+ATOM 677 HB1 ALA 43 8.522 2.779 -3.902 1.00 0.00
+ATOM 678 HB2 ALA 43 7.490 3.935 -4.740 1.00 0.00
+ATOM 679 HB3 ALA 43 7.982 2.449 -5.544 1.00 0.00
+ATOM 680 C ALA 43 5.279 2.414 -4.977 1.00 1.00
+ATOM 681 O ALA 43 4.280 3.026 -4.604 1.00 1.00
+ATOM 682 N ASN 44 5.397 1.939 -6.164 1.00 1.00
+ATOM 683 HN ASN 44 6.206 1.458 -6.433 1.00 0.00
+ATOM 684 CA ASN 44 4.293 2.127 -7.101 1.00 1.00
+ATOM 685 HA ASN 44 4.146 3.194 -7.268 1.00 0.00
+ATOM 686 CB ASN 44 4.667 1.416 -8.394 1.00 1.00
+ATOM 687 HB1 ASN 44 5.384 0.638 -8.178 1.00 0.00
+ATOM 688 HB2 ASN 44 5.115 2.129 -9.076 1.00 0.00
+ATOM 689 CG ASN 44 3.418 0.806 -9.034 1.00 1.00
+ATOM 690 OD1 ASN 44 2.415 1.467 -9.221 1.00 1.00
+ATOM 691 ND2 ASN 44 3.437 -0.452 -9.384 1.00 1.00
+ATOM 692 HD21 ASN 44 4.242 -0.989 -9.236 1.00 0.00
+ATOM 693 HD22 ASN 44 2.645 -0.858 -9.795 1.00 0.00
+ATOM 694 C ASN 44 3.020 1.536 -6.497 1.00 1.00
+ATOM 695 O ASN 44 1.937 2.046 -6.700 1.00 1.00
+ATOM 696 N LEU 45 3.181 0.463 -5.752 1.00 1.00
+ATOM 697 HN LEU 45 4.069 0.070 -5.633 1.00 0.00
+ATOM 698 CA LEU 45 2.007 -0.171 -5.109 1.00 1.00
+ATOM 699 HA LEU 45 1.306 -0.513 -5.859 1.00 0.00
+ATOM 700 CB LEU 45 2.514 -1.325 -4.217 1.00 1.00
+ATOM 701 HB1 LEU 45 1.907 -1.378 -3.324 1.00 0.00
+ATOM 702 HB2 LEU 45 3.527 -1.141 -3.930 1.00 0.00
+ATOM 703 CG LEU 45 2.436 -2.667 -4.948 1.00 1.00
+ATOM 704 HG LEU 45 1.456 -3.060 -4.834 1.00 0.00
+ATOM 705 CD1 LEU 45 2.780 -2.538 -6.442 1.00 1.00
+ATOM 706 HD11 LEU 45 3.254 -3.449 -6.776 1.00 0.00
+ATOM 707 HD12 LEU 45 3.453 -1.719 -6.600 1.00 0.00
+ATOM 708 HD13 LEU 45 1.880 -2.383 -7.018 1.00 0.00
+ATOM 709 CD2 LEU 45 3.435 -3.620 -4.327 1.00 1.00
+ATOM 710 HD21 LEU 45 3.457 -3.485 -3.255 1.00 0.00
+ATOM 711 HD22 LEU 45 4.418 -3.431 -4.730 1.00 0.00
+ATOM 712 HD23 LEU 45 3.150 -4.624 -4.557 1.00 0.00
+ATOM 713 C LEU 45 1.327 0.853 -4.234 1.00 1.00
+ATOM 714 O LEU 45 0.121 0.994 -4.254 1.00 1.00
+ATOM 715 N LEU 46 2.119 1.551 -3.468 1.00 1.00
+ATOM 716 HN LEU 46 3.085 1.398 -3.470 1.00 0.00
+ATOM 717 CA LEU 46 1.562 2.567 -2.599 1.00 1.00
+ATOM 718 HA LEU 46 1.059 2.105 -1.763 1.00 0.00
+ATOM 719 CB LEU 46 2.743 3.446 -2.148 1.00 1.00
+ATOM 720 HB1 LEU 46 2.708 4.391 -2.660 1.00 0.00
+ATOM 721 HB2 LEU 46 3.666 2.952 -2.397 1.00 0.00
+ATOM 722 CG LEU 46 2.736 3.696 -0.657 1.00 1.00
+ATOM 723 HG LEU 46 3.438 4.463 -0.466 1.00 0.00
+ATOM 724 CD1 LEU 46 1.352 4.158 -0.168 1.00 1.00
+ATOM 725 HD11 LEU 46 0.687 4.303 -0.991 1.00 0.00
+ATOM 726 HD12 LEU 46 1.458 5.095 0.351 1.00 0.00
+ATOM 727 HD13 LEU 46 0.936 3.425 0.501 1.00 0.00
+ATOM 728 CD2 LEU 46 3.181 2.425 0.088 1.00 1.00
+ATOM 729 HD21 LEU 46 4.232 2.251 -0.088 1.00 0.00
+ATOM 730 HD22 LEU 46 2.629 1.573 -0.259 1.00 0.00
+ATOM 731 HD23 LEU 46 3.018 2.549 1.146 1.00 0.00
+ATOM 732 C LEU 46 0.575 3.417 -3.376 1.00 1.00
+ATOM 733 O LEU 46 -0.565 3.549 -2.995 1.00 1.00
+ATOM 734 N ALA 47 1.024 3.962 -4.463 1.00 1.00
+ATOM 735 HN ALA 47 1.958 3.806 -4.754 1.00 0.00
+ATOM 736 CA ALA 47 0.108 4.814 -5.270 1.00 1.00
+ATOM 737 HA ALA 47 -0.129 5.710 -4.702 1.00 0.00
+ATOM 738 CB ALA 47 0.819 5.175 -6.580 1.00 1.00
+ATOM 739 HB1 ALA 47 0.146 5.723 -7.221 1.00 0.00
+ATOM 740 HB2 ALA 47 1.134 4.271 -7.085 1.00 0.00
+ATOM 741 HB3 ALA 47 1.684 5.784 -6.369 1.00 0.00
+ATOM 742 C ALA 47 -1.195 4.081 -5.610 1.00 1.00
+ATOM 743 O ALA 47 -2.274 4.491 -5.211 1.00 1.00
+ATOM 744 N GLU 48 -1.065 3.010 -6.336 1.00 1.00
+ATOM 745 HN GLU 48 -0.171 2.717 -6.620 1.00 0.00
+ATOM 746 CA GLU 48 -2.269 2.225 -6.731 1.00 1.00
+ATOM 747 HA GLU 48 -2.824 2.793 -7.474 1.00 0.00
+ATOM 748 CB GLU 48 -1.789 0.896 -7.327 1.00 1.00
+ATOM 749 HB1 GLU 48 -2.639 0.297 -7.613 1.00 0.00
+ATOM 750 HB2 GLU 48 -1.205 0.359 -6.595 1.00 0.00
+ATOM 751 CG GLU 48 -0.928 1.189 -8.559 1.00 1.00
+ATOM 752 HG1 GLU 48 0.080 0.839 -8.392 1.00 0.00
+ATOM 753 HG2 GLU 48 -0.909 2.252 -8.747 1.00 0.00
+ATOM 754 CD GLU 48 -1.518 0.472 -9.774 1.00 1.00
+ATOM 755 OE1 GLU 48 -2.405 1.060 -10.373 1.00 1.00
+ATOM 756 OE2 GLU 48 -1.050 -0.624 -10.035 1.00 1.00
+ATOM 757 C GLU 48 -3.200 1.927 -5.549 1.00 1.00
+ATOM 758 O GLU 48 -4.405 1.975 -5.691 1.00 1.00
+ATOM 759 N ALA 49 -2.639 1.627 -4.408 1.00 1.00
+ATOM 760 HN ALA 49 -1.662 1.602 -4.325 1.00 0.00
+ATOM 761 CA ALA 49 -3.508 1.323 -3.231 1.00 1.00
+ATOM 762 HA ALA 49 -4.150 0.479 -3.479 1.00 0.00
+ATOM 763 CB ALA 49 -2.617 0.987 -2.033 1.00 1.00
+ATOM 764 HB1 ALA 49 -3.234 0.724 -1.185 1.00 0.00
+ATOM 765 HB2 ALA 49 -2.014 1.843 -1.777 1.00 0.00
+ATOM 766 HB3 ALA 49 -1.975 0.156 -2.278 1.00 0.00
+ATOM 767 C ALA 49 -4.384 2.510 -2.856 1.00 1.00
+ATOM 768 O ALA 49 -5.597 2.414 -2.863 1.00 1.00
+ATOM 769 N LYS 50 -3.755 3.606 -2.524 1.00 1.00
+ATOM 770 HN LYS 50 -2.778 3.636 -2.532 1.00 0.00
+ATOM 771 CA LYS 50 -4.544 4.805 -2.143 1.00 1.00
+ATOM 772 HA LYS 50 -4.956 4.650 -1.150 1.00 0.00
+ATOM 773 CB LYS 50 -3.631 6.049 -2.178 1.00 1.00
+ATOM 774 HB1 LYS 50 -4.163 6.900 -1.774 1.00 0.00
+ATOM 775 HB2 LYS 50 -3.358 6.263 -3.200 1.00 0.00
+ATOM 776 CG LYS 50 -2.353 5.794 -1.350 1.00 1.00
+ATOM 777 HG1 LYS 50 -1.650 6.595 -1.525 1.00 0.00
+ATOM 778 HG2 LYS 50 -1.905 4.871 -1.652 1.00 0.00
+ATOM 779 CD LYS 50 -2.689 5.732 0.149 1.00 1.00
+ATOM 780 HD1 LYS 50 -3.732 5.949 0.304 1.00 0.00
+ATOM 781 HD2 LYS 50 -2.096 6.463 0.679 1.00 0.00
+ATOM 782 CE LYS 50 -2.366 4.327 0.688 1.00 1.00
+ATOM 783 HE1 LYS 50 -1.293 4.172 0.687 1.00 0.00
+ATOM 784 HE2 LYS 50 -2.828 3.574 0.062 1.00 0.00
+ATOM 785 NZ LYS 50 -2.881 4.181 2.080 1.00 1.00
+ATOM 786 HZ1 LYS 50 -3.219 5.103 2.422 1.00 0.00
+ATOM 787 HZ2 LYS 50 -2.119 3.839 2.698 1.00 0.00
+ATOM 788 HZ3 LYS 50 -3.667 3.499 2.089 1.00 0.00
+ATOM 789 C LYS 50 -5.695 5.004 -3.118 1.00 1.00
+ATOM 790 O LYS 50 -6.754 5.465 -2.745 1.00 1.00
+ATOM 791 N LYS 51 -5.464 4.655 -4.355 1.00 1.00
+ATOM 792 HN LYS 51 -4.580 4.303 -4.618 1.00 0.00
+ATOM 793 CA LYS 51 -6.543 4.809 -5.365 1.00 1.00
+ATOM 794 HA LYS 51 -6.954 5.815 -5.303 1.00 0.00
+ATOM 795 CB LYS 51 -5.946 4.533 -6.753 1.00 1.00
+ATOM 796 HB1 LYS 51 -6.390 3.640 -7.166 1.00 0.00
+ATOM 797 HB2 LYS 51 -4.881 4.388 -6.665 1.00 0.00
+ATOM 798 CG LYS 51 -6.229 5.721 -7.676 1.00 1.00
+ATOM 799 HG1 LYS 51 -5.805 6.620 -7.254 1.00 0.00
+ATOM 800 HG2 LYS 51 -7.296 5.850 -7.789 1.00 0.00
+ATOM 801 CD LYS 51 -5.596 5.446 -9.041 1.00 1.00
+ATOM 802 HD1 LYS 51 -6.033 4.556 -9.470 1.00 0.00
+ATOM 803 HD2 LYS 51 -4.532 5.298 -8.924 1.00 0.00
+ATOM 804 CE LYS 51 -5.851 6.638 -9.964 1.00 1.00
+ATOM 805 HE1 LYS 51 -4.909 7.037 -10.309 1.00 0.00
+ATOM 806 HE2 LYS 51 -6.384 7.407 -9.424 1.00 0.00
+ATOM 807 NZ LYS 51 -6.661 6.219 -11.139 1.00 1.00
+ATOM 808 HZ1 LYS 51 -6.416 5.242 -11.396 1.00 0.00
+ATOM 809 HZ2 LYS 51 -6.459 6.850 -11.941 1.00 0.00
+ATOM 810 HZ3 LYS 51 -7.671 6.272 -10.900 1.00 0.00
+ATOM 811 C LYS 51 -7.652 3.792 -5.100 1.00 1.00
+ATOM 812 O LYS 51 -8.821 4.132 -5.032 1.00 1.00
+ATOM 813 N LEU 52 -7.253 2.556 -4.952 1.00 1.00
+ATOM 814 HN LEU 52 -6.300 2.337 -5.015 1.00 0.00
+ATOM 815 CA LEU 52 -8.245 1.486 -4.688 1.00 1.00
+ATOM 816 HA LEU 52 -8.926 1.426 -5.534 1.00 0.00
+ATOM 817 CB LEU 52 -7.458 0.152 -4.521 1.00 1.00
+ATOM 818 HB1 LEU 52 -6.648 0.296 -3.820 1.00 0.00
+ATOM 819 HB2 LEU 52 -7.042 -0.125 -5.478 1.00 0.00
+ATOM 820 CG LEU 52 -8.393 -0.974 -4.012 1.00 1.00
+ATOM 821 HG LEU 52 -9.417 -0.734 -4.251 1.00 0.00
+ATOM 822 CD1 LEU 52 -8.023 -2.330 -4.646 1.00 1.00
+ATOM 823 HD11 LEU 52 -6.999 -2.326 -4.968 1.00 0.00
+ATOM 824 HD12 LEU 52 -8.659 -2.523 -5.489 1.00 0.00
+ATOM 825 HD13 LEU 52 -8.159 -3.121 -3.915 1.00 0.00
+ATOM 826 CD2 LEU 52 -8.234 -1.108 -2.506 1.00 1.00
+ATOM 827 HD21 LEU 52 -8.095 -0.144 -2.066 1.00 0.00
+ATOM 828 HD22 LEU 52 -7.379 -1.722 -2.276 1.00 0.00
+ATOM 829 HD23 LEU 52 -9.111 -1.564 -2.090 1.00 0.00
+ATOM 830 C LEU 52 -9.054 1.810 -3.419 1.00 1.00
+ATOM 831 O LEU 52 -10.074 1.207 -3.158 1.00 1.00
+ATOM 832 N ASN 53 -8.586 2.777 -2.660 1.00 1.00
+ATOM 833 HN ASN 53 -7.765 3.252 -2.910 1.00 0.00
+ATOM 834 CA ASN 53 -9.311 3.156 -1.416 1.00 1.00
+ATOM 835 HA ASN 53 -9.507 2.270 -0.834 1.00 0.00
+ATOM 836 CB ASN 53 -8.430 4.141 -0.638 1.00 1.00
+ATOM 837 HB1 ASN 53 -8.428 5.071 -1.145 1.00 0.00
+ATOM 838 HB2 ASN 53 -7.421 3.763 -0.576 1.00 0.00
+ATOM 839 CG ASN 53 -8.983 4.347 0.773 1.00 1.00
+ATOM 840 OD1 ASN 53 -8.478 5.138 1.544 1.00 1.00
+ATOM 841 ND2 ASN 53 -10.016 3.669 1.138 1.00 1.00
+ATOM 842 HD21 ASN 53 -10.420 3.052 0.511 1.00 0.00
+ATOM 843 HD22 ASN 53 -10.387 3.771 2.050 1.00 0.00
+ATOM 844 C ASN 53 -10.633 3.843 -1.749 1.00 1.00
+ATOM 845 O ASN 53 -11.694 3.342 -1.435 1.00 1.00
+ATOM 846 N ASP 54 -10.540 4.982 -2.381 1.00 1.00
+ATOM 847 HN ASP 54 -9.661 5.347 -2.612 1.00 0.00
+ATOM 848 CA ASP 54 -11.774 5.722 -2.745 1.00 1.00
+ATOM 849 HA ASP 54 -12.307 5.994 -1.837 1.00 0.00
+ATOM 850 CB ASP 54 -11.367 6.975 -3.535 1.00 1.00
+ATOM 851 HB1 ASP 54 -11.139 6.704 -4.555 1.00 0.00
+ATOM 852 HB2 ASP 54 -10.495 7.425 -3.083 1.00 0.00
+ATOM 853 CG ASP 54 -12.520 7.983 -3.525 1.00 1.00
+ATOM 854 OD1 ASP 54 -13.609 7.563 -3.879 1.00 1.00
+ATOM 855 OD2 ASP 54 -12.244 9.117 -3.168 1.00 1.00
+ATOM 856 C ASP 54 -12.684 4.872 -3.621 1.00 1.00
+ATOM 857 O ASP 54 -13.892 4.925 -3.501 1.00 1.00
+ATOM 858 N ALA 55 -12.089 4.098 -4.486 1.00 1.00
+ATOM 859 HN ALA 55 -11.108 4.081 -4.545 1.00 0.00
+ATOM 860 CA ALA 55 -12.910 3.242 -5.380 1.00 1.00
+ATOM 861 HA ALA 55 -13.466 3.881 -6.064 1.00 0.00
+ATOM 862 CB ALA 55 -11.969 2.312 -6.155 1.00 1.00
+ATOM 863 HB1 ALA 55 -10.947 2.520 -5.883 1.00 0.00
+ATOM 864 HB2 ALA 55 -12.092 2.471 -7.217 1.00 0.00
+ATOM 865 HB3 ALA 55 -12.196 1.282 -5.921 1.00 0.00
+ATOM 866 C ALA 55 -13.902 2.394 -4.583 1.00 1.00
+ATOM 867 O ALA 55 -14.737 1.720 -5.153 1.00 1.00
+END
--- /dev/null
+#PBS -N test
+#PBS -q dque
+#PBS -l nodes=1:ppn=1
+#PBS -l mem=2gb
+#PBS -l walltime=24:00:00
+
+setenv MPIRUN "/users/software/mpich-1.2.7p1_intel-10.1_em64_ssh/bin/mpirun "
+setenv NPROCS `cat $PBS_NODEFILE | wc -l`
+
+cd $PBS_O_WORKDIR
+$MPIRUN -machinefile $PBS_NODEFILE -np $NPROCS ./unres_casp3.csh
+
--- /dev/null
+forrtl: Is a directory
+forrtl: severe (39): error during read, unit 28, file /users/adam/unres/examples/unres/CSA/CASP3/ENERGY/
+Image PC Routine Line Source
+unres_csa-CASP3_i 000000000060E70D Unknown Unknown Unknown
+unres_csa-CASP3_i 000000000060D215 Unknown Unknown Unknown
+unres_csa-CASP3_i 00000000005B0ED9 Unknown Unknown Unknown
+unres_csa-CASP3_i 000000000056787D Unknown Unknown Unknown
+unres_csa-CASP3_i 00000000005670CA Unknown Unknown Unknown
+unres_csa-CASP3_i 000000000058F60A Unknown Unknown Unknown
+unres_csa-CASP3_i 0000000000423157 Unknown Unknown Unknown
+unres_csa-CASP3_i 0000000000410A63 Unknown Unknown Unknown
+unres_csa-CASP3_i 0000000000404F55 Unknown Unknown Unknown
+unres_csa-CASP3_i 0000000000404E9C Unknown Unknown Unknown
+libc.so.6 00007F1FF8A0BC5D Unknown Unknown Unknown
+unres_csa-CASP3_i 0000000000404D99 Unknown Unknown Unknown
--- /dev/null
+forrtl: severe (24): end-of-file during read, unit 89, file /users/adam/unres/examples/unres/CSA/CASP3/ENERGY/dist_dfa.dat
+Image PC Routine Line Source
+unres_csa-CASP3_i 000000000060E70D Unknown Unknown Unknown
+unres_csa-CASP3_i 000000000060D215 Unknown Unknown Unknown
+unres_csa-CASP3_i 00000000005B0ED9 Unknown Unknown Unknown
+unres_csa-CASP3_i 000000000056787D Unknown Unknown Unknown
+unres_csa-CASP3_i 00000000005670CA Unknown Unknown Unknown
+unres_csa-CASP3_i 000000000058B87D Unknown Unknown Unknown
+unres_csa-CASP3_i 00000000004A9586 Unknown Unknown Unknown
+unres_csa-CASP3_i 0000000000417D1A Unknown Unknown Unknown
+unres_csa-CASP3_i 0000000000410A87 Unknown Unknown Unknown
+unres_csa-CASP3_i 0000000000404F55 Unknown Unknown Unknown
+unres_csa-CASP3_i 0000000000404E9C Unknown Unknown Unknown
+libc.so.6 00007FD9BAD0AC5D Unknown Unknown Unknown
+unres_csa-CASP3_i 0000000000404D99 Unknown Unknown Unknown
--- /dev/null
+ Processor 0 out of 1 rank in CG_COMM 0
+ size of CG_COMM 1 size of FG_COMM 1 rank in FG_COMM1
+ 0 size of FG_COMM1 1
+Inside initialize--------------------------------------
+Running PBS epilogue script
+
+Single processor job or ~/.nokill exist, no need to kill processes
+Done.
--- /dev/null
+ Processor 0 out of 1 rank in CG_COMM 0
+ size of CG_COMM 1 size of FG_COMM 1 rank in FG_COMM1
+ 0 size of FG_COMM1 1
+Inside initialize MPI: node= 0 iseed= -3059742
+ indpdb= 0 pdbref= F
+ Call Read_Bridge.
+ ns= 0
+ ishiftca= 1 ilastca= 47
+ init_dfa_vars finished!
+--------------------------------------
+Running PBS epilogue script
+
+Single processor job or ~/.nokill exist, no need to kill processes
+Done.
--- /dev/null
+ Processor 0 out of 1 rank in CG_COMM 0
+ size of CG_COMM 1 size of FG_COMM 1 rank in FG_COMM1
+ 0 size of FG_COMM1 1
+Inside initialize MPI: node= 0 iseed= -3059742
+ indpdb= 0 pdbref= F
+ Call Read_Bridge.
+ ns= 0
+ ishiftca= 1 ilastca= 47
+ init_dfa_vars finished!
+--------------------------------------
+Running PBS epilogue script
+
+Single processor job or ~/.nokill exist, no need to kill processes
+Done.
--- /dev/null
+ Processor 0 out of 1 rank in CG_COMM 0
+ size of CG_COMM 1 size of FG_COMM 1 rank in FG_COMM1
+ 0 size of FG_COMM1 1
+Inside initialize MPI: node= 0 iseed= -3059742
+ indpdb= 0 pdbref= F
+ Call Read_Bridge.
+ ns= 0
+ ishiftca= 1 ilastca= 47
+ init_dfa_vars finished!
+--------------------------------------
+Running PBS epilogue script
+
+Single processor job or ~/.nokill exist, no need to kill processes
+Done.
--- /dev/null
+ Processor 0 out of 1 rank in CG_COMM 0
+ size of CG_COMM 1 size of FG_COMM 1 rank in FG_COMM1
+ 0 size of FG_COMM1 1
+Inside initialize MPI: node= 0 iseed= -3059742
+ indpdb= 0 pdbref= F
+ Call Read_Bridge.
+ ns= 0
+ ishiftca= 1 ilastca= 47
+ init_dfa_vars finished!
+--------------------------------------
+Running PBS epilogue script
+
+Single processor job or ~/.nokill exist, no need to kill processes
+Done.
--- /dev/null
+ Processor 0 out of 1 rank in CG_COMM 0
+ size of CG_COMM 1 size of FG_COMM 1 rank in FG_COMM1
+ 0 size of FG_COMM1 1
+Inside initialize MPI: node= 0 iseed= -3059742
+ indpdb= 0 pdbref= F
+ Call Read_Bridge.
+ ns= 0
+ ishiftca= 1 ilastca= 47
+ init_dfa_vars finished!
+--------------------------------------
+Running PBS epilogue script
+
+Single processor job or ~/.nokill exist, no need to kill processes
+Done.
setenv POT LJ
setenv PREFIX protA
-set DD = ../../PARAM
-set BIN = $HOME/UNRES/NEW/bin/unres_ifc6_cryst_tor.exe
+set DD = ../../../../../PARAM
+set BIN = ../../../../../bin/unres/CSA/unres_csa-CASP3_ifort_mpich-1.2.7p1.exe
#---------------------------------
+setenv BONDPAR $DD/bond.parm
setenv THETPAR $DD/thetaml.5parm
setenv ROTPAR $DD/scgauss.parm
setenv TORPAR $DD/torsion_cryst.parm
setenv SIDEPAR $DD/scinter_$POT.parm
setenv FOURIER $DD/fourier_GAP.parm
setenv SCPPAR $DD/scp.parm
+setenv FOURIER $DD/fourier_GAP.parm
+setenv SCCORPAR $DD/rotcorr_AM1.parm
# Pattern database
setenv PATTERN $DD/patterns.cart
#--------------------------------------------
-$BIN -p4wd `pwd`
+$BIN $*
--- /dev/null
+ala10 unblocked
+SEED=-1111333 MD ONE_LETTER rescale_mode=2
+nstep=10000 ntwe=100 ntwx=1000 dt=0.1 lang=0 tbf t_bath=300 damax=1.0 &
+reset_moment=1000 reset_vel=1000
+WLONG=1.35279 WSCP=1.59304 WELEC=0.71534 WBOND=1.00000 WANG=1.13873 &
+WSCLOC=0.16258 WTOR=1.98599 WTORD=1.57069 WCORRH=0.42887 WCORR5=0.00000 &
+WCORR6=0.00000 WEL_LOC=0.16036 WTURN3=1.68722 WTURN4=0.66230 WTURN6=0.00000 &
+WVDWPP=0.11371 WHPB=1.00000 &
+CUTOFF=7.00000 WCORR4=0.00000
+12
+XAAAAAAAAAAX
+ 0
+ 0
+ 90.0000 90.0000 90.0000 90.000 90.000 90.000 90.000 90.000
+ 90.0000 90.0000
+ 180.0000 180.0000 180.0000 180.000 180.000 180.000 180.000 180.000
+ 180.0000
+ 110.0000 110.0000 110.0000 100.000 110.000 100.000 110.000 110.000
+ 110.0000 110.0000
+ -120.0000 -120.0000 -120.000 -120.000 -120.000 -120.000 -120.000 -120.000
+ -120.0000 -120.0000
--- /dev/null
+--------------------------------------------------------------------------------
+ FILE ASSIGNMENT
+--------------------------------------------------------------------------------
+ Input file : ala10-cx.inp
+ Output file : ala10-cx.out_GB
+
+ Sidechain potential file :
+ ../../../../PARAM/sc_GB_opt.1gab_3S_qclass5no310-shan2-sc-16-10-8k
+ SCp potential file : ../../../../PARAM/scp.parm
+ Electrostatic potential file : ../../../../PARAM/electr_631Gdp.parm
+ Cumulant coefficient file :
+ ../../../../PARAM/fourier_opt.parm.1igd_hc_iter3_3
+ Torsional parameter file : ../../../../PARAM/torsion_631Gdp.parm
+ Double torsional parameter file : ../../../../PARAM/torsion_double_631Gdp.parm
+ SCCOR parameter file : ../../../../PARAM/rotcorr_AM1.parm
+ Bond & inertia constant file : ../../../../PARAM/bond.parm
+ Bending parameter file : ../../../../PARAM/thetaml.5parm
+ Rotamer parameter file : ../../../../PARAM/scgauss.parm
+ Threading database : ../../../../PARAM/patterns.cart
+--------------------------------------------------------------------------------
+ ### LAST MODIFIED 03/28/12 23:29 by czarek
+ ++++ Compile info ++++
+ Version 2.5 build 34
+ compiled Mon Apr 2 08:16:44 2012
+ compiled by adam@matrix.chem.cornell.edu
+ OS name: Linux
+ OS release: 2.6.34.9-69.fc13.x86_64
+ OS version: #1 SMP Tue May 3 09:23:03 UTC 2011
+ flags:
+ FC = ifort
+ FFLAGS = -c ${OPT} -I$(INSTALL_DIR)/include
+ FFLAGS1 = -c -w -g -d2 -CA -CB -I$(INSTALL_DIR)...
+ FFLAGS2 = -c -w -g -O0 -I$(INSTALL_DIR)/include
+ FFLAGSE = -c -w -O3 -ipo -ipo_obj -opt_report ...
+ CC = cc
+ CFLAGS = -DLINUX -DPGI -c
+ OPT = -O3 -ip -w
+ LIBS = -Lxdrf -lxdrf
+ ARCH = LINUX
+ PP = /lib/cpp -P
+ object = unres.o arcos.o cartprint.o chainbuild...
+ GAB: CPPFLAGS = -DPROCOR -DLINUX -DPGI -DUNRES ...
+ GAB: BIN = ../../../bin/unres/MD/unres_ifort_si...
+ E0LL2Y: CPPFLAGS = -DPROCOR -DLINUX -DPGI -DUNR...
+ E0LL2Y: BIN = ../../../bin/unres/MD/unres_ifort...
+ ++++ End of compile info ++++
+
+Potential is GB , exponents are 6 12
+
+Disulfide bridge parameters:
+S-S bridge energy: -5.50
+d0cm: 3.78 akcm: 15.10
+akth: 11.00 akct: 12.00
+v1ss: -1.08 v2ss: 7.61 v3ss: 13.70
+ ran_num 0.383569105241247
+RMSDBC = 3.0
+RMSDBC1 = 0.5
+RMSDBC1MAX = 1.5
+DRMS = 0.1
+RMSDBCM = 3.0
+Time limit (min): 960.0
+ RESCALE_MODE 2
+Library routine used to diagonalize matrices.
+
+=========================== Parameters of the MD run ===========================
+
+The units are:
+positions: angstrom, time: 48.9 fs
+velocity: angstrom/(48.9 fs), acceleration: angstrom/(48.9 fs)**2
+energy: kcal/mol, temperature: K
+
+ Number of time steps: 10000
+ Initial time step of numerical integration: 0.10000 natural units
+ 4.89000 fs
+Maximum acceleration threshold to reduce the time step/increase split number: 1.00000
+Maximum predicted energy drift to reduce the timestep/increase split number: 10.00000
+ Maximum velocity threshold to reduce velocities: 20.00000
+ Frequency of property output: 100
+ Frequency of coordinate output: 1000
+Berendsen bath calculation
+ Temperature: 300.00000
+ Coupling constant (tau): 0.10000
+Momenta will be reset at zero every 1000 steps
+Velocities will be reset at random every 1000 steps
+
+============================== End of MD run setup =============================
+
+
+Energy-term weights (unscaled):
+
+WSCC= 1.352790 (SC-SC)
+WSCP= 1.593040 (SC-p)
+WELEC= 0.715340 (p-p electr)
+WVDWPP= 0.113710 (p-p VDW)
+WBOND= 1.000000 (stretching)
+WANG= 1.138730 (bending)
+WSCLOC= 0.162580 (SC local)
+WTOR= 1.985990 (torsional)
+WTORD= 1.570690 (double torsional)
+WSTRAIN= 1.000000 (SS bridges & dist. cnstr.)
+WEL_LOC= 0.160360 (multi-body 3-rd order)
+WCORR4= 0.428870 (multi-body 4th order)
+WCORR5= 0.000000 (multi-body 5th order)
+WCORR6= 0.000000 (multi-body 6th order)
+WSCCOR= 1.000000 (back-scloc correlation)
+WTURN3= 1.687220 (turns, 3rd order)
+WTURN4= 0.662300 (turns, 4th order)
+WTURN6= 0.000000 (turns, 6th order)
+
+Hydrogen-bonding correlation between contact pairs of peptide groups
+
+Scaling factor of 1,4 SC-p interactions: 0.400
+General scaling factor of SC-p interactions: 1.000
+
+Energy-term weights (scaled):
+
+WSCC= 1.352790 (SC-SC)
+WSCP= 1.593040 (SC-p)
+WELEC= 0.715340 (p-p electr)
+WVDWPP= 0.113710 (p-p VDW)
+WBOND= 1.000000 (stretching)
+WANG= 1.138730 (bending)
+WSCLOC= 0.162580 (SC local)
+WTOR= 1.985990 (torsional)
+WTORD= 1.570690 (double torsional)
+WSTRAIN= 1.000000 (SS bridges & dist. cnstr.)
+WEL_LOC= 0.160360 (multi-body 3-rd order)
+WCORR4= 0.428870 (multi-body 4th order)
+WCORR5= 0.000000 (multi-body 5th order)
+WCORR6= 0.000000 (multi-body 6th order)
+WSCCOR= 1.000000 (back-scloc correlatkion)
+WTURN3= 1.687220 (turns, 3rd order)
+WTURN4= 0.662300 (turns, 4th order)
+WTURN6= 0.000000 (turns, 6th order)
+ Reference temperature for weights calculation: 300.000000000000
+ Parameters of the SS-bond potential:
+ D0CM 3.78000000000000 AKCM 15.1000000000000 AKTH
+ 11.0000000000000 AKCT 12.0000000000000
+ V1SS -1.08000000000000 V2SS 7.61000000000000 V3SS
+ 13.7000000000000
+ EBR -5.50000000000000
+ ITEL
+ 1 21 0
+ 2 9 1
+ 3 9 1
+ 4 9 1
+ 5 9 1
+ 6 9 1
+ 7 9 1
+ 8 9 1
+ 9 9 1
+ 10 9 1
+ 11 9 0
+ ns= 0 iss:
+Boundaries in phi angle sampling:
+D 1 -180.0 180.0
+ALA 2 -180.0 180.0
+ALA 3 -180.0 180.0
+ALA 4 -180.0 180.0
+ALA 5 -180.0 180.0
+ALA 6 -180.0 180.0
+ALA 7 -180.0 180.0
+ALA 8 -180.0 180.0
+ALA 9 -180.0 180.0
+ALA 10 -180.0 180.0
+ALA 11 -180.0 180.0
+D 12 -180.0 180.0
+ NZ_START= 2 NZ_END= 11
+ IZ_SC= 0
+Initial geometry will be read in.
+
+Geometry of the virtual chain.
+ Res d Theta Gamma Dsc Alpha Beta
+D 1 0.000 0.000 0.000 0.000 0.000 0.000
+ALA 2 3.800 0.000 0.000 0.743 110.000 -120.000
+ALA 3 3.800 90.000 0.000 0.743 110.000 -120.000
+ALA 4 3.800 90.000 180.000 0.743 110.000 -120.000
+ALA 5 3.800 90.000 180.000 0.743 100.000 -120.000
+ALA 6 3.800 90.000 180.000 0.743 110.000 -120.000
+ALA 7 3.800 90.000 180.000 0.743 100.000 -120.000
+ALA 8 3.800 90.000 180.000 0.743 110.000 -120.000
+ALA 9 3.800 90.000 180.000 0.743 110.000 -120.000
+ALA 10 3.800 90.000 180.000 0.743 110.000 -120.000
+ALA 11 3.800 90.000 180.000 0.743 110.000 -120.000
+D 12 3.800 90.000 180.000 0.000 0.000 0.000
+Mesoscopic molecular dynamics (MD) calculation.
+
+********************************************************************************
+
+ Calling chainbuild
+====================MD calculation start====================
+ Initial velocities randomly generated
+ Initial velocities
+ 0 -0.02571 0.04778 -0.01151 0.00000 0.00000 0.00000
+ 1 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
+ 2 -0.11082 -0.24316 -0.01092 -0.01544 0.04693 0.02901
+ 3 0.17509 0.14021 0.01920 -0.06074 0.20983 -0.00546
+ 4 -0.28110 -0.18298 0.04141 0.05768 -0.02663 -0.10403
+ 5 0.52321 0.32791 -0.28506 0.24480 0.23049 0.08887
+ 6 -0.24047 -0.12903 0.12193 0.03851 -0.08315 0.33390
+ 7 0.09902 -0.00280 0.29189 -0.33532 -0.00436 0.03329
+ 8 -0.12228 0.11945 -0.17716 0.08467 -0.09409 -0.31636
+ 9 0.15147 -0.14801 -0.02818 0.01545 -0.19775 0.03783
+ 10 0.03113 0.28957 -0.29450 0.09912 -0.08052 0.16164
+ 11 0.00000 0.00000 0.00000 -0.24131 -0.01384 0.16566
+ 12 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
+ Calling the zero-angular momentum subroutine
+ vcm right after adjustment:
+ -2.929524022998914E-017 -5.326407314543479E-018 -1.731082377226631E-017
+
+
+ alpha-carbon coordinates centroid coordinates
+ X Y Z X Y Z
+D ( 1) 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
+ALA( 2) 3.80000 0.00000 0.00000 3.73284 0.42654 0.60465
+ALA( 3) 3.80000 -3.80000 0.00000 3.37346 -3.73284 -0.60465
+ALA( 4) 7.60000 -3.80000 0.00000 7.53284 -3.37346 0.60465
+ALA( 5) 7.60000 -7.60000 0.00000 7.25007 -7.43253 -0.63368
+ALA( 6) 11.40000 -7.60000 0.00000 11.33284 -7.17346 0.60465
+ALA( 7) 11.40000 -11.40000 0.00000 11.05007 -11.23253 -0.63368
+ALA( 8) 15.20000 -11.40000 0.00000 15.13284 -10.97346 0.60465
+ALA( 9) 15.20000 -15.20000 0.00000 14.77346 -15.13284 -0.60465
+ALA( 10) 19.00000 -15.20000 0.00000 18.93284 -14.77346 0.60465
+ALA( 11) 19.00000 -19.00000 0.00000 18.57346 -18.93284 -0.60465
+D ( 12) 22.80000 -19.00000 0.00000 22.80000 -19.00000 0.00000
+
+Geometry of the virtual chain.
+ Res d Theta Gamma Dsc Alpha Beta
+D 1 0.000 0.000 0.000 0.000 0.000 0.000
+ALA 2 3.800 0.000 0.000 0.743 110.000 -120.000
+ALA 3 3.800 90.000 0.000 0.743 110.000 -120.000
+ALA 4 3.800 90.000 180.000 0.743 110.000 -120.000
+ALA 5 3.800 90.000 180.000 0.743 100.000 -120.000
+ALA 6 3.800 90.000 180.000 0.743 110.000 -120.000
+ALA 7 3.800 90.000 180.000 0.743 100.000 -120.000
+ALA 8 3.800 90.000 180.000 0.743 110.000 -120.000
+ALA 9 3.800 90.000 180.000 0.743 110.000 -120.000
+ALA 10 3.800 90.000 180.000 0.743 110.000 -120.000
+ALA 11 3.800 90.000 180.000 0.743 110.000 -120.000
+D 12 3.800 90.000 180.000 0.000 180.000 180.000
+ Potential energy and its components
+
+Virtual-chain energies:
+
+EVDW= -1.466547E+01 WEIGHT= 1.352790D+00 (SC-SC)
+EVDW2= 1.045502E+01 WEIGHT= 1.593040D+00 (SC-p)
+EES= -3.731028E+00 WEIGHT= 7.153400D-01 (p-p)
+EVDWPP= -1.171261E+01 WEIGHT= 1.137100D-01 (p-p VDW)
+ESTR= 1.531499E-27 WEIGHT= 1.000000D+00 (stretching)
+EBE= -2.106038E+00 WEIGHT= 1.138730D+00 (bending)
+ESC= 9.424775E+01 WEIGHT= 1.625800D-01 (SC local)
+ETORS= 0.000000E+00 WEIGHT= 1.985990D+00 (torsional)
+ETORSD= -9.403905E-01 WEIGHT= 1.570690D+00 (double torsional)
+EHBP= 0.000000E+00 WEIGHT= 1.000000D+00 (SS bridges & dist. cnstr.)
+ECORR4= -2.225631E+00 WEIGHT= 4.288700D-01 (multi-body)
+ECORR5= 0.000000E+00 WEIGHT= 0.000000D+00 (multi-body)
+ECORR6= 0.000000E+00 WEIGHT= 0.000000D+00 (multi-body)
+EELLO= 1.644793E+01 WEIGHT= 1.603600D-01 (electrostatic-local)
+ETURN3= -1.490245E+00 WEIGHT= 1.687220D+00 (turns, 3rd order)
+ETURN4= 6.106256E+00 WEIGHT= 6.623000D-01 (turns, 4th order)
+ETURN6= 0.000000E+00 WEIGHT= 0.000000D+00 (turns, 6th order)
+ESCCOR= 0.000000E+00 WEIGHT= 1.000000D+00 (backbone-rotamer corr)
+EDIHC= 0.000000E+00 (dihedral angle constraints)
+ESS= 0.000000E+00 (disulfide-bridge intrinsic energy)
+UCONST= 0.000000E+00 (Constraint energy)
+ETOT= 7.475595E+00 (total)
+
+Initial:
+ Kinetic energy 1.64667E+01
+ potential energy 7.47559E+00
+ total energy 2.39423E+01
+
+ maximum acceleration 9.73465E-01
+
+Velocities reset to random values, time 84.93
+Momenta zeroed out, time 84.93
+Velocities reset to random values, time 162.90
+Momenta zeroed out, time 162.90
+Velocities reset to random values, time 249.85
+Momenta zeroed out, time 249.85
+Velocities reset to random values, time 319.31
+Momenta zeroed out, time 319.31
+Velocities reset to random values, time 398.92
+Momenta zeroed out, time 398.92
+Velocities reset to random values, time 476.10
+Momenta zeroed out, time 476.10
+Velocities reset to random values, time 540.82
+Momenta zeroed out, time 540.82
+Velocities reset to random values, time 612.01
+Momenta zeroed out, time 612.01
+Velocities reset to random values, time 687.88
+Momenta zeroed out, time 687.88
+Velocities reset to random values, time 762.77
+Momenta zeroed out, time 762.77
+
+
+=================================== Timing ===================================
+
+ MD calculations setup: 0.00000E+00
+ Energy & gradient evaluation: 7.80000E-01
+ Stochastic MD setup: 0.00000E+00
+ Stochastic MD step setup: 0.00000E+00
+ MD steps: 8.80000E-01
+
+
+============================ End of MD calculation ===========================
+
+
+***** Computation time: 0 hours 0 minutes 1 seconds *****
--- /dev/null
+ 762.874218750042 16.7068894456558 -9.52495969646534
+ 7.18192974919049 300.000000000000
+ 0.00000E+00 0.00000E+00 0.00000E+00
+ -0.50050E+00 0.60725E+00 0.15311E+00
+ 0.14719E+00 -0.23391E+00 0.85997E-01
+ -0.23010E+00 -0.31874E+00 0.14102E+00
+ 0.13411E+00 0.29864E+00 -0.39217E+00
+ -0.87656E-01 -0.24391E+00 0.10252E+00
+ 0.92362E-01 0.31446E+00 0.33708E+00
+ 0.59434E-01 -0.24152E+00 -0.24215E+00
+ -0.19140E+00 -0.58835E-02 -0.36460E-01
+ 0.20739E-01 0.18868E+00 0.54941E-01
+ 0.00000E+00 0.00000E+00 0.00000E+00
+ 0.00000E+00 0.00000E+00 0.00000E+00
+ 0.00000E+00 0.00000E+00 0.00000E+00
+ -0.17211E+00 0.14962E+00 -0.53198E-01
+ 0.37402E-01 -0.33329E+00 0.20813E+00
+ 0.97410E-01 -0.14024E+00 -0.25120E-01
+ 0.17827E+00 0.10293E+00 -0.13628E+00
+ 0.15438E+00 -0.11584E+00 0.10299E+00
+ 0.16099E+00 0.70136E-01 0.39551E-01
+ 0.97236E-01 0.39265E-02 -0.61408E-01
+ 0.26000E+00 0.23294E+00 -0.30235E-02
+ 0.43844E-01 0.12882E+00 0.18455E+00
+ -0.10385E+00 0.79485E-01 -0.43086E-01
+ 0.00000E+00 0.00000E+00 0.00000E+00
+ 0.38000E+01 0.00000E+00 0.00000E+00
+ 0.28635E+01 0.14450E+01 -0.19617E+01
+ 0.36316E+01 -0.77536E+00 -0.64699E+00
+ -0.76911E+00 0.55276E-01 -0.37348E+01
+ -0.14330E+01 0.34834E+01 0.32173E+00
+ 0.32851E+01 0.14137E+01 0.14138E+01
+ 0.21800E+01 -0.21248E+01 -0.22605E+01
+ 0.13810E+01 -0.31666E+01 0.15476E+01
+ 0.13000E+01 -0.27570E+01 -0.23114E+01
+ 0.12276E+01 -0.32677E+01 0.14444E+01
+ 0.38000E+01 -0.55583E-30 -0.23268E-14
+ 0.00000E+00 0.00000E+00 0.00000E+00
+ 0.00000E+00 0.00000E+00 0.00000E+00
+ -0.36917E-01 -0.67438E+00 0.17653E+00
+ 0.11494E+00 0.67124E+00 0.47263E-01
+ 0.36412E+00 -0.54904E+00 0.30919E+00
+ -0.51202E+00 -0.46879E+00 -0.28296E+00
+ -0.68371E+00 -0.19989E+00 0.73791E-01
+ 0.24266E+00 -0.12138E+00 0.66211E+00
+ 0.44340E+00 -0.14137E+00 -0.57216E+00
+ -0.33880E+00 -0.18304E+00 0.61886E+00
+ 0.40692E+00 0.63346E+00 -0.24106E+00
+ -0.53372E+00 -0.56804E+00 -0.17698E+00
+ 0.00000E+00 0.00000E+00 0.00000E+00
--- /dev/null
+ 0 0.00 16.467 7.476 23.942 0.973 276.380 300.000 7.834 0
+ 100 9.10 16.328 -6.245 10.083 0.913 274.046 300.000 8.684 0
+ 200 18.15 17.606 -8.260 9.346 0.821 295.503 300.000 9.852 0
+ 300 26.60 17.633 -6.013 11.620 0.142 295.952 300.000 10.097 0
+ 400 35.80 17.943 -5.890 12.053 0.547 301.156 300.000 8.982 0
+ 500 41.98 17.384 -3.630 13.754 0.148 291.768 300.000 8.448 0
+ 600 51.58 16.187 0.569 16.756 0.677 271.688 300.000 8.613 0
+ 700 60.66 17.691 -1.921 15.770 0.842 296.932 300.000 8.910 0
+ 800 70.01 18.301 -5.865 12.435 0.260 307.162 300.000 8.917 0
+ 900 79.56 18.508 -1.201 17.307 0.632 310.645 300.000 9.128 0
+ 1000 84.98 18.836 -2.314 16.522 0.245 316.144 300.000 9.136 0
+ 1100 92.93 18.012 -6.747 11.265 0.190 302.321 300.000 8.645 0
+ 1200 101.65 17.092 2.645 19.737 0.478 286.872 300.000 8.006 0
+ 1300 107.20 17.207 1.125 18.333 0.826 288.813 300.000 8.018 0
+ 1400 115.95 18.648 -1.952 16.696 0.560 312.984 300.000 8.570 0
+ 1500 124.95 18.069 -5.726 12.344 0.688 303.281 300.000 8.805 0
+ 1600 134.15 18.394 -10.412 7.982 0.445 308.725 300.000 8.641 0
+ 1700 141.91 18.166 -3.630 14.535 0.090 304.894 300.000 8.413 0
+ 1800 150.16 19.083 -6.497 12.586 0.809 320.290 300.000 8.272 0
+ 1900 153.55 17.612 -4.945 12.667 0.131 295.609 300.000 8.493 0
+ 2000 162.95 17.590 -1.869 15.721 0.159 295.239 300.000 8.767 0
+ 2100 171.05 17.209 -4.409 12.800 0.139 288.838 300.000 8.718 0
+ 2200 179.70 17.507 -7.610 9.897 0.139 293.838 300.000 8.769 0
+ 2300 187.85 17.120 -0.502 16.618 0.805 287.345 300.000 8.905 0
+ 2400 196.75 18.459 1.456 19.915 0.944 309.821 300.000 8.602 0
+ 2500 206.05 17.708 -2.636 15.072 0.836 297.219 300.000 8.410 0
+ 2600 215.35 18.956 -5.931 13.025 0.549 318.155 300.000 8.925 0
+ 2700 224.00 18.119 -6.021 12.098 0.572 304.115 300.000 9.351 0
+ 2800 231.50 18.678 5.920 24.598 0.792 313.492 300.000 9.333 0
+ 2900 240.60 17.320 -7.378 9.942 0.671 290.707 300.000 8.713 0
+ 3000 249.95 16.503 -1.872 14.631 0.784 276.984 300.000 8.098 0
+ 3100 255.97 17.818 4.567 22.385 0.002 299.060 300.000 8.132 0
+ 3200 263.92 18.398 -0.332 18.065 0.065 308.791 300.000 8.193 0
+ 3300 268.34 17.860 0.247 18.107 0.000 299.766 300.000 8.187 0
+ 3400 274.73 16.831 4.505 21.336 0.980 282.495 300.000 8.188 0
+ 3500 281.48 18.149 -1.105 17.044 0.163 304.618 300.000 8.418 0
+ 3600 289.33 19.066 -3.115 15.951 0.952 320.001 300.000 8.999 0
+ 3700 296.88 17.911 -8.099 9.812 0.528 300.623 300.000 9.419 0
+ 3800 306.33 18.439 -5.739 12.700 0.147 309.490 300.000 9.724 0
+ 3900 311.62 17.844 -2.005 15.838 0.001 299.489 300.000 9.417 0
+ 4000 319.36 17.788 -5.589 12.198 0.203 298.552 300.000 8.808 0
+ 4100 324.15 18.296 -0.895 17.401 0.652 307.084 300.000 8.896 0
+ 4200 329.04 17.523 -9.432 8.091 0.192 294.109 300.000 9.160 0
+ 4300 338.04 17.089 -0.430 16.659 0.935 286.826 300.000 9.730 0
+ 4400 347.09 17.437 -12.280 5.157 0.463 292.670 300.000 9.568 0
+ 4500 355.30 17.828 -6.993 10.835 0.951 299.234 300.000 9.095 0
+ 4600 365.10 17.447 0.593 18.040 0.264 292.827 300.000 8.617 0
+ 4700 374.40 17.248 -0.425 16.823 0.568 289.501 300.000 7.937 0
+ 4800 383.65 18.354 -0.773 17.581 0.620 308.061 300.000 7.793 0
+ 4900 390.77 18.793 -0.973 17.820 0.927 315.424 300.000 7.717 0
+ 5000 399.02 18.096 -1.591 16.505 0.722 303.729 300.000 7.397 0
+ 5100 408.72 17.308 1.699 19.008 0.680 290.509 300.000 7.222 0
+ 5200 415.89 17.852 5.048 22.901 0.003 299.639 300.000 7.369 0
+ 5300 424.20 17.934 0.214 18.147 0.130 301.004 300.000 7.566 0
+ 5400 432.65 18.692 -8.277 10.415 0.613 313.728 300.000 7.941 0
+ 5500 437.18 17.852 -7.456 10.396 0.020 299.631 300.000 8.147 0
+ 5600 445.70 17.562 -4.347 13.215 0.486 294.762 300.000 8.254 0
+ 5700 454.90 17.618 1.864 19.482 0.146 295.699 300.000 8.213 0
+ 5800 462.75 17.470 -4.524 12.946 0.807 293.219 300.000 7.987 0
+ 5900 471.70 17.535 -2.686 14.848 0.180 294.302 300.000 7.699 0
+ 6000 476.15 17.393 -1.046 16.347 0.138 291.925 300.000 7.754 0
+ 6100 482.98 18.158 6.699 24.856 0.122 304.763 300.000 7.391 0
+ 6200 489.35 17.753 -2.463 15.290 0.224 297.970 300.000 7.555 0
+ 6300 495.52 17.873 4.396 22.269 0.000 299.981 300.000 7.701 0
+ 6400 496.99 18.261 2.555 20.816 0.889 306.491 300.000 7.655 0
+ 6500 505.31 19.109 -3.507 15.602 0.559 320.730 300.000 7.549 0
+ 6600 511.86 19.921 -2.615 17.306 0.831 334.362 300.000 7.473 0
+ 6700 516.50 17.836 1.609 19.445 0.009 299.365 300.000 7.515 0
+ 6800 525.13 17.551 -5.494 12.058 0.813 294.583 300.000 7.319 0
+ 6900 534.48 16.969 -3.074 13.895 0.850 284.805 300.000 7.009 0
+ 7000 540.87 16.846 -3.773 13.073 0.141 282.746 300.000 6.951 0
+ 7100 547.49 18.501 -4.184 14.317 0.132 310.525 300.000 6.688 0
+ 7200 554.64 17.291 -1.757 15.535 0.877 290.215 300.000 6.455 0
+ 7300 561.99 16.237 -3.244 12.993 0.979 272.518 300.000 6.148 0
+ 7400 569.18 17.372 3.789 21.160 0.150 291.570 300.000 6.037 0
+ 7500 576.36 17.692 -1.857 15.835 0.916 296.950 300.000 5.832 0
+ 7600 580.20 17.908 3.568 21.476 0.045 300.575 300.000 5.672 0
+ 7700 586.58 17.253 -1.713 15.541 0.645 289.584 300.000 5.324 0
+ 7800 595.28 18.636 -4.664 13.972 0.768 312.794 300.000 5.042 0
+ 7900 602.66 17.616 -5.709 11.906 0.735 295.667 300.000 4.857 0
+ 8000 612.06 17.814 -4.197 13.617 0.153 298.996 300.000 5.023 0
+ 8100 619.07 17.423 -8.016 9.407 0.207 292.435 300.000 4.999 0
+ 8200 626.27 18.598 -4.785 13.813 0.453 312.145 300.000 4.862 0
+ 8300 634.62 17.465 -9.443 8.022 0.139 293.132 300.000 5.005 0
+ 8400 643.17 17.222 -4.356 12.866 0.719 289.049 300.000 5.086 0
+ 8500 652.47 18.706 -6.319 12.388 0.500 313.972 300.000 5.489 0
+ 8600 658.22 17.874 -8.851 9.023 0.000 299.999 300.000 5.720 0
+ 8700 666.44 20.872 5.048 25.920 0.446 350.319 300.000 5.880 0
+ 8800 674.14 18.412 -7.266 11.146 0.495 309.036 300.000 6.265 0
+ 8900 682.42 17.086 -5.330 11.755 0.852 286.772 300.000 6.611 0
+ 9000 687.98 18.421 -12.007 6.414 0.809 309.182 300.000 6.336 0
+ 9100 695.08 18.351 -1.368 16.983 0.176 307.998 300.000 6.306 0
+ 9200 700.84 18.777 -3.479 15.297 0.125 315.151 300.000 6.316 0
+ 9300 708.56 17.878 -5.025 12.854 0.000 300.075 300.000 6.027 0
+ 9400 713.22 17.006 -7.676 9.330 0.706 285.435 300.000 5.765 0
+ 9500 722.77 19.028 -10.245 8.783 0.655 319.362 300.000 5.419 0
+ 9600 729.81 17.878 -0.689 17.190 0.000 300.069 300.000 5.101 0
+ 9700 736.47 18.024 -11.583 6.441 0.441 302.514 300.000 5.360 0
+ 9800 744.92 18.233 -7.035 11.198 0.133 306.022 300.000 5.671 0
+ 9900 753.67 18.163 -12.974 5.189 0.826 304.847 300.000 5.703 0
+ 10000 762.87 16.707 -9.525 7.182 0.708 280.411 300.000 5.685 0
--- /dev/null
+ 1 0.84978127E+02 -0.23142E+01 0.00000E+00 300.00000
+ALA 149.777 -116.250
+ALA 115.006 159.994
+ALA 136.663 -165.949
+ALA 144.549 -160.838
+ALA 145.726 172.354
+ALA 130.111 -167.542
+ALA 91.980 133.026
+ALA 92.759 89.936
+ALA 115.225 115.286
+ALA 104.503
+ 2 0.16295000E+03 -0.18690E+01 0.00000E+00 300.00000
+ALA 100.883 -152.419
+ALA 114.047 95.450
+ALA 146.102 -137.939
+ALA 112.985 179.337
+ALA 141.104 -156.278
+ALA 140.256 -168.236
+ALA 102.050 162.119
+ALA 91.158 120.771
+ALA 89.182 139.040
+ALA 89.606
+ 3 0.24995000E+03 -0.18720E+01 0.00000E+00 300.00000
+ALA 104.388 158.274
+ALA 97.919 67.644
+ALA 110.100 -163.300
+ALA 108.685 166.084
+ALA 117.521 107.838
+ALA 112.365 -86.773
+ALA 131.325 -173.788
+ALA 105.013 140.652
+ALA 121.982 -171.326
+ALA 125.653
+ 4 0.31935858E+03 -0.55894E+01 0.00000E+00 300.00000
+ALA 112.920 -140.590
+ALA 100.328 166.852
+ALA 111.144 106.514
+ALA 97.985 178.549
+ALA 120.699 -152.026
+ALA 124.816 -175.948
+ALA 116.714 -156.814
+ALA 107.321 173.196
+ALA 114.722 163.522
+ALA 129.215
+ 5 0.39901797E+03 -0.15912E+01 0.00000E+00 300.00000
+ALA 121.180 -97.270
+ALA 127.421 -167.342
+ALA 90.137 126.194
+ALA 126.532 -125.402
+ALA 112.021 170.716
+ALA 86.923 75.196
+ALA 106.730 -121.619
+ALA 112.789 -148.902
+ALA 95.490 94.846
+ALA 127.742
+ 6 0.47615079E+03 -0.10461E+01 0.00000E+00 300.00000
+ALA 131.206 -167.357
+ALA 132.852 -159.425
+ALA 122.793 165.625
+ALA 92.453 74.728
+ALA 90.936 134.399
+ALA 94.777 -163.471
+ALA 117.081 156.140
+ALA 90.579 124.435
+ALA 97.267 -170.405
+ALA 132.830
+ 7 0.54086719E+03 -0.37729E+01 0.00000E+00 300.00000
+ALA 133.879 156.151
+ALA 111.476 -163.488
+ALA 109.341 174.653
+ALA 95.391 65.313
+ALA 90.352 52.539
+ALA 92.439 174.814
+ALA 126.855 -110.258
+ALA 117.771 -175.801
+ALA 120.593 -153.930
+ALA 107.506
+ 8 0.61206250E+03 -0.41971E+01 0.00000E+00 300.00000
+ALA 117.391 169.055
+ALA 84.971 83.016
+ALA 99.076 51.890
+ALA 91.358 47.572
+ALA 90.578 102.030
+ALA 88.648 -58.570
+ALA 103.319 -57.841
+ALA 98.287 172.865
+ALA 106.026 97.126
+ALA 88.519
+ 9 0.68797656E+03 -0.12007E+02 0.00000E+00 300.00000
+ALA 120.646 179.395
+ALA 88.205 125.417
+ALA 88.009 65.849
+ALA 89.373 65.627
+ALA 91.198 63.709
+ALA 84.865 -120.981
+ALA 135.339 179.669
+ALA 103.412 175.245
+ALA 110.230 -101.832
+ALA 123.634
+ 10 0.76287421E+03 -0.95250E+01 0.00000E+00 300.00000
+ALA 139.607 -156.396
+ALA 138.096 125.184
+ALA 88.328 55.289
+ALA 90.371 58.139
+ALA 92.648 37.754
+ALA 93.782 -98.046
+ALA 115.772 161.867
+ALA 118.675 -176.771
+ALA 120.187 -102.464
+ALA 108.963
--- /dev/null
+XAAAAAAAAAAX
C interactions
c 7/25/08 Commented out; not needed when cumulants used
C Interactions of pseudo-dipoles generated by loc-el interactions.
-c double precision dip,dipderg,dipderx
-c common /dipint/ dip(4,maxconts,maxres),dipderg(4,maxconts,maxres),
-c & dipderx(3,5,4,maxconts,maxres)
+#ifdef MOMENT
+ double precision dip,dipderg,dipderx
+ common /dipint/ dip(4,maxconts,maxres),dipderg(4,maxconts,maxres),
+ & dipderx(3,5,4,maxconts,maxres)
+#endif
C 10/30/99 Added other pre-computed vectors and matrices needed
C to calculate three - six-order el-loc correlation terms
double precision Ug,Ugder,Ug2,Ug2der,obrot,obrot2,obrot_der,
+++ /dev/null
-CPPFLAGS = -DPROCOR -DLINUX -DPGI -DISNAN -DMP -DMPI -DUNRES \
- -DSPLITELE -DAMD64 -DLANG0 \
- -DCRYST_BOND -DCRYST_THETA -DCRYST_SC
-#-DCRYST_TOR
-# -DPROCOR
-# -DTSCSC
-#-DTIMING \
-# -DCRYST_BOND -DCRYST_THETA -DCRYST_SC
-# -DMOMENT
-#-DPARVEC
-#-DPARINT -DPARINTDER
-
-#INSTALL_DIR = /usr/local/mpich-1.2.7p1-intel
-INSTALL_DIR = /users/local/mpi64/mpich-1.2.7p1/
-
-FC= ifort
-
-OPT = -O3 -ip -w
-
-FFLAGS = -c ${OPT} -I$(INSTALL_DIR)/include
-FFLAGS1 = -c -w -g -O0 -d2 -CA -CB -I$(INSTALL_DIR)/include
-FFLAGS2 = -c -w -g -O0 -I$(INSTALL_DIR)/include
-FFLAGS3 = -c -w -O3 -mp
-FFLAGSE = -c -w -O3 -ipo -ipo_obj -opt_report -I$(INSTALL_DIR)/include
-
-
-BIN = ../../../bin/unres/CSA/unres_csa_ifort_mpich-1.2.7p1.exe
-LIBS = -lpthread -L$(INSTALL_DIR)/lib -lmpich
-
-ARCH = LINUX
-PP = /lib/cpp -P
-
-
-all: unres
-
-.SUFFIXES: .F
-.F.o:
- ${FC} ${FFLAGS} ${CPPFLAGS} $*.F
-
-
-object = unres_csa.o arcos.o cartprint.o chainbuild.o initialize_p.o \
- matmult.o readrtns_csa.o parmread.o \
- pinorm.o randgens.o rescode.o intcor.o timing.o misc.o intlocal.o \
- cartder.o checkder_p.o econstr_local.o energy_p_new_barrier.o \
- gradient_p.o minimize_p.o sumsld.o \
- cored.o rmdd.o geomout_min.o readpdb.o \
- intcartderiv.o \
- MP.o printmat.o convert.o int_to_cart.o \
- dfa.o \
- together.o csa.o minim_jlee.o shift.o diff12.o bank.o newconf.o ran.o \
- indexx.o prng_32.o contact.o gen_rand_conf.o \
- sc_move.o test.o local_move.o rmsd.o fitsq.o elecont.o djacob.o \
- distfit.o banach.o TMscore_subroutine.o minim_mult.o
-
-unres: ${object}
-# cc -o compinfo compinfo.c
-# ./compinfo | true
- ${FC} ${FFLAGS} cinfo.f
- ${FC} ${OPT} ${object} cinfo.o ${LIBS} -o ${BIN}
-
-
-clean:
- /bin/rm *.o *.il
-
-chainbuild.o: chainbuild.F
- ${FC} ${FFLAGS} ${CPPFLAGS} chainbuild.F
-
-matmult.o: matmult.f
- ${FC} ${FFLAGS} ${CPPFLAGS} matmult.f
-
-parmread.o : parmread.F
- ${FC} ${FFLAGS} ${CPPFLAGS} parmread.F
-
-intcor.o : intcor.f
- ${FC} ${FFLAGS} ${CPPFLAGS} intcor.f
-
-cartder.o : cartder.F
- ${FC} ${FFLAGS} ${CPPFLAGS} cartder.F
-
-readpdb.o : readpdb.F
- ${FC} ${FFLAGS2} ${CPPFLAGS} readpdb.F
-
-sumsld.o : sumsld.f
- ${FC} ${FFLAGS} ${CPPFLAGS} sumsld.f
-
-cored.o : cored.f
- ${FC} ${FFLAGS3} ${CPPFLAGS} cored.f
-
-rmdd.o : rmdd.f
- ${FC} ${FFLAGS} ${CPPFLAGS} rmdd.f
-
-energy_p_new_barrier.o : energy_p_new_barrier.F
- ${FC} ${FFLAGSE} ${CPPFLAGS} energy_p_new_barrier.F
-
-gradient_p.o : gradient_p.F
- ${FC} ${FFLAGSE} ${CPPFLAGS} gradient_p.F
-
-dfa.o : dfa.F
- ${FC} -mp ${FFLAGS3} ${CPPFLAGS} dfa.F
-
-
-
--- /dev/null
+Makefile_CASP3
\ No newline at end of file
#-DPARVEC
#-DPARINT -DPARINTDER
-INSTALL_DIR = /usr/local/mpich-1.2.7p1-intel
-#INSTALL_DIR =/users/software/mpich-1.2.7p1_intel-10.1_em64_ssh/
+INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh
FC= ifort
FFLAGSE = -c -w -O3 -ipo -ipo_obj -opt_report -I$(INSTALL_DIR)/include
-BIN = ../bin/unres_Tc_procor_050711_dfa_csa_4P_800.exe
+BIN = ../../../bin/unres/CSA/unres_csa_ifort_mpich-1.2.7p1.exe
LIBS = -lpthread -L$(INSTALL_DIR)/lib -lmpich
ARCH = LINUX
together.o csa.o minim_jlee.o shift.o diff12.o bank.o newconf.o ran.o \
indexx.o prng_32.o contact.o gen_rand_conf.o \
sc_move.o test.o local_move.o rmsd.o fitsq.o elecont.o djacob.o \
- distfit.o banach.o
+ distfit.o banach.o TMscore_subroutine.o minim_mult.o
unres: ${object}
# cc -o compinfo compinfo.c
--- /dev/null
+CPPFLAGS = -DLINUX -DPGI -DISNAN -DMP -DMPI -DUNRES \
+ -DSPLITELE -DAMD64 -DLANG0 -DMOMENT \
+ -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DCRYST_TOR
+# -DPROCOR
+# -DTSCSC
+#-DTIMING \
+# -DCRYST_BOND -DCRYST_THETA -DCRYST_SC
+# -DMOMENT
+#-DPARVEC
+#-DPARINT -DPARINTDER
+
+INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh
+
+FC= ifort
+
+OPT = -O3 -ip -w
+
+FFLAGS = -c ${OPT} -I$(INSTALL_DIR)/include
+FFLAGS1 = -c -w -g -O0 -d2 -CA -CB -I$(INSTALL_DIR)/include
+FFLAGS2 = -c -w -g -O0 -I$(INSTALL_DIR)/include
+FFLAGS3 = -c -w -O3 -mp
+FFLAGSE = -c -w -O3 -ipo -ipo_obj -opt_report -I$(INSTALL_DIR)/include
+
+
+BIN = ../../../bin/unres/CSA/unres_csa-CASP3_ifort_mpich-1.2.7p1.exe
+LIBS = -lpthread -L$(INSTALL_DIR)/lib -lmpich
+
+ARCH = LINUX
+PP = /lib/cpp -P
+
+
+all: unres
+
+.SUFFIXES: .F
+.F.o:
+ ${FC} ${FFLAGS} ${CPPFLAGS} $*.F
+
+
+object = unres_csa.o arcos.o cartprint.o chainbuild.o initialize_p.o \
+ matmult.o readrtns_csa.o parmread.o \
+ pinorm.o randgens.o rescode.o intcor.o timing.o misc.o intlocal.o \
+ cartder.o checkder_p.o econstr_local.o energy_p_new_barrier.o \
+ gradient_p.o minimize_p.o sumsld.o \
+ cored.o rmdd.o geomout_min.o readpdb.o \
+ intcartderiv.o \
+ MP.o printmat.o convert.o int_to_cart.o \
+ dfa.o \
+ together.o csa.o minim_jlee.o shift.o diff12.o bank.o newconf.o ran.o \
+ indexx.o prng_32.o contact.o gen_rand_conf.o \
+ sc_move.o test.o local_move.o rmsd.o fitsq.o elecont.o djacob.o \
+ distfit.o banach.o TMscore_subroutine.o minim_mult.o
+
+unres: ${object}
+# cc -o compinfo compinfo.c
+# ./compinfo | true
+ ${FC} ${FFLAGS} cinfo.f
+ ${FC} ${OPT} ${object} cinfo.o ${LIBS} -o ${BIN}
+
+
+clean:
+ /bin/rm *.o *.il
+
+chainbuild.o: chainbuild.F
+ ${FC} ${FFLAGS} ${CPPFLAGS} chainbuild.F
+
+matmult.o: matmult.f
+ ${FC} ${FFLAGS} ${CPPFLAGS} matmult.f
+
+parmread.o : parmread.F
+ ${FC} ${FFLAGS} ${CPPFLAGS} parmread.F
+
+intcor.o : intcor.f
+ ${FC} ${FFLAGS} ${CPPFLAGS} intcor.f
+
+cartder.o : cartder.F
+ ${FC} ${FFLAGS} ${CPPFLAGS} cartder.F
+
+readpdb.o : readpdb.F
+ ${FC} ${FFLAGS2} ${CPPFLAGS} readpdb.F
+
+sumsld.o : sumsld.f
+ ${FC} ${FFLAGS} ${CPPFLAGS} sumsld.f
+
+cored.o : cored.f
+ ${FC} ${FFLAGS3} ${CPPFLAGS} cored.f
+
+rmdd.o : rmdd.f
+ ${FC} ${FFLAGS} ${CPPFLAGS} rmdd.f
+
+energy_p_new_barrier.o : energy_p_new_barrier.F
+ ${FC} ${FFLAGSE} ${CPPFLAGS} energy_p_new_barrier.F
+
+gradient_p.o : gradient_p.F
+ ${FC} ${FFLAGSE} ${CPPFLAGS} gradient_p.F
+
+dfa.o : dfa.F
+ ${FC} -mp ${FFLAGS3} ${CPPFLAGS} dfa.F
+
+
+
C DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C
-C 2 5 62
+C 2 5 63
subroutine cinfo
include 'COMMON.IOUNITS'
write(iout,*)'++++ Compile info ++++'
- write(iout,*)'Version 2.5 build 62'
- write(iout,*)'compiled Sun May 13 16:07:22 2012'
+ write(iout,*)'Version 2.5 build 63'
+ write(iout,*)'compiled Wed May 16 16:40:53 2012'
write(iout,*)'compiled by adam@matrix.chem.cornell.edu'
write(iout,*)'OS name: Linux '
write(iout,*)'OS release: 2.6.34.9-69.fc13.x86_64 '
call hpb_partition
endif
c write (iout,*) "After read_dist_constr nhpb",nhpb
- call flush(iout)
+c call flush(iout)
if (indpdb.eq.0 .and. modecalc.ne.2 .and. modecalc.ne.4
& .and. modecalc.ne.8 .and. modecalc.ne.9 .and.
& modecalc.ne.10) then
FC=gfortran
-BINDIR = ../bin
+BINDIR = ../../../bin
#OPT = -fast
OPT =
+++ /dev/null
-../xdrf
\ No newline at end of file
--- /dev/null
+# This make file is part of the xdrf package.
+#
+# (C) 1995 Frans van Hoesel, hoesel@chem.rug.nl
+#
+# 2006 modified by Cezary Czaplewski
+
+# Set C compiler and flags for ARCH
+CC = gcc
+CFLAGS = -O
+
+M4 = m4
+M4FILE = underscore.m4
+
+libxdrf.a: libxdrf.o ftocstr.o
+ ar cr libxdrf.a $?
+
+clean:
+ rm -f libxdrf.o ftocstr.o libxdrf.a
+
+ftocstr.o: ftocstr.c
+ $(CC) $(CFLAGS) -c ftocstr.c
+
+libxdrf.o: libxdrf.m4 $(M4FILE)
+ $(M4) $(M4FILE) libxdrf.m4 > libxdrf.c
+ $(CC) $(CFLAGS) -c libxdrf.c
+ rm -f libxdrf.c
+
--- /dev/null
+# This make file is part of the xdrf package.
+#
+# (C) 1995 Frans van Hoesel, hoesel@chem.rug.nl
+#
+# 2006 modified by Cezary Czaplewski
+
+# Set C compiler and flags for ARCH
+BGLSYS = /bgl/BlueLight/ppcfloor/bglsys
+
+CC = /usr/bin/blrts_xlc
+CPPC = /usr/bin/blrts_xlc
+
+CFLAGS= -O2 -I$(BGLSYS)/include -L$(BGLSYS)/lib -qarch=440d -qtune=440
+
+M4 = m4
+M4FILE = RS6K.m4
+
+libxdrf.a: libxdrf.o ftocstr.o xdr_array.o xdr.o xdr_float.o xdr_stdio.o
+ ar cr libxdrf.a $?
+
+clean:
+ rm -f *.o libxdrf.a
+
+ftocstr.o: ftocstr.c
+ $(CC) $(CFLAGS) -c ftocstr.c
+
+libxdrf.o: libxdrf.m4 $(M4FILE)
+ $(M4) $(M4FILE) libxdrf.m4 > libxdrf.c
+ $(CC) $(CFLAGS) -c libxdrf.c
+# rm -f libxdrf.c
+
--- /dev/null
+# This make file is part of the xdrf package.
+#
+# (C) 1995 Frans van Hoesel, hoesel@chem.rug.nl
+#
+# 2006 modified by Cezary Czaplewski
+
+# Set C compiler and flags for ARCH
+CC = cc
+CFLAGS = -O
+
+M4 = m4
+M4FILE = underscore.m4
+
+libxdrf.a: libxdrf.o ftocstr.o
+ ar cr libxdrf.a $?
+
+clean:
+ rm -f libxdrf.o ftocstr.o libxdrf.a
+
+ftocstr.o: ftocstr.c
+ $(CC) $(CFLAGS) -c ftocstr.c
+
+libxdrf.o: libxdrf.m4 $(M4FILE)
+ $(M4) $(M4FILE) libxdrf.m4 > libxdrf.c
+ $(CC) $(CFLAGS) -c libxdrf.c
+ rm -f libxdrf.c
+
--- /dev/null
+divert(-1)
+undefine(`len')
+#
+# do nothing special to FORTRAN function names
+#
+define(`FUNCTION',`$1')
+#
+# FORTRAN character strings are passed as follows:
+# a pointer to the base of the string is passed in the normal
+# argument list, and the length is passed by value as an extra
+# argument, after all of the other arguments.
+#
+define(`ARGS',`($1`'undivert(1))')
+define(`SAVE',`divert(1)$1`'divert(0)')
+define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')')
+define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len')
+define(`STRING_LEN',`$1_len')
+define(`STRING_PTR',`$1_ptr')
+divert(0)
+
--- /dev/null
+
+
+int ftocstr(ds, dl, ss, sl)
+ char *ds, *ss; /* dst, src ptrs */
+ int dl; /* dst max len */
+ int sl; /* src len */
+{
+ char *p;
+
+ for (p = ss + sl; --p >= ss && *p == ' '; ) ;
+ sl = p - ss + 1;
+ dl--;
+ ds[0] = 0;
+ if (sl > dl)
+ return 1;
+ while (sl--)
+ (*ds++ = *ss++);
+ *ds = '\0';
+ return 0;
+}
+
+
+int ctofstr(ds, dl, ss)
+ char *ds; /* dest space */
+ int dl; /* max dest length */
+ char *ss; /* src string (0-term) */
+{
+ while (dl && *ss) {
+ *ds++ = *ss++;
+ dl--;
+ }
+ while (dl--)
+ *ds++ = ' ';
+ return 0;
+}
--- /dev/null
+/*____________________________________________________________________________
+ |
+ | libxdrf - portable fortran interface to xdr. some xdr routines
+ | are C routines for compressed coordinates
+ |
+ | version 1.1
+ |
+ | This collection of routines is intended to write and read
+ | data in a portable way to a file, so data written on one type
+ | of machine can be read back on a different type.
+ |
+ | all fortran routines use an integer 'xdrid', which is an id to the
+ | current xdr file, and is set by xdrfopen.
+ | most routines have in integer 'ret' which is the return value.
+ | The value of 'ret' is zero on failure, and most of the time one
+ | on succes.
+ |
+ | There are three routines useful for C users:
+ | xdropen(), xdrclose(), xdr3dfcoord().
+ | The first two replace xdrstdio_create and xdr_destroy, and *must* be
+ | used when you plan to use xdr3dfcoord(). (they are also a bit
+ | easier to interface). For writing data other than compressed coordinates
+ | you should use the standard C xdr routines (see xdr man page)
+ |
+ | xdrfopen(xdrid, filename, mode, ret)
+ | character *(*) filename
+ | character *(*) mode
+ |
+ | this will open the file with the given filename (string)
+ | and the given mode, it returns an id in xdrid, which is
+ | to be used in all other calls to xdrf routines.
+ | mode is 'w' to create, or update an file, for all other
+ | values of mode the file is opened for reading
+ |
+ | you need to call xdrfclose to flush the output and close
+ | the file.
+ | Note that you should not use xdrstdio_create, which comes with the
+ | standard xdr library
+ |
+ | xdrfclose(xdrid, ret)
+ | flush the data to the file, and closes the file;
+ | You should not use xdr_destroy (which comes standard with
+ | the xdr libraries.
+ |
+ | xdrfbool(xdrid, bp, ret)
+ | integer pb
+ |
+ | This filter produces values of either 1 or 0
+ |
+ | xdrfchar(xdrid, cp, ret)
+ | character cp
+ |
+ | filter that translate between characters and their xdr representation
+ | Note that the characters in not compressed and occupies 4 bytes.
+ |
+ | xdrfdouble(xdrid, dp, ret)
+ | double dp
+ |
+ | read/write a double.
+ |
+ | xdrffloat(xdrid, fp, ret)
+ | float fp
+ |
+ | read/write a float.
+ |
+ | xdrfint(xdrid, ip, ret)
+ | integer ip
+ |
+ | read/write integer.
+ |
+ | xdrflong(xdrid, lp, ret)
+ | integer lp
+ |
+ | this routine has a possible portablility problem due to 64 bits longs.
+ |
+ | xdrfshort(xdrid, sp, ret)
+ | integer *2 sp
+ |
+ | xdrfstring(xdrid, sp, maxsize, ret)
+ | character *(*)
+ | integer maxsize
+ |
+ | read/write a string, with maximum length given by maxsize
+ |
+ | xdrfwrapstring(xdris, sp, ret)
+ | character *(*)
+ |
+ | read/write a string (it is the same as xdrfstring accept that it finds
+ | the stringlength itself.
+ |
+ | xdrfvector(xdrid, cp, size, xdrfproc, ret)
+ | character *(*)
+ | integer size
+ | external xdrfproc
+ |
+ | read/write an array pointed to by cp, with number of elements
+ | defined by 'size'. the routine 'xdrfproc' is the name
+ | of one of the above routines to read/write data (like xdrfdouble)
+ | In contrast with the c-version you don't need to specify the
+ | byte size of an element.
+ | xdrfstring is not allowed here (it is in the c version)
+ |
+ | xdrf3dfcoord(xdrid, fp, size, precision, ret)
+ | real (*) fp
+ | real precision
+ | integer size
+ |
+ | this is *NOT* a standard xdr routine. I named it this way, because
+ | it invites people to use the other xdr routines.
+ | It is introduced to store specifically 3d coordinates of molecules
+ | (as found in molecular dynamics) and it writes it in a compressed way.
+ | It starts by multiplying all numbers by precision and
+ | rounding the result to integer. effectively converting
+ | all floating point numbers to fixed point.
+ | it uses an algorithm for compression that is optimized for
+ | molecular data, but could be used for other 3d coordinates
+ | as well. There is subtantial overhead involved, so call this
+ | routine only if you have a large number of coordinates to read/write
+ |
+ | ________________________________________________________________________
+ |
+ | Below are the routines to be used by C programmers. Use the 'normal'
+ | xdr routines to write integers, floats, etc (see man xdr)
+ |
+ | int xdropen(XDR *xdrs, const char *filename, const char *type)
+ | This will open the file with the given filename and the
+ | given mode. You should pass it an allocated XDR struct
+ | in xdrs, to be used in all other calls to xdr routines.
+ | Mode is 'w' to create, or update an file, and for all
+ | other values of mode the file is opened for reading.
+ | You need to call xdrclose to flush the output and close
+ | the file.
+ |
+ | Note that you should not use xdrstdio_create, which
+ | comes with the standard xdr library.
+ |
+ | int xdrclose(XDR *xdrs)
+ | Flush the data to the file, and close the file;
+ | You should not use xdr_destroy (which comes standard
+ | with the xdr libraries).
+ |
+ | int xdr3dfcoord(XDR *xdrs, float *fp, int *size, float *precision)
+ | This is \fInot\fR a standard xdr routine. I named it this
+ | way, because it invites people to use the other xdr
+ | routines.
+ |
+ | (c) 1995 Frans van Hoesel, hoesel@chem.rug.nl
+*/
+
+
+#include <limits.h>
+#include <malloc.h>
+#include <math.h>
+/* #include <rpc/rpc.h>
+#include <rpc/xdr.h> */
+#include "xdr.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "xdrf.h"
+
+int ftocstr(char *, int, char *, int);
+int ctofstr(char *, int, char *);
+
+#define MAXID 20
+static FILE *xdrfiles[MAXID];
+static XDR *xdridptr[MAXID];
+static char xdrmodes[MAXID];
+static unsigned int cnt;
+
+typedef void (* FUNCTION(xdrfproc)) (int *, void *, int *);
+
+void
+FUNCTION(xdrfbool) ARGS(`xdrid, pb, ret')
+int *xdrid, *ret;
+int *pb;
+{
+ *ret = xdr_bool(xdridptr[*xdrid], (bool_t *) pb);
+ cnt += sizeof(int);
+}
+
+void
+FUNCTION(xdrfchar) ARGS(`xdrid, cp, ret')
+int *xdrid, *ret;
+char *cp;
+{
+ *ret = xdr_char(xdridptr[*xdrid], cp);
+ cnt += sizeof(char);
+}
+
+void
+FUNCTION(xdrfdouble) ARGS(`xdrid, dp, ret')
+int *xdrid, *ret;
+double *dp;
+{
+ *ret = xdr_double(xdridptr[*xdrid], dp);
+ cnt += sizeof(double);
+}
+
+void
+FUNCTION(xdrffloat) ARGS(`xdrid, fp, ret')
+int *xdrid, *ret;
+float *fp;
+{
+ *ret = xdr_float(xdridptr[*xdrid], fp);
+ cnt += sizeof(float);
+}
+
+void
+FUNCTION(xdrfint) ARGS(`xdrid, ip, ret')
+int *xdrid, *ret;
+int *ip;
+{
+ *ret = xdr_int(xdridptr[*xdrid], ip);
+ cnt += sizeof(int);
+}
+
+void
+FUNCTION(xdrflong) ARGS(`xdrid, lp, ret')
+int *xdrid, *ret;
+long *lp;
+{
+ *ret = xdr_long(xdridptr[*xdrid], lp);
+ cnt += sizeof(long);
+}
+
+void
+FUNCTION(xdrfshort) ARGS(`xdrid, sp, ret')
+int *xdrid, *ret;
+short *sp;
+{
+ *ret = xdr_short(xdridptr[*xdrid], sp);
+ cnt += sizeof(sp);
+}
+
+void
+FUNCTION(xdrfuchar) ARGS(`xdrid, ucp, ret')
+int *xdrid, *ret;
+char *ucp;
+{
+ *ret = xdr_u_char(xdridptr[*xdrid], ucp);
+ cnt += sizeof(char);
+}
+
+void
+FUNCTION(xdrfulong) ARGS(`xdrid, ulp, ret')
+int *xdrid, *ret;
+unsigned long *ulp;
+{
+ *ret = xdr_u_long(xdridptr[*xdrid], ulp);
+ cnt += sizeof(unsigned long);
+}
+
+void
+FUNCTION(xdrfushort) ARGS(`xdrid, usp, ret')
+int *xdrid, *ret;
+unsigned short *usp;
+{
+ *ret = xdr_u_short(xdridptr[*xdrid], usp);
+ cnt += sizeof(unsigned short);
+}
+
+void
+FUNCTION(xdrf3dfcoord) ARGS(`xdrid, fp, size, precision, ret')
+int *xdrid, *ret;
+float *fp;
+int *size;
+float *precision;
+{
+ *ret = xdr3dfcoord(xdridptr[*xdrid], fp, size, precision);
+}
+
+void
+FUNCTION(xdrfstring) ARGS(`xdrid, STRING_ARG(sp), maxsize, ret')
+int *xdrid, *ret;
+STRING_ARG_DECL(sp);
+int *maxsize;
+{
+ char *tsp;
+
+ tsp = (char*) malloc(((STRING_LEN(sp)) + 1) * sizeof(char));
+ if (tsp == NULL) {
+ *ret = -1;
+ return;
+ }
+ if (ftocstr(tsp, *maxsize+1, STRING_PTR(sp), STRING_LEN(sp))) {
+ *ret = -1;
+ free(tsp);
+ return;
+ }
+ *ret = xdr_string(xdridptr[*xdrid], (char **) &tsp, (u_int) *maxsize);
+ ctofstr( STRING_PTR(sp), STRING_LEN(sp), tsp);
+ cnt += *maxsize;
+ free(tsp);
+}
+
+void
+FUNCTION(xdrfwrapstring) ARGS(`xdrid, STRING_ARG(sp), ret')
+int *xdrid, *ret;
+STRING_ARG_DECL(sp);
+{
+ char *tsp;
+ int maxsize;
+ maxsize = (STRING_LEN(sp)) + 1;
+ tsp = (char*) malloc(maxsize * sizeof(char));
+ if (tsp == NULL) {
+ *ret = -1;
+ return;
+ }
+ if (ftocstr(tsp, maxsize, STRING_PTR(sp), STRING_LEN(sp))) {
+ *ret = -1;
+ free(tsp);
+ return;
+ }
+ *ret = xdr_string(xdridptr[*xdrid], (char **) &tsp, (u_int)maxsize);
+ ctofstr( STRING_PTR(sp), STRING_LEN(sp), tsp);
+ cnt += maxsize;
+ free(tsp);
+}
+
+void
+FUNCTION(xdrfopaque) ARGS(`xdrid, cp, ccnt, ret')
+int *xdrid, *ret;
+caddr_t *cp;
+int *ccnt;
+{
+ *ret = xdr_opaque(xdridptr[*xdrid], (caddr_t)*cp, (u_int)*ccnt);
+ cnt += *ccnt;
+}
+
+void
+FUNCTION(xdrfsetpos) ARGS(`xdrid, pos, ret')
+int *xdrid, *ret;
+int *pos;
+{
+ *ret = xdr_setpos(xdridptr[*xdrid], (u_int) *pos);
+}
+
+void
+FUNCTION(xdrf) ARGS(`xdrid, pos')
+int *xdrid, *pos;
+{
+ *pos = xdr_getpos(xdridptr[*xdrid]);
+}
+
+void
+FUNCTION(xdrfvector) ARGS(`xdrid, cp, size, elproc, ret')
+int *xdrid, *ret;
+char *cp;
+int *size;
+FUNCTION(xdrfproc) elproc;
+{
+ int lcnt;
+ cnt = 0;
+ for (lcnt = 0; lcnt < *size; lcnt++) {
+ elproc(xdrid, (cp+cnt) , ret);
+ }
+}
+
+
+void
+FUNCTION(xdrfclose) ARGS(`xdrid, ret')
+int *xdrid;
+int *ret;
+{
+ *ret = xdrclose(xdridptr[*xdrid]);
+ cnt = 0;
+}
+
+void
+FUNCTION(xdrfopen) ARGS(`xdrid, STRING_ARG(fp), STRING_ARG(mode), ret')
+int *xdrid;
+STRING_ARG_DECL(fp);
+STRING_ARG_DECL(mode);
+int *ret;
+{
+ char fname[512];
+ char fmode[3];
+
+ if (ftocstr(fname, sizeof(fname), STRING_PTR(fp), STRING_LEN(fp))) {
+ *ret = 0;
+ }
+ if (ftocstr(fmode, sizeof(fmode), STRING_PTR(mode),
+ STRING_LEN(mode))) {
+ *ret = 0;
+ }
+
+ *xdrid = xdropen(NULL, fname, fmode);
+ if (*xdrid == 0)
+ *ret = 0;
+ else
+ *ret = 1;
+}
+
+/*___________________________________________________________________________
+ |
+ | what follows are the C routines for opening, closing xdr streams
+ | and the routine to read/write compressed coordinates together
+ | with some routines to assist in this task (those are marked
+ | static and cannot be called from user programs)
+*/
+#define MAXABS INT_MAX-2
+
+#ifndef MIN
+#define MIN(x,y) ((x) < (y) ? (x):(y))
+#endif
+#ifndef MAX
+#define MAX(x,y) ((x) > (y) ? (x):(y))
+#endif
+#ifndef SQR
+#define SQR(x) ((x)*(x))
+#endif
+static int magicints[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 8, 10, 12, 16, 20, 25, 32, 40, 50, 64,
+ 80, 101, 128, 161, 203, 256, 322, 406, 512, 645,
+ 812, 1024, 1290, 1625, 2048, 2580, 3250, 4096, 5060, 6501,
+ 8192, 10321, 13003, 16384, 20642, 26007, 32768, 41285, 52015, 65536,
+ 82570, 104031, 131072, 165140, 208063, 262144, 330280, 416127, 524287, 660561,
+ 832255, 1048576, 1321122, 1664510, 2097152, 2642245, 3329021, 4194304, 5284491, 6658042,
+ 8388607, 10568983, 13316085, 16777216 };
+
+#define FIRSTIDX 9
+/* note that magicints[FIRSTIDX-1] == 0 */
+#define LASTIDX (sizeof(magicints) / sizeof(*magicints))
+
+
+/*__________________________________________________________________________
+ |
+ | xdropen - open xdr file
+ |
+ | This versions differs from xdrstdio_create, because I need to know
+ | the state of the file (read or write) so I can use xdr3dfcoord
+ | in eigther read or write mode, and the file descriptor
+ | so I can close the file (something xdr_destroy doesn't do).
+ |
+*/
+
+int xdropen(XDR *xdrs, const char *filename, const char *type) {
+ static int init_done = 0;
+ enum xdr_op lmode;
+ const char *type1;
+ int xdrid;
+
+ if (init_done == 0) {
+ for (xdrid = 1; xdrid < MAXID; xdrid++) {
+ xdridptr[xdrid] = NULL;
+ }
+ init_done = 1;
+ }
+ xdrid = 1;
+ while (xdrid < MAXID && xdridptr[xdrid] != NULL) {
+ xdrid++;
+ }
+ if (xdrid == MAXID) {
+ return 0;
+ }
+ if (*type == 'w' || *type == 'W') {
+ type = "w+";
+ type1 = "w+";
+ lmode = XDR_ENCODE;
+ } else if (*type == 'a' || *type == 'A') {
+ type = "w+";
+ type1 = "a+";
+ lmode = XDR_ENCODE;
+ } else {
+ type = "r";
+ type1 = "r";
+ lmode = XDR_DECODE;
+ }
+ xdrfiles[xdrid] = fopen(filename, type1);
+ if (xdrfiles[xdrid] == NULL) {
+ xdrs = NULL;
+ return 0;
+ }
+ xdrmodes[xdrid] = *type;
+ /* next test isn't usefull in the case of C language
+ * but is used for the Fortran interface
+ * (C users are expected to pass the address of an already allocated
+ * XDR staructure)
+ */
+ if (xdrs == NULL) {
+ xdridptr[xdrid] = (XDR *) malloc(sizeof(XDR));
+ xdrstdio_create(xdridptr[xdrid], xdrfiles[xdrid], lmode);
+ } else {
+ xdridptr[xdrid] = xdrs;
+ xdrstdio_create(xdrs, xdrfiles[xdrid], lmode);
+ }
+ return xdrid;
+}
+
+/*_________________________________________________________________________
+ |
+ | xdrclose - close a xdr file
+ |
+ | This will flush the xdr buffers, and destroy the xdr stream.
+ | It also closes the associated file descriptor (this is *not*
+ | done by xdr_destroy).
+ |
+*/
+
+int xdrclose(XDR *xdrs) {
+ int xdrid;
+
+ if (xdrs == NULL) {
+ fprintf(stderr, "xdrclose: passed a NULL pointer\n");
+ exit(1);
+ }
+ for (xdrid = 1; xdrid < MAXID; xdrid++) {
+ if (xdridptr[xdrid] == xdrs) {
+
+ xdr_destroy(xdrs);
+ fclose(xdrfiles[xdrid]);
+ xdridptr[xdrid] = NULL;
+ return 1;
+ }
+ }
+ fprintf(stderr, "xdrclose: no such open xdr file\n");
+ exit(1);
+
+}
+
+/*____________________________________________________________________________
+ |
+ | sendbits - encode num into buf using the specified number of bits
+ |
+ | This routines appends the value of num to the bits already present in
+ | the array buf. You need to give it the number of bits to use and you
+ | better make sure that this number of bits is enough to hold the value
+ | Also num must be positive.
+ |
+*/
+
+static void sendbits(int buf[], int num_of_bits, int num) {
+
+ unsigned int cnt, lastbyte;
+ int lastbits;
+ unsigned char * cbuf;
+
+ cbuf = ((unsigned char *)buf) + 3 * sizeof(*buf);
+ cnt = (unsigned int) buf[0];
+ lastbits = buf[1];
+ lastbyte =(unsigned int) buf[2];
+ while (num_of_bits >= 8) {
+ lastbyte = (lastbyte << 8) | ((num >> (num_of_bits -8)) /* & 0xff*/);
+ cbuf[cnt++] = lastbyte >> lastbits;
+ num_of_bits -= 8;
+ }
+ if (num_of_bits > 0) {
+ lastbyte = (lastbyte << num_of_bits) | num;
+ lastbits += num_of_bits;
+ if (lastbits >= 8) {
+ lastbits -= 8;
+ cbuf[cnt++] = lastbyte >> lastbits;
+ }
+ }
+ buf[0] = cnt;
+ buf[1] = lastbits;
+ buf[2] = lastbyte;
+ if (lastbits>0) {
+ cbuf[cnt] = lastbyte << (8 - lastbits);
+ }
+}
+
+/*_________________________________________________________________________
+ |
+ | sizeofint - calculate bitsize of an integer
+ |
+ | return the number of bits needed to store an integer with given max size
+ |
+*/
+
+static int sizeofint(const int size) {
+ unsigned int num = 1;
+ int num_of_bits = 0;
+
+ while (size >= num && num_of_bits < 32) {
+ num_of_bits++;
+ num <<= 1;
+ }
+ return num_of_bits;
+}
+
+/*___________________________________________________________________________
+ |
+ | sizeofints - calculate 'bitsize' of compressed ints
+ |
+ | given the number of small unsigned integers and the maximum value
+ | return the number of bits needed to read or write them with the
+ | routines receiveints and sendints. You need this parameter when
+ | calling these routines. Note that for many calls I can use
+ | the variable 'smallidx' which is exactly the number of bits, and
+ | So I don't need to call 'sizeofints for those calls.
+*/
+
+static int sizeofints( const int num_of_ints, unsigned int sizes[]) {
+ int i, num;
+ unsigned int num_of_bytes, num_of_bits, bytes[32], bytecnt, tmp;
+ num_of_bytes = 1;
+ bytes[0] = 1;
+ num_of_bits = 0;
+ for (i=0; i < num_of_ints; i++) {
+ tmp = 0;
+ for (bytecnt = 0; bytecnt < num_of_bytes; bytecnt++) {
+ tmp = bytes[bytecnt] * sizes[i] + tmp;
+ bytes[bytecnt] = tmp & 0xff;
+ tmp >>= 8;
+ }
+ while (tmp != 0) {
+ bytes[bytecnt++] = tmp & 0xff;
+ tmp >>= 8;
+ }
+ num_of_bytes = bytecnt;
+ }
+ num = 1;
+ num_of_bytes--;
+ while (bytes[num_of_bytes] >= num) {
+ num_of_bits++;
+ num *= 2;
+ }
+ return num_of_bits + num_of_bytes * 8;
+
+}
+
+/*____________________________________________________________________________
+ |
+ | sendints - send a small set of small integers in compressed format
+ |
+ | this routine is used internally by xdr3dfcoord, to send a set of
+ | small integers to the buffer.
+ | Multiplication with fixed (specified maximum ) sizes is used to get
+ | to one big, multibyte integer. Allthough the routine could be
+ | modified to handle sizes bigger than 16777216, or more than just
+ | a few integers, this is not done, because the gain in compression
+ | isn't worth the effort. Note that overflowing the multiplication
+ | or the byte buffer (32 bytes) is unchecked and causes bad results.
+ |
+ */
+
+static void sendints(int buf[], const int num_of_ints, const int num_of_bits,
+ unsigned int sizes[], unsigned int nums[]) {
+
+ int i;
+ unsigned int bytes[32], num_of_bytes, bytecnt, tmp;
+
+ tmp = nums[0];
+ num_of_bytes = 0;
+ do {
+ bytes[num_of_bytes++] = tmp & 0xff;
+ tmp >>= 8;
+ } while (tmp != 0);
+
+ for (i = 1; i < num_of_ints; i++) {
+ if (nums[i] >= sizes[i]) {
+ fprintf(stderr,"major breakdown in sendints num %d doesn't "
+ "match size %d\n", nums[i], sizes[i]);
+ exit(1);
+ }
+ /* use one step multiply */
+ tmp = nums[i];
+ for (bytecnt = 0; bytecnt < num_of_bytes; bytecnt++) {
+ tmp = bytes[bytecnt] * sizes[i] + tmp;
+ bytes[bytecnt] = tmp & 0xff;
+ tmp >>= 8;
+ }
+ while (tmp != 0) {
+ bytes[bytecnt++] = tmp & 0xff;
+ tmp >>= 8;
+ }
+ num_of_bytes = bytecnt;
+ }
+ if (num_of_bits >= num_of_bytes * 8) {
+ for (i = 0; i < num_of_bytes; i++) {
+ sendbits(buf, 8, bytes[i]);
+ }
+ sendbits(buf, num_of_bits - num_of_bytes * 8, 0);
+ } else {
+ for (i = 0; i < num_of_bytes-1; i++) {
+ sendbits(buf, 8, bytes[i]);
+ }
+ sendbits(buf, num_of_bits- (num_of_bytes -1) * 8, bytes[i]);
+ }
+}
+
+
+/*___________________________________________________________________________
+ |
+ | receivebits - decode number from buf using specified number of bits
+ |
+ | extract the number of bits from the array buf and construct an integer
+ | from it. Return that value.
+ |
+*/
+
+static int receivebits(int buf[], int num_of_bits) {
+
+ int cnt, num;
+ unsigned int lastbits, lastbyte;
+ unsigned char * cbuf;
+ int mask = (1 << num_of_bits) -1;
+
+ cbuf = ((unsigned char *)buf) + 3 * sizeof(*buf);
+ cnt = buf[0];
+ lastbits = (unsigned int) buf[1];
+ lastbyte = (unsigned int) buf[2];
+
+ num = 0;
+ while (num_of_bits >= 8) {
+ lastbyte = ( lastbyte << 8 ) | cbuf[cnt++];
+ num |= (lastbyte >> lastbits) << (num_of_bits - 8);
+ num_of_bits -=8;
+ }
+ if (num_of_bits > 0) {
+ if (lastbits < num_of_bits) {
+ lastbits += 8;
+ lastbyte = (lastbyte << 8) | cbuf[cnt++];
+ }
+ lastbits -= num_of_bits;
+ num |= (lastbyte >> lastbits) & ((1 << num_of_bits) -1);
+ }
+ num &= mask;
+ buf[0] = cnt;
+ buf[1] = lastbits;
+ buf[2] = lastbyte;
+ return num;
+}
+
+/*____________________________________________________________________________
+ |
+ | receiveints - decode 'small' integers from the buf array
+ |
+ | this routine is the inverse from sendints() and decodes the small integers
+ | written to buf by calculating the remainder and doing divisions with
+ | the given sizes[]. You need to specify the total number of bits to be
+ | used from buf in num_of_bits.
+ |
+*/
+
+static void receiveints(int buf[], const int num_of_ints, int num_of_bits,
+ unsigned int sizes[], int nums[]) {
+ int bytes[32];
+ int i, j, num_of_bytes, p, num;
+
+ bytes[1] = bytes[2] = bytes[3] = 0;
+ num_of_bytes = 0;
+ while (num_of_bits > 8) {
+ bytes[num_of_bytes++] = receivebits(buf, 8);
+ num_of_bits -= 8;
+ }
+ if (num_of_bits > 0) {
+ bytes[num_of_bytes++] = receivebits(buf, num_of_bits);
+ }
+ for (i = num_of_ints-1; i > 0; i--) {
+ num = 0;
+ for (j = num_of_bytes-1; j >=0; j--) {
+ num = (num << 8) | bytes[j];
+ p = num / sizes[i];
+ bytes[j] = p;
+ num = num - p * sizes[i];
+ }
+ nums[i] = num;
+ }
+ nums[0] = bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24);
+}
+
+/*____________________________________________________________________________
+ |
+ | xdr3dfcoord - read or write compressed 3d coordinates to xdr file.
+ |
+ | this routine reads or writes (depending on how you opened the file with
+ | xdropen() ) a large number of 3d coordinates (stored in *fp).
+ | The number of coordinates triplets to write is given by *size. On
+ | read this number may be zero, in which case it reads as many as were written
+ | or it may specify the number if triplets to read (which should match the
+ | number written).
+ | Compression is achieved by first converting all floating numbers to integer
+ | using multiplication by *precision and rounding to the nearest integer.
+ | Then the minimum and maximum value are calculated to determine the range.
+ | The limited range of integers so found, is used to compress the coordinates.
+ | In addition the differences between succesive coordinates is calculated.
+ | If the difference happens to be 'small' then only the difference is saved,
+ | compressing the data even more. The notion of 'small' is changed dynamically
+ | and is enlarged or reduced whenever needed or possible.
+ | Extra compression is achieved in the case of GROMOS and coordinates of
+ | water molecules. GROMOS first writes out the Oxygen position, followed by
+ | the two hydrogens. In order to make the differences smaller (and thereby
+ | compression the data better) the order is changed into first one hydrogen
+ | then the oxygen, followed by the other hydrogen. This is rather special, but
+ | it shouldn't harm in the general case.
+ |
+ */
+
+int xdr3dfcoord(XDR *xdrs, float *fp, int *size, float *precision) {
+
+
+ static int *ip = NULL;
+ static int oldsize;
+ static int *buf;
+
+ int minint[3], maxint[3], mindiff, *lip, diff;
+ int lint1, lint2, lint3, oldlint1, oldlint2, oldlint3, smallidx;
+ int minidx, maxidx;
+ unsigned sizeint[3], sizesmall[3], bitsizeint[3], size3, *luip;
+ int flag, k;
+ int small, smaller, larger, i, is_small, is_smaller, run, prevrun;
+ float *lfp, lf;
+ int tmp, *thiscoord, prevcoord[3];
+ unsigned int tmpcoord[30];
+
+ int bufsize, xdrid, lsize;
+ unsigned int bitsize;
+ float inv_precision;
+ int errval = 1;
+
+ /* find out if xdrs is opened for reading or for writing */
+ xdrid = 0;
+ while (xdridptr[xdrid] != xdrs) {
+ xdrid++;
+ if (xdrid >= MAXID) {
+ fprintf(stderr, "xdr error. no open xdr stream\n");
+ exit (1);
+ }
+ }
+ if (xdrmodes[xdrid] == 'w') {
+
+ /* xdrs is open for writing */
+
+ if (xdr_int(xdrs, size) == 0)
+ return 0;
+ size3 = *size * 3;
+ /* when the number of coordinates is small, don't try to compress; just
+ * write them as floats using xdr_vector
+ */
+ if (*size <= 9 ) {
+ return (xdr_vector(xdrs, (char *) fp, size3, sizeof(*fp),
+ (xdrproc_t)xdr_float));
+ }
+
+ xdr_float(xdrs, precision);
+ if (ip == NULL) {
+ ip = (int *)malloc(size3 * sizeof(*ip));
+ if (ip == NULL) {
+ fprintf(stderr,"malloc failed\n");
+ exit(1);
+ }
+ bufsize = size3 * 1.2;
+ buf = (int *)malloc(bufsize * sizeof(*buf));
+ if (buf == NULL) {
+ fprintf(stderr,"malloc failed\n");
+ exit(1);
+ }
+ oldsize = *size;
+ } else if (*size > oldsize) {
+ ip = (int *)realloc(ip, size3 * sizeof(*ip));
+ if (ip == NULL) {
+ fprintf(stderr,"malloc failed\n");
+ exit(1);
+ }
+ bufsize = size3 * 1.2;
+ buf = (int *)realloc(buf, bufsize * sizeof(*buf));
+ if (buf == NULL) {
+ fprintf(stderr,"malloc failed\n");
+ exit(1);
+ }
+ oldsize = *size;
+ }
+ /* buf[0-2] are special and do not contain actual data */
+ buf[0] = buf[1] = buf[2] = 0;
+ minint[0] = minint[1] = minint[2] = INT_MAX;
+ maxint[0] = maxint[1] = maxint[2] = INT_MIN;
+ prevrun = -1;
+ lfp = fp;
+ lip = ip;
+ mindiff = INT_MAX;
+ oldlint1 = oldlint2 = oldlint3 = 0;
+ while(lfp < fp + size3 ) {
+ /* find nearest integer */
+ if (*lfp >= 0.0)
+ lf = *lfp * *precision + 0.5;
+ else
+ lf = *lfp * *precision - 0.5;
+ if (fabs(lf) > MAXABS) {
+ /* scaling would cause overflow */
+ errval = 0;
+ }
+ lint1 = lf;
+ if (lint1 < minint[0]) minint[0] = lint1;
+ if (lint1 > maxint[0]) maxint[0] = lint1;
+ *lip++ = lint1;
+ lfp++;
+ if (*lfp >= 0.0)
+ lf = *lfp * *precision + 0.5;
+ else
+ lf = *lfp * *precision - 0.5;
+ if (fabs(lf) > MAXABS) {
+ /* scaling would cause overflow */
+ errval = 0;
+ }
+ lint2 = lf;
+ if (lint2 < minint[1]) minint[1] = lint2;
+ if (lint2 > maxint[1]) maxint[1] = lint2;
+ *lip++ = lint2;
+ lfp++;
+ if (*lfp >= 0.0)
+ lf = *lfp * *precision + 0.5;
+ else
+ lf = *lfp * *precision - 0.5;
+ if (fabs(lf) > MAXABS) {
+ /* scaling would cause overflow */
+ errval = 0;
+ }
+ lint3 = lf;
+ if (lint3 < minint[2]) minint[2] = lint3;
+ if (lint3 > maxint[2]) maxint[2] = lint3;
+ *lip++ = lint3;
+ lfp++;
+ diff = abs(oldlint1-lint1)+abs(oldlint2-lint2)+abs(oldlint3-lint3);
+ if (diff < mindiff && lfp > fp + 3)
+ mindiff = diff;
+ oldlint1 = lint1;
+ oldlint2 = lint2;
+ oldlint3 = lint3;
+ }
+ xdr_int(xdrs, &(minint[0]));
+ xdr_int(xdrs, &(minint[1]));
+ xdr_int(xdrs, &(minint[2]));
+
+ xdr_int(xdrs, &(maxint[0]));
+ xdr_int(xdrs, &(maxint[1]));
+ xdr_int(xdrs, &(maxint[2]));
+
+ if ((float)maxint[0] - (float)minint[0] >= MAXABS ||
+ (float)maxint[1] - (float)minint[1] >= MAXABS ||
+ (float)maxint[2] - (float)minint[2] >= MAXABS) {
+ /* turning value in unsigned by subtracting minint
+ * would cause overflow
+ */
+ errval = 0;
+ }
+ sizeint[0] = maxint[0] - minint[0]+1;
+ sizeint[1] = maxint[1] - minint[1]+1;
+ sizeint[2] = maxint[2] - minint[2]+1;
+
+ /* check if one of the sizes is to big to be multiplied */
+ if ((sizeint[0] | sizeint[1] | sizeint[2] ) > 0xffffff) {
+ bitsizeint[0] = sizeofint(sizeint[0]);
+ bitsizeint[1] = sizeofint(sizeint[1]);
+ bitsizeint[2] = sizeofint(sizeint[2]);
+ bitsize = 0; /* flag the use of large sizes */
+ } else {
+ bitsize = sizeofints(3, sizeint);
+ }
+ lip = ip;
+ luip = (unsigned int *) ip;
+ smallidx = FIRSTIDX;
+ while (smallidx < LASTIDX && magicints[smallidx] < mindiff) {
+ smallidx++;
+ }
+ xdr_int(xdrs, &smallidx);
+ maxidx = MIN(LASTIDX, smallidx + 8) ;
+ minidx = maxidx - 8; /* often this equal smallidx */
+ smaller = magicints[MAX(FIRSTIDX, smallidx-1)] / 2;
+ small = magicints[smallidx] / 2;
+ sizesmall[0] = sizesmall[1] = sizesmall[2] = magicints[smallidx];
+ larger = magicints[maxidx] / 2;
+ i = 0;
+ while (i < *size) {
+ is_small = 0;
+ thiscoord = (int *)(luip) + i * 3;
+ if (smallidx < maxidx && i >= 1 &&
+ abs(thiscoord[0] - prevcoord[0]) < larger &&
+ abs(thiscoord[1] - prevcoord[1]) < larger &&
+ abs(thiscoord[2] - prevcoord[2]) < larger) {
+ is_smaller = 1;
+ } else if (smallidx > minidx) {
+ is_smaller = -1;
+ } else {
+ is_smaller = 0;
+ }
+ if (i + 1 < *size) {
+ if (abs(thiscoord[0] - thiscoord[3]) < small &&
+ abs(thiscoord[1] - thiscoord[4]) < small &&
+ abs(thiscoord[2] - thiscoord[5]) < small) {
+ /* interchange first with second atom for better
+ * compression of water molecules
+ */
+ tmp = thiscoord[0]; thiscoord[0] = thiscoord[3];
+ thiscoord[3] = tmp;
+ tmp = thiscoord[1]; thiscoord[1] = thiscoord[4];
+ thiscoord[4] = tmp;
+ tmp = thiscoord[2]; thiscoord[2] = thiscoord[5];
+ thiscoord[5] = tmp;
+ is_small = 1;
+ }
+
+ }
+ tmpcoord[0] = thiscoord[0] - minint[0];
+ tmpcoord[1] = thiscoord[1] - minint[1];
+ tmpcoord[2] = thiscoord[2] - minint[2];
+ if (bitsize == 0) {
+ sendbits(buf, bitsizeint[0], tmpcoord[0]);
+ sendbits(buf, bitsizeint[1], tmpcoord[1]);
+ sendbits(buf, bitsizeint[2], tmpcoord[2]);
+ } else {
+ sendints(buf, 3, bitsize, sizeint, tmpcoord);
+ }
+ prevcoord[0] = thiscoord[0];
+ prevcoord[1] = thiscoord[1];
+ prevcoord[2] = thiscoord[2];
+ thiscoord = thiscoord + 3;
+ i++;
+
+ run = 0;
+ if (is_small == 0 && is_smaller == -1)
+ is_smaller = 0;
+ while (is_small && run < 8*3) {
+ if (is_smaller == -1 && (
+ SQR(thiscoord[0] - prevcoord[0]) +
+ SQR(thiscoord[1] - prevcoord[1]) +
+ SQR(thiscoord[2] - prevcoord[2]) >= smaller * smaller)) {
+ is_smaller = 0;
+ }
+
+ tmpcoord[run++] = thiscoord[0] - prevcoord[0] + small;
+ tmpcoord[run++] = thiscoord[1] - prevcoord[1] + small;
+ tmpcoord[run++] = thiscoord[2] - prevcoord[2] + small;
+
+ prevcoord[0] = thiscoord[0];
+ prevcoord[1] = thiscoord[1];
+ prevcoord[2] = thiscoord[2];
+
+ i++;
+ thiscoord = thiscoord + 3;
+ is_small = 0;
+ if (i < *size &&
+ abs(thiscoord[0] - prevcoord[0]) < small &&
+ abs(thiscoord[1] - prevcoord[1]) < small &&
+ abs(thiscoord[2] - prevcoord[2]) < small) {
+ is_small = 1;
+ }
+ }
+ if (run != prevrun || is_smaller != 0) {
+ prevrun = run;
+ sendbits(buf, 1, 1); /* flag the change in run-length */
+ sendbits(buf, 5, run+is_smaller+1);
+ } else {
+ sendbits(buf, 1, 0); /* flag the fact that runlength did not change */
+ }
+ for (k=0; k < run; k+=3) {
+ sendints(buf, 3, smallidx, sizesmall, &tmpcoord[k]);
+ }
+ if (is_smaller != 0) {
+ smallidx += is_smaller;
+ if (is_smaller < 0) {
+ small = smaller;
+ smaller = magicints[smallidx-1] / 2;
+ } else {
+ smaller = small;
+ small = magicints[smallidx] / 2;
+ }
+ sizesmall[0] = sizesmall[1] = sizesmall[2] = magicints[smallidx];
+ }
+ }
+ if (buf[1] != 0) buf[0]++;;
+ xdr_int(xdrs, &(buf[0])); /* buf[0] holds the length in bytes */
+ return errval * (xdr_opaque(xdrs, (caddr_t)&(buf[3]), (u_int)buf[0]));
+ } else {
+
+ /* xdrs is open for reading */
+
+ if (xdr_int(xdrs, &lsize) == 0)
+ return 0;
+ if (*size != 0 && lsize != *size) {
+ fprintf(stderr, "wrong number of coordinates in xdr3dfcoor; "
+ "%d arg vs %d in file", *size, lsize);
+ }
+ *size = lsize;
+ size3 = *size * 3;
+ if (*size <= 9) {
+ return (xdr_vector(xdrs, (char *) fp, size3, sizeof(*fp),
+ (xdrproc_t)xdr_float));
+ }
+ xdr_float(xdrs, precision);
+ if (ip == NULL) {
+ ip = (int *)malloc(size3 * sizeof(*ip));
+ if (ip == NULL) {
+ fprintf(stderr,"malloc failed\n");
+ exit(1);
+ }
+ bufsize = size3 * 1.2;
+ buf = (int *)malloc(bufsize * sizeof(*buf));
+ if (buf == NULL) {
+ fprintf(stderr,"malloc failed\n");
+ exit(1);
+ }
+ oldsize = *size;
+ } else if (*size > oldsize) {
+ ip = (int *)realloc(ip, size3 * sizeof(*ip));
+ if (ip == NULL) {
+ fprintf(stderr,"malloc failed\n");
+ exit(1);
+ }
+ bufsize = size3 * 1.2;
+ buf = (int *)realloc(buf, bufsize * sizeof(*buf));
+ if (buf == NULL) {
+ fprintf(stderr,"malloc failed\n");
+ exit(1);
+ }
+ oldsize = *size;
+ }
+ buf[0] = buf[1] = buf[2] = 0;
+
+ xdr_int(xdrs, &(minint[0]));
+ xdr_int(xdrs, &(minint[1]));
+ xdr_int(xdrs, &(minint[2]));
+
+ xdr_int(xdrs, &(maxint[0]));
+ xdr_int(xdrs, &(maxint[1]));
+ xdr_int(xdrs, &(maxint[2]));
+
+ sizeint[0] = maxint[0] - minint[0]+1;
+ sizeint[1] = maxint[1] - minint[1]+1;
+ sizeint[2] = maxint[2] - minint[2]+1;
+
+ /* check if one of the sizes is to big to be multiplied */
+ if ((sizeint[0] | sizeint[1] | sizeint[2] ) > 0xffffff) {
+ bitsizeint[0] = sizeofint(sizeint[0]);
+ bitsizeint[1] = sizeofint(sizeint[1]);
+ bitsizeint[2] = sizeofint(sizeint[2]);
+ bitsize = 0; /* flag the use of large sizes */
+ } else {
+ bitsize = sizeofints(3, sizeint);
+ }
+
+ xdr_int(xdrs, &smallidx);
+ maxidx = MIN(LASTIDX, smallidx + 8) ;
+ minidx = maxidx - 8; /* often this equal smallidx */
+ smaller = magicints[MAX(FIRSTIDX, smallidx-1)] / 2;
+ small = magicints[smallidx] / 2;
+ sizesmall[0] = sizesmall[1] = sizesmall[2] = magicints[smallidx] ;
+ larger = magicints[maxidx];
+
+ /* buf[0] holds the length in bytes */
+
+ if (xdr_int(xdrs, &(buf[0])) == 0)
+ return 0;
+ if (xdr_opaque(xdrs, (caddr_t)&(buf[3]), (u_int)buf[0]) == 0)
+ return 0;
+ buf[0] = buf[1] = buf[2] = 0;
+
+ lfp = fp;
+ inv_precision = 1.0 / * precision;
+ run = 0;
+ i = 0;
+ lip = ip;
+ while ( i < lsize ) {
+ thiscoord = (int *)(lip) + i * 3;
+
+ if (bitsize == 0) {
+ thiscoord[0] = receivebits(buf, bitsizeint[0]);
+ thiscoord[1] = receivebits(buf, bitsizeint[1]);
+ thiscoord[2] = receivebits(buf, bitsizeint[2]);
+ } else {
+ receiveints(buf, 3, bitsize, sizeint, thiscoord);
+ }
+
+ i++;
+ thiscoord[0] += minint[0];
+ thiscoord[1] += minint[1];
+ thiscoord[2] += minint[2];
+
+ prevcoord[0] = thiscoord[0];
+ prevcoord[1] = thiscoord[1];
+ prevcoord[2] = thiscoord[2];
+
+
+ flag = receivebits(buf, 1);
+ is_smaller = 0;
+ if (flag == 1) {
+ run = receivebits(buf, 5);
+ is_smaller = run % 3;
+ run -= is_smaller;
+ is_smaller--;
+ }
+ if (run > 0) {
+ thiscoord += 3;
+ for (k = 0; k < run; k+=3) {
+ receiveints(buf, 3, smallidx, sizesmall, thiscoord);
+ i++;
+ thiscoord[0] += prevcoord[0] - small;
+ thiscoord[1] += prevcoord[1] - small;
+ thiscoord[2] += prevcoord[2] - small;
+ if (k == 0) {
+ /* interchange first with second atom for better
+ * compression of water molecules
+ */
+ tmp = thiscoord[0]; thiscoord[0] = prevcoord[0];
+ prevcoord[0] = tmp;
+ tmp = thiscoord[1]; thiscoord[1] = prevcoord[1];
+ prevcoord[1] = tmp;
+ tmp = thiscoord[2]; thiscoord[2] = prevcoord[2];
+ prevcoord[2] = tmp;
+ *lfp++ = prevcoord[0] * inv_precision;
+ *lfp++ = prevcoord[1] * inv_precision;
+ *lfp++ = prevcoord[2] * inv_precision;
+ } else {
+ prevcoord[0] = thiscoord[0];
+ prevcoord[1] = thiscoord[1];
+ prevcoord[2] = thiscoord[2];
+ }
+ *lfp++ = thiscoord[0] * inv_precision;
+ *lfp++ = thiscoord[1] * inv_precision;
+ *lfp++ = thiscoord[2] * inv_precision;
+ }
+ } else {
+ *lfp++ = thiscoord[0] * inv_precision;
+ *lfp++ = thiscoord[1] * inv_precision;
+ *lfp++ = thiscoord[2] * inv_precision;
+ }
+ smallidx += is_smaller;
+ if (is_smaller < 0) {
+ small = smaller;
+ if (smallidx > FIRSTIDX) {
+ smaller = magicints[smallidx - 1] /2;
+ } else {
+ smaller = 0;
+ }
+ } else if (is_smaller > 0) {
+ smaller = small;
+ small = magicints[smallidx] / 2;
+ }
+ sizesmall[0] = sizesmall[1] = sizesmall[2] = magicints[smallidx] ;
+ }
+ }
+ return 1;
+}
+
+
+
--- /dev/null
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part. Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+/* fixincludes should not add extern "C" to this file */
+/*
+ * Rpc additions to <sys/types.h>
+ */
+#ifndef _RPC_TYPES_H
+#define _RPC_TYPES_H 1
+
+typedef int bool_t;
+typedef int enum_t;
+/* This needs to be changed to uint32_t in the future */
+typedef unsigned long rpcprog_t;
+typedef unsigned long rpcvers_t;
+typedef unsigned long rpcproc_t;
+typedef unsigned long rpcprot_t;
+typedef unsigned long rpcport_t;
+
+#define __dontcare__ -1
+
+#ifndef FALSE
+# define FALSE (0)
+#endif
+
+#ifndef TRUE
+# define TRUE (1)
+#endif
+
+#ifndef NULL
+# define NULL 0
+#endif
+
+#include <stdlib.h> /* For malloc decl. */
+#define mem_alloc(bsize) malloc(bsize)
+/*
+ * XXX: This must not use the second argument, or code in xdr_array.c needs
+ * to be modified.
+ */
+#define mem_free(ptr, bsize) free(ptr)
+
+#ifndef makedev /* ie, we haven't already included it */
+#include <sys/types.h>
+#endif
+
+#ifndef __u_char_defined
+typedef __u_char u_char;
+typedef __u_short u_short;
+typedef __u_int u_int;
+typedef __u_long u_long;
+typedef __quad_t quad_t;
+typedef __u_quad_t u_quad_t;
+typedef __fsid_t fsid_t;
+# define __u_char_defined
+#endif
+#ifndef __daddr_t_defined
+typedef __daddr_t daddr_t;
+typedef __caddr_t caddr_t;
+# define __daddr_t_defined
+#endif
+
+#include <sys/time.h>
+#include <sys/param.h>
+
+#include <netinet/in.h>
+
+#ifndef INADDR_LOOPBACK
+#define INADDR_LOOPBACK (u_long)0x7F000001
+#endif
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 64
+#endif
+
+#endif /* rpc/types.h */
--- /dev/null
+divert(-1)
+undefine(`len')
+#
+# append an underscore to FORTRAN function names
+#
+define(`FUNCTION',`$1_')
+#
+# FORTRAN character strings are passed as follows:
+# a pointer to the base of the string is passed in the normal
+# argument list, and the length is passed by value as an extra
+# argument, after all of the other arguments.
+#
+define(`ARGS',`($1`'undivert(1))')
+define(`SAVE',`divert(1)$1`'divert(0)')
+define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')')
+define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len')
+define(`STRING_LEN',`$1_len')
+define(`STRING_PTR',`$1_ptr')
+divert(0)
--- /dev/null
+# define INTUSE(name) name
+# define INTDEF(name)
+/* @(#)xdr.c 2.1 88/07/29 4.0 RPCSRC */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part. Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+#if !defined(lint) && defined(SCCSIDS)
+static char sccsid[] = "@(#)xdr.c 1.35 87/08/12";
+#endif
+
+/*
+ * xdr.c, Generic XDR routines implementation.
+ *
+ * Copyright (C) 1986, Sun Microsystems, Inc.
+ *
+ * These are the "generic" xdr routines used to serialize and de-serialize
+ * most common data items. See xdr.h for more info on the interface to
+ * xdr.
+ */
+
+#include <stdio.h>
+#include <limits.h>
+#include <string.h>
+#include <libintl.h>
+
+#include "types.h"
+#include "xdr.h"
+
+#ifdef USE_IN_LIBIO
+# include <wchar.h>
+#endif
+
+/*
+ * constants specific to the xdr "protocol"
+ */
+#define XDR_FALSE ((long) 0)
+#define XDR_TRUE ((long) 1)
+#define LASTUNSIGNED ((u_int) 0-1)
+
+/*
+ * for unit alignment
+ */
+static const char xdr_zero[BYTES_PER_XDR_UNIT] = {0, 0, 0, 0};
+
+/*
+ * Free a data structure using XDR
+ * Not a filter, but a convenient utility nonetheless
+ */
+void
+xdr_free (xdrproc_t proc, char *objp)
+{
+ XDR x;
+
+ x.x_op = XDR_FREE;
+ (*proc) (&x, objp);
+}
+
+/*
+ * XDR nothing
+ */
+bool_t
+xdr_void (void)
+{
+ return TRUE;
+}
+INTDEF(xdr_void)
+
+/*
+ * XDR integers
+ */
+bool_t
+xdr_int (XDR *xdrs, int *ip)
+{
+
+#if INT_MAX < LONG_MAX
+ long l;
+
+ switch (xdrs->x_op)
+ {
+ case XDR_ENCODE:
+ l = (long) *ip;
+ return XDR_PUTLONG (xdrs, &l);
+
+ case XDR_DECODE:
+ if (!XDR_GETLONG (xdrs, &l))
+ {
+ return FALSE;
+ }
+ *ip = (int) l;
+ case XDR_FREE:
+ return TRUE;
+ }
+ return FALSE;
+#elif INT_MAX == LONG_MAX
+ return INTUSE(xdr_long) (xdrs, (long *) ip);
+#elif INT_MAX == SHRT_MAX
+ return INTUSE(xdr_short) (xdrs, (short *) ip);
+#else
+#error unexpected integer sizes in_xdr_int()
+#endif
+}
+INTDEF(xdr_int)
+
+/*
+ * XDR unsigned integers
+ */
+bool_t
+xdr_u_int (XDR *xdrs, u_int *up)
+{
+#if UINT_MAX < ULONG_MAX
+ long l;
+
+ switch (xdrs->x_op)
+ {
+ case XDR_ENCODE:
+ l = (u_long) * up;
+ return XDR_PUTLONG (xdrs, &l);
+
+ case XDR_DECODE:
+ if (!XDR_GETLONG (xdrs, &l))
+ {
+ return FALSE;
+ }
+ *up = (u_int) (u_long) l;
+ case XDR_FREE:
+ return TRUE;
+ }
+ return FALSE;
+#elif UINT_MAX == ULONG_MAX
+ return INTUSE(xdr_u_long) (xdrs, (u_long *) up);
+#elif UINT_MAX == USHRT_MAX
+ return INTUSE(xdr_short) (xdrs, (short *) up);
+#else
+#error unexpected integer sizes in_xdr_u_int()
+#endif
+}
+INTDEF(xdr_u_int)
+
+/*
+ * XDR long integers
+ * The definition of xdr_long() is kept for backward
+ * compatibility. Instead xdr_int() should be used.
+ */
+bool_t
+xdr_long (XDR *xdrs, long *lp)
+{
+
+ if (xdrs->x_op == XDR_ENCODE
+ && (sizeof (int32_t) == sizeof (long)
+ || (int32_t) *lp == *lp))
+ return XDR_PUTLONG (xdrs, lp);
+
+ if (xdrs->x_op == XDR_DECODE)
+ return XDR_GETLONG (xdrs, lp);
+
+ if (xdrs->x_op == XDR_FREE)
+ return TRUE;
+
+ return FALSE;
+}
+INTDEF(xdr_long)
+
+/*
+ * XDR unsigned long integers
+ * The definition of xdr_u_long() is kept for backward
+ * compatibility. Instead xdr_u_int() should be used.
+ */
+bool_t
+xdr_u_long (XDR *xdrs, u_long *ulp)
+{
+ switch (xdrs->x_op)
+ {
+ case XDR_DECODE:
+ {
+ long int tmp;
+
+ if (XDR_GETLONG (xdrs, &tmp) == FALSE)
+ return FALSE;
+
+ *ulp = (uint32_t) tmp;
+ return TRUE;
+ }
+
+ case XDR_ENCODE:
+ if (sizeof (uint32_t) != sizeof (u_long)
+ && (uint32_t) *ulp != *ulp)
+ return FALSE;
+
+ return XDR_PUTLONG (xdrs, (long *) ulp);
+
+ case XDR_FREE:
+ return TRUE;
+ }
+ return FALSE;
+}
+INTDEF(xdr_u_long)
+
+/*
+ * XDR hyper integers
+ * same as xdr_u_hyper - open coded to save a proc call!
+ */
+bool_t
+xdr_hyper (XDR *xdrs, quad_t *llp)
+{
+ long int t1, t2;
+
+ if (xdrs->x_op == XDR_ENCODE)
+ {
+ t1 = (long) ((*llp) >> 32);
+ t2 = (long) (*llp);
+ return (XDR_PUTLONG(xdrs, &t1) && XDR_PUTLONG(xdrs, &t2));
+ }
+
+ if (xdrs->x_op == XDR_DECODE)
+ {
+ if (!XDR_GETLONG(xdrs, &t1) || !XDR_GETLONG(xdrs, &t2))
+ return FALSE;
+ *llp = ((quad_t) t1) << 32;
+ *llp |= (uint32_t) t2;
+ return TRUE;
+ }
+
+ if (xdrs->x_op == XDR_FREE)
+ return TRUE;
+
+ return FALSE;
+}
+INTDEF(xdr_hyper)
+
+
+/*
+ * XDR hyper integers
+ * same as xdr_hyper - open coded to save a proc call!
+ */
+bool_t
+xdr_u_hyper (XDR *xdrs, u_quad_t *ullp)
+{
+ long int t1, t2;
+
+ if (xdrs->x_op == XDR_ENCODE)
+ {
+ t1 = (unsigned long) ((*ullp) >> 32);
+ t2 = (unsigned long) (*ullp);
+ return (XDR_PUTLONG(xdrs, &t1) && XDR_PUTLONG(xdrs, &t2));
+ }
+
+ if (xdrs->x_op == XDR_DECODE)
+ {
+ if (!XDR_GETLONG(xdrs, &t1) || !XDR_GETLONG(xdrs, &t2))
+ return FALSE;
+ *ullp = ((u_quad_t) t1) << 32;
+ *ullp |= (uint32_t) t2;
+ return TRUE;
+ }
+
+ if (xdrs->x_op == XDR_FREE)
+ return TRUE;
+
+ return FALSE;
+}
+INTDEF(xdr_u_hyper)
+
+bool_t
+xdr_longlong_t (XDR *xdrs, quad_t *llp)
+{
+ return INTUSE(xdr_hyper) (xdrs, llp);
+}
+
+bool_t
+xdr_u_longlong_t (XDR *xdrs, u_quad_t *ullp)
+{
+ return INTUSE(xdr_u_hyper) (xdrs, ullp);
+}
+
+/*
+ * XDR short integers
+ */
+bool_t
+xdr_short (XDR *xdrs, short *sp)
+{
+ long l;
+
+ switch (xdrs->x_op)
+ {
+ case XDR_ENCODE:
+ l = (long) *sp;
+ return XDR_PUTLONG (xdrs, &l);
+
+ case XDR_DECODE:
+ if (!XDR_GETLONG (xdrs, &l))
+ {
+ return FALSE;
+ }
+ *sp = (short) l;
+ return TRUE;
+
+ case XDR_FREE:
+ return TRUE;
+ }
+ return FALSE;
+}
+INTDEF(xdr_short)
+
+/*
+ * XDR unsigned short integers
+ */
+bool_t
+xdr_u_short (XDR *xdrs, u_short *usp)
+{
+ long l;
+
+ switch (xdrs->x_op)
+ {
+ case XDR_ENCODE:
+ l = (u_long) * usp;
+ return XDR_PUTLONG (xdrs, &l);
+
+ case XDR_DECODE:
+ if (!XDR_GETLONG (xdrs, &l))
+ {
+ return FALSE;
+ }
+ *usp = (u_short) (u_long) l;
+ return TRUE;
+
+ case XDR_FREE:
+ return TRUE;
+ }
+ return FALSE;
+}
+INTDEF(xdr_u_short)
+
+
+/*
+ * XDR a char
+ */
+bool_t
+xdr_char (XDR *xdrs, char *cp)
+{
+ int i;
+
+ i = (*cp);
+ if (!INTUSE(xdr_int) (xdrs, &i))
+ {
+ return FALSE;
+ }
+ *cp = i;
+ return TRUE;
+}
+
+/*
+ * XDR an unsigned char
+ */
+bool_t
+xdr_u_char (XDR *xdrs, u_char *cp)
+{
+ u_int u;
+
+ u = (*cp);
+ if (!INTUSE(xdr_u_int) (xdrs, &u))
+ {
+ return FALSE;
+ }
+ *cp = u;
+ return TRUE;
+}
+
+/*
+ * XDR booleans
+ */
+bool_t
+xdr_bool (XDR *xdrs, bool_t *bp)
+{
+ long lb;
+
+ switch (xdrs->x_op)
+ {
+ case XDR_ENCODE:
+ lb = *bp ? XDR_TRUE : XDR_FALSE;
+ return XDR_PUTLONG (xdrs, &lb);
+
+ case XDR_DECODE:
+ if (!XDR_GETLONG (xdrs, &lb))
+ {
+ return FALSE;
+ }
+ *bp = (lb == XDR_FALSE) ? FALSE : TRUE;
+ return TRUE;
+
+ case XDR_FREE:
+ return TRUE;
+ }
+ return FALSE;
+}
+INTDEF(xdr_bool)
+
+/*
+ * XDR enumerations
+ */
+bool_t
+xdr_enum (XDR *xdrs, enum_t *ep)
+{
+ enum sizecheck
+ {
+ SIZEVAL
+ }; /* used to find the size of an enum */
+
+ /*
+ * enums are treated as ints
+ */
+ if (sizeof (enum sizecheck) == 4)
+ {
+#if INT_MAX < LONG_MAX
+ long l;
+
+ switch (xdrs->x_op)
+ {
+ case XDR_ENCODE:
+ l = *ep;
+ return XDR_PUTLONG (xdrs, &l);
+
+ case XDR_DECODE:
+ if (!XDR_GETLONG (xdrs, &l))
+ {
+ return FALSE;
+ }
+ *ep = l;
+ case XDR_FREE:
+ return TRUE;
+
+ }
+ return FALSE;
+#else
+ return INTUSE(xdr_long) (xdrs, (long *) ep);
+#endif
+ }
+ else if (sizeof (enum sizecheck) == sizeof (short))
+ {
+ return INTUSE(xdr_short) (xdrs, (short *) ep);
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+INTDEF(xdr_enum)
+
+/*
+ * XDR opaque data
+ * Allows the specification of a fixed size sequence of opaque bytes.
+ * cp points to the opaque object and cnt gives the byte length.
+ */
+bool_t
+xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
+{
+ u_int rndup;
+ static char crud[BYTES_PER_XDR_UNIT];
+
+ /*
+ * if no data we are done
+ */
+ if (cnt == 0)
+ return TRUE;
+
+ /*
+ * round byte count to full xdr units
+ */
+ rndup = cnt % BYTES_PER_XDR_UNIT;
+ if (rndup > 0)
+ rndup = BYTES_PER_XDR_UNIT - rndup;
+
+ switch (xdrs->x_op)
+ {
+ case XDR_DECODE:
+ if (!XDR_GETBYTES (xdrs, cp, cnt))
+ {
+ return FALSE;
+ }
+ if (rndup == 0)
+ return TRUE;
+ return XDR_GETBYTES (xdrs, (caddr_t)crud, rndup);
+
+ case XDR_ENCODE:
+ if (!XDR_PUTBYTES (xdrs, cp, cnt))
+ {
+ return FALSE;
+ }
+ if (rndup == 0)
+ return TRUE;
+ return XDR_PUTBYTES (xdrs, xdr_zero, rndup);
+
+ case XDR_FREE:
+ return TRUE;
+ }
+ return FALSE;
+}
+INTDEF(xdr_opaque)
+
+/*
+ * XDR counted bytes
+ * *cpp is a pointer to the bytes, *sizep is the count.
+ * If *cpp is NULL maxsize bytes are allocated
+ */
+bool_t
+xdr_bytes (xdrs, cpp, sizep, maxsize)
+ XDR *xdrs;
+ char **cpp;
+ u_int *sizep;
+ u_int maxsize;
+{
+ char *sp = *cpp; /* sp is the actual string pointer */
+ u_int nodesize;
+
+ /*
+ * first deal with the length since xdr bytes are counted
+ */
+ if (!INTUSE(xdr_u_int) (xdrs, sizep))
+ {
+ return FALSE;
+ }
+ nodesize = *sizep;
+ if ((nodesize > maxsize) && (xdrs->x_op != XDR_FREE))
+ {
+ return FALSE;
+ }
+
+ /*
+ * now deal with the actual bytes
+ */
+ switch (xdrs->x_op)
+ {
+ case XDR_DECODE:
+ if (nodesize == 0)
+ {
+ return TRUE;
+ }
+ if (sp == NULL)
+ {
+ *cpp = sp = (char *) mem_alloc (nodesize);
+ }
+ if (sp == NULL)
+ {
+ fprintf (NULL, "%s", "xdr_bytes: out of memory\n");
+ return FALSE;
+ }
+ /* fall into ... */
+
+ case XDR_ENCODE:
+ return INTUSE(xdr_opaque) (xdrs, sp, nodesize);
+
+ case XDR_FREE:
+ if (sp != NULL)
+ {
+ mem_free (sp, nodesize);
+ *cpp = NULL;
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+INTDEF(xdr_bytes)
+
+/*
+ * Implemented here due to commonality of the object.
+ */
+bool_t
+xdr_netobj (xdrs, np)
+ XDR *xdrs;
+ struct netobj *np;
+{
+
+ return INTUSE(xdr_bytes) (xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ);
+}
+INTDEF(xdr_netobj)
+
+/*
+ * XDR a discriminated union
+ * Support routine for discriminated unions.
+ * You create an array of xdrdiscrim structures, terminated with
+ * an entry with a null procedure pointer. The routine gets
+ * the discriminant value and then searches the array of xdrdiscrims
+ * looking for that value. It calls the procedure given in the xdrdiscrim
+ * to handle the discriminant. If there is no specific routine a default
+ * routine may be called.
+ * If there is no specific or default routine an error is returned.
+ */
+bool_t
+xdr_union (xdrs, dscmp, unp, choices, dfault)
+ XDR *xdrs;
+ enum_t *dscmp; /* enum to decide which arm to work on */
+ char *unp; /* the union itself */
+ const struct xdr_discrim *choices; /* [value, xdr proc] for each arm */
+ xdrproc_t dfault; /* default xdr routine */
+{
+ enum_t dscm;
+
+ /*
+ * we deal with the discriminator; it's an enum
+ */
+ if (!INTUSE(xdr_enum) (xdrs, dscmp))
+ {
+ return FALSE;
+ }
+ dscm = *dscmp;
+
+ /*
+ * search choices for a value that matches the discriminator.
+ * if we find one, execute the xdr routine for that value.
+ */
+ for (; choices->proc != NULL_xdrproc_t; choices++)
+ {
+ if (choices->value == dscm)
+ return (*(choices->proc)) (xdrs, unp, LASTUNSIGNED);
+ }
+
+ /*
+ * no match - execute the default xdr routine if there is one
+ */
+ return ((dfault == NULL_xdrproc_t) ? FALSE :
+ (*dfault) (xdrs, unp, LASTUNSIGNED));
+}
+INTDEF(xdr_union)
+
+
+/*
+ * Non-portable xdr primitives.
+ * Care should be taken when moving these routines to new architectures.
+ */
+
+
+/*
+ * XDR null terminated ASCII strings
+ * xdr_string deals with "C strings" - arrays of bytes that are
+ * terminated by a NULL character. The parameter cpp references a
+ * pointer to storage; If the pointer is null, then the necessary
+ * storage is allocated. The last parameter is the max allowed length
+ * of the string as specified by a protocol.
+ */
+bool_t
+xdr_string (xdrs, cpp, maxsize)
+ XDR *xdrs;
+ char **cpp;
+ u_int maxsize;
+{
+ char *sp = *cpp; /* sp is the actual string pointer */
+ u_int size;
+ u_int nodesize;
+
+ /*
+ * first deal with the length since xdr strings are counted-strings
+ */
+ switch (xdrs->x_op)
+ {
+ case XDR_FREE:
+ if (sp == NULL)
+ {
+ return TRUE; /* already free */
+ }
+ /* fall through... */
+ case XDR_ENCODE:
+ if (sp == NULL)
+ return FALSE;
+ size = strlen (sp);
+ break;
+ case XDR_DECODE:
+ break;
+ }
+ if (!INTUSE(xdr_u_int) (xdrs, &size))
+ {
+ return FALSE;
+ }
+ if (size > maxsize)
+ {
+ return FALSE;
+ }
+ nodesize = size + 1;
+ if (nodesize == 0)
+ {
+ /* This means an overflow. It a bug in the caller which
+ provided a too large maxsize but nevertheless catch it
+ here. */
+ return FALSE;
+ }
+
+ /*
+ * now deal with the actual bytes
+ */
+ switch (xdrs->x_op)
+ {
+ case XDR_DECODE:
+ if (sp == NULL)
+ *cpp = sp = (char *) mem_alloc (nodesize);
+ if (sp == NULL)
+ {
+ fprintf (NULL, "%s", "xdr_string: out of memory\n");
+ return FALSE;
+ }
+ sp[size] = 0;
+ /* fall into ... */
+
+ case XDR_ENCODE:
+ return INTUSE(xdr_opaque) (xdrs, sp, size);
+
+ case XDR_FREE:
+ mem_free (sp, nodesize);
+ *cpp = NULL;
+ return TRUE;
+ }
+ return FALSE;
+}
+INTDEF(xdr_string)
+
+/*
+ * Wrapper for xdr_string that can be called directly from
+ * routines like clnt_call
+ */
+bool_t
+xdr_wrapstring (xdrs, cpp)
+ XDR *xdrs;
+ char **cpp;
+{
+ if (INTUSE(xdr_string) (xdrs, cpp, LASTUNSIGNED))
+ {
+ return TRUE;
+ }
+ return FALSE;
+}
--- /dev/null
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part. Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+/*
+ * xdr.h, External Data Representation Serialization Routines.
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ */
+
+#ifndef _RPC_XDR_H
+#define _RPC_XDR_H 1
+
+#include <features.h>
+#include <sys/types.h>
+#include "types.h"
+
+/* We need FILE. */
+#include <stdio.h>
+
+__BEGIN_DECLS
+
+/*
+ * XDR provides a conventional way for converting between C data
+ * types and an external bit-string representation. Library supplied
+ * routines provide for the conversion on built-in C data types. These
+ * routines and utility routines defined here are used to help implement
+ * a type encode/decode routine for each user-defined type.
+ *
+ * Each data type provides a single procedure which takes two arguments:
+ *
+ * bool_t
+ * xdrproc(xdrs, argresp)
+ * XDR *xdrs;
+ * <type> *argresp;
+ *
+ * xdrs is an instance of a XDR handle, to which or from which the data
+ * type is to be converted. argresp is a pointer to the structure to be
+ * converted. The XDR handle contains an operation field which indicates
+ * which of the operations (ENCODE, DECODE * or FREE) is to be performed.
+ *
+ * XDR_DECODE may allocate space if the pointer argresp is null. This
+ * data can be freed with the XDR_FREE operation.
+ *
+ * We write only one procedure per data type to make it easy
+ * to keep the encode and decode procedures for a data type consistent.
+ * In many cases the same code performs all operations on a user defined type,
+ * because all the hard work is done in the component type routines.
+ * decode as a series of calls on the nested data types.
+ */
+
+/*
+ * Xdr operations. XDR_ENCODE causes the type to be encoded into the
+ * stream. XDR_DECODE causes the type to be extracted from the stream.
+ * XDR_FREE can be used to release the space allocated by an XDR_DECODE
+ * request.
+ */
+enum xdr_op {
+ XDR_ENCODE = 0,
+ XDR_DECODE = 1,
+ XDR_FREE = 2
+};
+
+/*
+ * This is the number of bytes per unit of external data.
+ */
+#define BYTES_PER_XDR_UNIT (4)
+/*
+ * This only works if the above is a power of 2. But it's defined to be
+ * 4 by the appropriate RFCs. So it will work. And it's normally quicker
+ * than the old routine.
+ */
+#if 1
+#define RNDUP(x) (((x) + BYTES_PER_XDR_UNIT - 1) & ~(BYTES_PER_XDR_UNIT - 1))
+#else /* this is the old routine */
+#define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \
+ * BYTES_PER_XDR_UNIT)
+#endif
+
+/*
+ * The XDR handle.
+ * Contains operation which is being applied to the stream,
+ * an operations vector for the particular implementation (e.g. see xdr_mem.c),
+ * and two private fields for the use of the particular implementation.
+ */
+typedef struct XDR XDR;
+struct XDR
+ {
+ enum xdr_op x_op; /* operation; fast additional param */
+ struct xdr_ops
+ {
+ bool_t (*x_getlong) (XDR *__xdrs, long *__lp);
+ /* get a long from underlying stream */
+ bool_t (*x_putlong) (XDR *__xdrs, __const long *__lp);
+ /* put a long to " */
+ bool_t (*x_getbytes) (XDR *__xdrs, caddr_t __addr, u_int __len);
+ /* get some bytes from " */
+ bool_t (*x_putbytes) (XDR *__xdrs, __const char *__addr, u_int __len);
+ /* put some bytes to " */
+ u_int (*x_getpostn) (__const XDR *__xdrs);
+ /* returns bytes off from beginning */
+ bool_t (*x_setpostn) (XDR *__xdrs, u_int __pos);
+ /* lets you reposition the stream */
+ int32_t *(*x_inline) (XDR *__xdrs, u_int __len);
+ /* buf quick ptr to buffered data */
+ void (*x_destroy) (XDR *__xdrs);
+ /* free privates of this xdr_stream */
+ bool_t (*x_getint32) (XDR *__xdrs, int32_t *__ip);
+ /* get a int from underlying stream */
+ bool_t (*x_putint32) (XDR *__xdrs, __const int32_t *__ip);
+ /* put a int to " */
+ }
+ *x_ops;
+ caddr_t x_public; /* users' data */
+ caddr_t x_private; /* pointer to private data */
+ caddr_t x_base; /* private used for position info */
+ u_int x_handy; /* extra private word */
+ };
+
+/*
+ * A xdrproc_t exists for each data type which is to be encoded or decoded.
+ *
+ * The second argument to the xdrproc_t is a pointer to an opaque pointer.
+ * The opaque pointer generally points to a structure of the data type
+ * to be decoded. If this pointer is 0, then the type routines should
+ * allocate dynamic storage of the appropriate size and return it.
+ * bool_t (*xdrproc_t)(XDR *, caddr_t *);
+ */
+typedef bool_t (*xdrproc_t) (XDR *, void *,...);
+
+
+/*
+ * Operations defined on a XDR handle
+ *
+ * XDR *xdrs;
+ * int32_t *int32p;
+ * long *longp;
+ * caddr_t addr;
+ * u_int len;
+ * u_int pos;
+ */
+#define XDR_GETINT32(xdrs, int32p) \
+ (*(xdrs)->x_ops->x_getint32)(xdrs, int32p)
+#define xdr_getint32(xdrs, int32p) \
+ (*(xdrs)->x_ops->x_getint32)(xdrs, int32p)
+
+#define XDR_PUTINT32(xdrs, int32p) \
+ (*(xdrs)->x_ops->x_putint32)(xdrs, int32p)
+#define xdr_putint32(xdrs, int32p) \
+ (*(xdrs)->x_ops->x_putint32)(xdrs, int32p)
+
+#define XDR_GETLONG(xdrs, longp) \
+ (*(xdrs)->x_ops->x_getlong)(xdrs, longp)
+#define xdr_getlong(xdrs, longp) \
+ (*(xdrs)->x_ops->x_getlong)(xdrs, longp)
+
+#define XDR_PUTLONG(xdrs, longp) \
+ (*(xdrs)->x_ops->x_putlong)(xdrs, longp)
+#define xdr_putlong(xdrs, longp) \
+ (*(xdrs)->x_ops->x_putlong)(xdrs, longp)
+
+#define XDR_GETBYTES(xdrs, addr, len) \
+ (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
+#define xdr_getbytes(xdrs, addr, len) \
+ (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
+
+#define XDR_PUTBYTES(xdrs, addr, len) \
+ (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
+#define xdr_putbytes(xdrs, addr, len) \
+ (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
+
+#define XDR_GETPOS(xdrs) \
+ (*(xdrs)->x_ops->x_getpostn)(xdrs)
+#define xdr_getpos(xdrs) \
+ (*(xdrs)->x_ops->x_getpostn)(xdrs)
+
+#define XDR_SETPOS(xdrs, pos) \
+ (*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
+#define xdr_setpos(xdrs, pos) \
+ (*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
+
+#define XDR_INLINE(xdrs, len) \
+ (*(xdrs)->x_ops->x_inline)(xdrs, len)
+#define xdr_inline(xdrs, len) \
+ (*(xdrs)->x_ops->x_inline)(xdrs, len)
+
+#define XDR_DESTROY(xdrs) \
+ do { \
+ if ((xdrs)->x_ops->x_destroy) \
+ (*(xdrs)->x_ops->x_destroy)(xdrs); \
+ } while (0)
+#define xdr_destroy(xdrs) \
+ do { \
+ if ((xdrs)->x_ops->x_destroy) \
+ (*(xdrs)->x_ops->x_destroy)(xdrs); \
+ } while (0)
+
+/*
+ * Support struct for discriminated unions.
+ * You create an array of xdrdiscrim structures, terminated with
+ * a entry with a null procedure pointer. The xdr_union routine gets
+ * the discriminant value and then searches the array of structures
+ * for a matching value. If a match is found the associated xdr routine
+ * is called to handle that part of the union. If there is
+ * no match, then a default routine may be called.
+ * If there is no match and no default routine it is an error.
+ */
+#define NULL_xdrproc_t ((xdrproc_t)0)
+struct xdr_discrim
+{
+ int value;
+ xdrproc_t proc;
+};
+
+/*
+ * Inline routines for fast encode/decode of primitive data types.
+ * Caveat emptor: these use single memory cycles to get the
+ * data from the underlying buffer, and will fail to operate
+ * properly if the data is not aligned. The standard way to use these
+ * is to say:
+ * if ((buf = XDR_INLINE(xdrs, count)) == NULL)
+ * return (FALSE);
+ * <<< macro calls >>>
+ * where ``count'' is the number of bytes of data occupied
+ * by the primitive data types.
+ *
+ * N.B. and frozen for all time: each data type here uses 4 bytes
+ * of external representation.
+ */
+
+#define IXDR_GET_INT32(buf) ((int32_t)ntohl((uint32_t)*(buf)++))
+#define IXDR_PUT_INT32(buf, v) (*(buf)++ = (int32_t)htonl((uint32_t)(v)))
+#define IXDR_GET_U_INT32(buf) ((uint32_t)IXDR_GET_INT32(buf))
+#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_INT32(buf, (int32_t)(v))
+
+/* WARNING: The IXDR_*_LONG defines are removed by Sun for new platforms
+ * and shouldn't be used any longer. Code which use this defines or longs
+ * in the RPC code will not work on 64bit Solaris platforms !
+ */
+#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf))
+#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v)))
+#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf))
+#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG(buf, (long)(v))
+
+
+#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf))
+#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf))
+#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf))
+#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_LONG(buf))
+
+#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG(buf, (long)(v))
+#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG(buf, (long)(v))
+#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG(buf, (long)(v))
+#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG(buf, (long)(v))
+
+/*
+ * These are the "generic" xdr routines.
+ * None of these can have const applied because it's not possible to
+ * know whether the call is a read or a write to the passed parameter
+ * also, the XDR structure is always updated by some of these calls.
+ */
+extern bool_t xdr_void (void) __THROW;
+extern bool_t xdr_short (XDR *__xdrs, short *__sp) __THROW;
+extern bool_t xdr_u_short (XDR *__xdrs, u_short *__usp) __THROW;
+extern bool_t xdr_int (XDR *__xdrs, int *__ip) __THROW;
+extern bool_t xdr_u_int (XDR *__xdrs, u_int *__up) __THROW;
+extern bool_t xdr_long (XDR *__xdrs, long *__lp) __THROW;
+extern bool_t xdr_u_long (XDR *__xdrs, u_long *__ulp) __THROW;
+extern bool_t xdr_hyper (XDR *__xdrs, quad_t *__llp) __THROW;
+extern bool_t xdr_u_hyper (XDR *__xdrs, u_quad_t *__ullp) __THROW;
+extern bool_t xdr_longlong_t (XDR *__xdrs, quad_t *__llp) __THROW;
+extern bool_t xdr_u_longlong_t (XDR *__xdrs, u_quad_t *__ullp) __THROW;
+extern bool_t xdr_int8_t (XDR *__xdrs, int8_t *__ip) __THROW;
+extern bool_t xdr_uint8_t (XDR *__xdrs, uint8_t *__up) __THROW;
+extern bool_t xdr_int16_t (XDR *__xdrs, int16_t *__ip) __THROW;
+extern bool_t xdr_uint16_t (XDR *__xdrs, uint16_t *__up) __THROW;
+extern bool_t xdr_int32_t (XDR *__xdrs, int32_t *__ip) __THROW;
+extern bool_t xdr_uint32_t (XDR *__xdrs, uint32_t *__up) __THROW;
+extern bool_t xdr_int64_t (XDR *__xdrs, int64_t *__ip) __THROW;
+extern bool_t xdr_uint64_t (XDR *__xdrs, uint64_t *__up) __THROW;
+extern bool_t xdr_quad_t (XDR *__xdrs, quad_t *__ip) __THROW;
+extern bool_t xdr_u_quad_t (XDR *__xdrs, u_quad_t *__up) __THROW;
+extern bool_t xdr_bool (XDR *__xdrs, bool_t *__bp) __THROW;
+extern bool_t xdr_enum (XDR *__xdrs, enum_t *__ep) __THROW;
+extern bool_t xdr_array (XDR * _xdrs, caddr_t *__addrp, u_int *__sizep,
+ u_int __maxsize, u_int __elsize, xdrproc_t __elproc)
+ __THROW;
+extern bool_t xdr_bytes (XDR *__xdrs, char **__cpp, u_int *__sizep,
+ u_int __maxsize) __THROW;
+extern bool_t xdr_opaque (XDR *__xdrs, caddr_t __cp, u_int __cnt) __THROW;
+extern bool_t xdr_string (XDR *__xdrs, char **__cpp, u_int __maxsize) __THROW;
+extern bool_t xdr_union (XDR *__xdrs, enum_t *__dscmp, char *__unp,
+ __const struct xdr_discrim *__choices,
+ xdrproc_t dfault) __THROW;
+extern bool_t xdr_char (XDR *__xdrs, char *__cp) __THROW;
+extern bool_t xdr_u_char (XDR *__xdrs, u_char *__cp) __THROW;
+extern bool_t xdr_vector (XDR *__xdrs, char *__basep, u_int __nelem,
+ u_int __elemsize, xdrproc_t __xdr_elem) __THROW;
+extern bool_t xdr_float (XDR *__xdrs, float *__fp) __THROW;
+extern bool_t xdr_double (XDR *__xdrs, double *__dp) __THROW;
+extern bool_t xdr_reference (XDR *__xdrs, caddr_t *__xpp, u_int __size,
+ xdrproc_t __proc) __THROW;
+extern bool_t xdr_pointer (XDR *__xdrs, char **__objpp,
+ u_int __obj_size, xdrproc_t __xdr_obj) __THROW;
+extern bool_t xdr_wrapstring (XDR *__xdrs, char **__cpp) __THROW;
+extern u_long xdr_sizeof (xdrproc_t, void *) __THROW;
+
+/*
+ * Common opaque bytes objects used by many rpc protocols;
+ * declared here due to commonality.
+ */
+#define MAX_NETOBJ_SZ 1024
+struct netobj
+{
+ u_int n_len;
+ char *n_bytes;
+};
+typedef struct netobj netobj;
+extern bool_t xdr_netobj (XDR *__xdrs, struct netobj *__np) __THROW;
+
+/*
+ * These are the public routines for the various implementations of
+ * xdr streams.
+ */
+
+/* XDR using memory buffers */
+extern void xdrmem_create (XDR *__xdrs, __const caddr_t __addr,
+ u_int __size, enum xdr_op __xop) __THROW;
+
+/* XDR using stdio library */
+extern void xdrstdio_create (XDR *__xdrs, FILE *__file, enum xdr_op __xop)
+ __THROW;
+
+/* XDR pseudo records for tcp */
+extern void xdrrec_create (XDR *__xdrs, u_int __sendsize,
+ u_int __recvsize, caddr_t __tcp_handle,
+ int (*__readit) (char *, char *, int),
+ int (*__writeit) (char *, char *, int)) __THROW;
+
+/* make end of xdr record */
+extern bool_t xdrrec_endofrecord (XDR *__xdrs, bool_t __sendnow) __THROW;
+
+/* move to beginning of next record */
+extern bool_t xdrrec_skiprecord (XDR *__xdrs) __THROW;
+
+/* true if no more input */
+extern bool_t xdrrec_eof (XDR *__xdrs) __THROW;
+
+/* free memory buffers for xdr */
+extern void xdr_free (xdrproc_t __proc, char *__objp) __THROW;
+
+__END_DECLS
+
+#endif /* rpc/xdr.h */
--- /dev/null
+# define INTUSE(name) name
+# define INTDEF(name)
+/* @(#)xdr_array.c 2.1 88/07/29 4.0 RPCSRC */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part. Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+#if !defined(lint) && defined(SCCSIDS)
+static char sccsid[] = "@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";
+#endif
+
+/*
+ * xdr_array.c, Generic XDR routines implementation.
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ *
+ * These are the "non-trivial" xdr primitives used to serialize and de-serialize
+ * arrays. See xdr.h for more info on the interface to xdr.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include "types.h"
+#include "xdr.h"
+#include <libintl.h>
+#include <limits.h>
+
+#ifdef USE_IN_LIBIO
+# include <wchar.h>
+#endif
+
+#define LASTUNSIGNED ((u_int)0-1)
+
+
+/*
+ * XDR an array of arbitrary elements
+ * *addrp is a pointer to the array, *sizep is the number of elements.
+ * If addrp is NULL (*sizep * elsize) bytes are allocated.
+ * elsize is the size (in bytes) of each element, and elproc is the
+ * xdr procedure to call to handle each element of the array.
+ */
+bool_t
+xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc)
+ XDR *xdrs;
+ caddr_t *addrp; /* array pointer */
+ u_int *sizep; /* number of elements */
+ u_int maxsize; /* max numberof elements */
+ u_int elsize; /* size in bytes of each element */
+ xdrproc_t elproc; /* xdr routine to handle each element */
+{
+ u_int i;
+ caddr_t target = *addrp;
+ u_int c; /* the actual element count */
+ bool_t stat = TRUE;
+ u_int nodesize;
+
+ /* like strings, arrays are really counted arrays */
+ if (!INTUSE(xdr_u_int) (xdrs, sizep))
+ {
+ return FALSE;
+ }
+ c = *sizep;
+ /*
+ * XXX: Let the overflow possibly happen with XDR_FREE because mem_free()
+ * doesn't actually use its second argument anyway.
+ */
+ if ((c > maxsize || c > UINT_MAX / elsize) && (xdrs->x_op != XDR_FREE))
+ {
+ return FALSE;
+ }
+ nodesize = c * elsize;
+
+ /*
+ * if we are deserializing, we may need to allocate an array.
+ * We also save time by checking for a null array if we are freeing.
+ */
+ if (target == NULL)
+ switch (xdrs->x_op)
+ {
+ case XDR_DECODE:
+ if (c == 0)
+ return TRUE;
+ *addrp = target = mem_alloc (nodesize);
+ if (target == NULL)
+ {
+ fprintf (stderr, "%s", "xdr_array: out of memory\n");
+ return FALSE;
+ }
+ __bzero (target, nodesize);
+ break;
+
+ case XDR_FREE:
+ return TRUE;
+ default:
+ break;
+ }
+
+ /*
+ * now we xdr each element of array
+ */
+ for (i = 0; (i < c) && stat; i++)
+ {
+ stat = (*elproc) (xdrs, target, LASTUNSIGNED);
+ target += elsize;
+ }
+
+ /*
+ * the array may need freeing
+ */
+ if (xdrs->x_op == XDR_FREE)
+ {
+ mem_free (*addrp, nodesize);
+ *addrp = NULL;
+ }
+ return stat;
+}
+INTDEF(xdr_array)
+
+/*
+ * xdr_vector():
+ *
+ * XDR a fixed length array. Unlike variable-length arrays,
+ * the storage of fixed length arrays is static and unfreeable.
+ * > basep: base of the array
+ * > size: size of the array
+ * > elemsize: size of each element
+ * > xdr_elem: routine to XDR each element
+ */
+bool_t
+xdr_vector (xdrs, basep, nelem, elemsize, xdr_elem)
+ XDR *xdrs;
+ char *basep;
+ u_int nelem;
+ u_int elemsize;
+ xdrproc_t xdr_elem;
+{
+ u_int i;
+ char *elptr;
+
+ elptr = basep;
+ for (i = 0; i < nelem; i++)
+ {
+ if (!(*xdr_elem) (xdrs, elptr, LASTUNSIGNED))
+ {
+ return FALSE;
+ }
+ elptr += elemsize;
+ }
+ return TRUE;
+}
--- /dev/null
+/* @(#)xdr_float.c 2.1 88/07/29 4.0 RPCSRC */
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part. Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+#if !defined(lint) && defined(SCCSIDS)
+static char sccsid[] = "@(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro";
+#endif
+
+/*
+ * xdr_float.c, Generic XDR routines implementation.
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ *
+ * These are the "floating point" xdr routines used to (de)serialize
+ * most common data items. See xdr.h for more info on the interface to
+ * xdr.
+ */
+
+#include <stdio.h>
+#include <endian.h>
+
+#include "types.h"
+#include "xdr.h"
+
+/*
+ * NB: Not portable.
+ * This routine works on Suns (Sky / 68000's) and Vaxen.
+ */
+
+#define LSW (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
+
+#ifdef vax
+
+/* What IEEE single precision floating point looks like on a Vax */
+struct ieee_single {
+ unsigned int mantissa: 23;
+ unsigned int exp : 8;
+ unsigned int sign : 1;
+};
+
+/* Vax single precision floating point */
+struct vax_single {
+ unsigned int mantissa1 : 7;
+ unsigned int exp : 8;
+ unsigned int sign : 1;
+ unsigned int mantissa2 : 16;
+};
+
+#define VAX_SNG_BIAS 0x81
+#define IEEE_SNG_BIAS 0x7f
+
+static struct sgl_limits {
+ struct vax_single s;
+ struct ieee_single ieee;
+} sgl_limits[2] = {
+ {{ 0x7f, 0xff, 0x0, 0xffff }, /* Max Vax */
+ { 0x0, 0xff, 0x0 }}, /* Max IEEE */
+ {{ 0x0, 0x0, 0x0, 0x0 }, /* Min Vax */
+ { 0x0, 0x0, 0x0 }} /* Min IEEE */
+};
+#endif /* vax */
+
+bool_t
+xdr_float(xdrs, fp)
+ XDR *xdrs;
+ float *fp;
+{
+#ifdef vax
+ struct ieee_single is;
+ struct vax_single vs, *vsp;
+ struct sgl_limits *lim;
+ int i;
+#endif
+ switch (xdrs->x_op) {
+
+ case XDR_ENCODE:
+#ifdef vax
+ vs = *((struct vax_single *)fp);
+ for (i = 0, lim = sgl_limits;
+ i < sizeof(sgl_limits)/sizeof(struct sgl_limits);
+ i++, lim++) {
+ if ((vs.mantissa2 == lim->s.mantissa2) &&
+ (vs.exp == lim->s.exp) &&
+ (vs.mantissa1 == lim->s.mantissa1)) {
+ is = lim->ieee;
+ goto shipit;
+ }
+ }
+ is.exp = vs.exp - VAX_SNG_BIAS + IEEE_SNG_BIAS;
+ is.mantissa = (vs.mantissa1 << 16) | vs.mantissa2;
+ shipit:
+ is.sign = vs.sign;
+ return (XDR_PUTLONG(xdrs, (long *)&is));
+#else
+ if (sizeof(float) == sizeof(long))
+ return (XDR_PUTLONG(xdrs, (long *)fp));
+ else if (sizeof(float) == sizeof(int)) {
+ long tmp = *(int *)fp;
+ return (XDR_PUTLONG(xdrs, &tmp));
+ }
+ break;
+#endif
+
+ case XDR_DECODE:
+#ifdef vax
+ vsp = (struct vax_single *)fp;
+ if (!XDR_GETLONG(xdrs, (long *)&is))
+ return (FALSE);
+ for (i = 0, lim = sgl_limits;
+ i < sizeof(sgl_limits)/sizeof(struct sgl_limits);
+ i++, lim++) {
+ if ((is.exp == lim->ieee.exp) &&
+ (is.mantissa == lim->ieee.mantissa)) {
+ *vsp = lim->s;
+ goto doneit;
+ }
+ }
+ vsp->exp = is.exp - IEEE_SNG_BIAS + VAX_SNG_BIAS;
+ vsp->mantissa2 = is.mantissa;
+ vsp->mantissa1 = (is.mantissa >> 16);
+ doneit:
+ vsp->sign = is.sign;
+ return (TRUE);
+#else
+ if (sizeof(float) == sizeof(long))
+ return (XDR_GETLONG(xdrs, (long *)fp));
+ else if (sizeof(float) == sizeof(int)) {
+ long tmp;
+ if (XDR_GETLONG(xdrs, &tmp)) {
+ *(int *)fp = tmp;
+ return (TRUE);
+ }
+ }
+ break;
+#endif
+
+ case XDR_FREE:
+ return (TRUE);
+ }
+ return (FALSE);
+}
+
+/*
+ * This routine works on Suns (Sky / 68000's) and Vaxen.
+ */
+
+#ifdef vax
+/* What IEEE double precision floating point looks like on a Vax */
+struct ieee_double {
+ unsigned int mantissa1 : 20;
+ unsigned int exp : 11;
+ unsigned int sign : 1;
+ unsigned int mantissa2 : 32;
+};
+
+/* Vax double precision floating point */
+struct vax_double {
+ unsigned int mantissa1 : 7;
+ unsigned int exp : 8;
+ unsigned int sign : 1;
+ unsigned int mantissa2 : 16;
+ unsigned int mantissa3 : 16;
+ unsigned int mantissa4 : 16;
+};
+
+#define VAX_DBL_BIAS 0x81
+#define IEEE_DBL_BIAS 0x3ff
+#define MASK(nbits) ((1 << nbits) - 1)
+
+static struct dbl_limits {
+ struct vax_double d;
+ struct ieee_double ieee;
+} dbl_limits[2] = {
+ {{ 0x7f, 0xff, 0x0, 0xffff, 0xffff, 0xffff }, /* Max Vax */
+ { 0x0, 0x7ff, 0x0, 0x0 }}, /* Max IEEE */
+ {{ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, /* Min Vax */
+ { 0x0, 0x0, 0x0, 0x0 }} /* Min IEEE */
+};
+
+#endif /* vax */
+
+
+bool_t
+xdr_double(xdrs, dp)
+ XDR *xdrs;
+ double *dp;
+{
+#ifdef vax
+ struct ieee_double id;
+ struct vax_double vd;
+ register struct dbl_limits *lim;
+ int i;
+#endif
+
+ switch (xdrs->x_op) {
+
+ case XDR_ENCODE:
+#ifdef vax
+ vd = *((struct vax_double *)dp);
+ for (i = 0, lim = dbl_limits;
+ i < sizeof(dbl_limits)/sizeof(struct dbl_limits);
+ i++, lim++) {
+ if ((vd.mantissa4 == lim->d.mantissa4) &&
+ (vd.mantissa3 == lim->d.mantissa3) &&
+ (vd.mantissa2 == lim->d.mantissa2) &&
+ (vd.mantissa1 == lim->d.mantissa1) &&
+ (vd.exp == lim->d.exp)) {
+ id = lim->ieee;
+ goto shipit;
+ }
+ }
+ id.exp = vd.exp - VAX_DBL_BIAS + IEEE_DBL_BIAS;
+ id.mantissa1 = (vd.mantissa1 << 13) | (vd.mantissa2 >> 3);
+ id.mantissa2 = ((vd.mantissa2 & MASK(3)) << 29) |
+ (vd.mantissa3 << 13) |
+ ((vd.mantissa4 >> 3) & MASK(13));
+ shipit:
+ id.sign = vd.sign;
+ dp = (double *)&id;
+#endif
+ if (2*sizeof(long) == sizeof(double)) {
+ long *lp = (long *)dp;
+ return (XDR_PUTLONG(xdrs, lp+!LSW) &&
+ XDR_PUTLONG(xdrs, lp+LSW));
+ } else if (2*sizeof(int) == sizeof(double)) {
+ int *ip = (int *)dp;
+ long tmp[2];
+ tmp[0] = ip[!LSW];
+ tmp[1] = ip[LSW];
+ return (XDR_PUTLONG(xdrs, tmp) &&
+ XDR_PUTLONG(xdrs, tmp+1));
+ }
+ break;
+
+ case XDR_DECODE:
+#ifdef vax
+ lp = (long *)&id;
+ if (!XDR_GETLONG(xdrs, lp++) || !XDR_GETLONG(xdrs, lp))
+ return (FALSE);
+ for (i = 0, lim = dbl_limits;
+ i < sizeof(dbl_limits)/sizeof(struct dbl_limits);
+ i++, lim++) {
+ if ((id.mantissa2 == lim->ieee.mantissa2) &&
+ (id.mantissa1 == lim->ieee.mantissa1) &&
+ (id.exp == lim->ieee.exp)) {
+ vd = lim->d;
+ goto doneit;
+ }
+ }
+ vd.exp = id.exp - IEEE_DBL_BIAS + VAX_DBL_BIAS;
+ vd.mantissa1 = (id.mantissa1 >> 13);
+ vd.mantissa2 = ((id.mantissa1 & MASK(13)) << 3) |
+ (id.mantissa2 >> 29);
+ vd.mantissa3 = (id.mantissa2 >> 13);
+ vd.mantissa4 = (id.mantissa2 << 3);
+ doneit:
+ vd.sign = id.sign;
+ *dp = *((double *)&vd);
+ return (TRUE);
+#else
+ if (2*sizeof(long) == sizeof(double)) {
+ long *lp = (long *)dp;
+ return (XDR_GETLONG(xdrs, lp+!LSW) &&
+ XDR_GETLONG(xdrs, lp+LSW));
+ } else if (2*sizeof(int) == sizeof(double)) {
+ int *ip = (int *)dp;
+ long tmp[2];
+ if (XDR_GETLONG(xdrs, tmp+!LSW) &&
+ XDR_GETLONG(xdrs, tmp+LSW)) {
+ ip[0] = tmp[0];
+ ip[1] = tmp[1];
+ return (TRUE);
+ }
+ }
+ break;
+#endif
+
+ case XDR_FREE:
+ return (TRUE);
+ }
+ return (FALSE);
+}
--- /dev/null
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part. Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+/*
+ * xdr_stdio.c, XDR implementation on standard i/o file.
+ *
+ * Copyright (C) 1984, Sun Microsystems, Inc.
+ *
+ * This set of routines implements a XDR on a stdio stream.
+ * XDR_ENCODE serializes onto the stream, XDR_DECODE de-serializes
+ * from the stream.
+ */
+
+#include "types.h"
+#include <stdio.h>
+#include "xdr.h"
+
+#ifdef USE_IN_LIBIO
+# include <libio/iolibio.h>
+# define fflush(s) INTUSE(_IO_fflush) (s)
+# define fread(p, m, n, s) INTUSE(_IO_fread) (p, m, n, s)
+# define ftell(s) INTUSE(_IO_ftell) (s)
+# define fwrite(p, m, n, s) INTUSE(_IO_fwrite) (p, m, n, s)
+#endif
+
+static bool_t xdrstdio_getlong (XDR *, long *);
+static bool_t xdrstdio_putlong (XDR *, const long *);
+static bool_t xdrstdio_getbytes (XDR *, caddr_t, u_int);
+static bool_t xdrstdio_putbytes (XDR *, const char *, u_int);
+static u_int xdrstdio_getpos (const XDR *);
+static bool_t xdrstdio_setpos (XDR *, u_int);
+static int32_t *xdrstdio_inline (XDR *, u_int);
+static void xdrstdio_destroy (XDR *);
+static bool_t xdrstdio_getint32 (XDR *, int32_t *);
+static bool_t xdrstdio_putint32 (XDR *, const int32_t *);
+
+/*
+ * Ops vector for stdio type XDR
+ */
+static const struct xdr_ops xdrstdio_ops =
+{
+ xdrstdio_getlong, /* deserialize a long int */
+ xdrstdio_putlong, /* serialize a long int */
+ xdrstdio_getbytes, /* deserialize counted bytes */
+ xdrstdio_putbytes, /* serialize counted bytes */
+ xdrstdio_getpos, /* get offset in the stream */
+ xdrstdio_setpos, /* set offset in the stream */
+ xdrstdio_inline, /* prime stream for inline macros */
+ xdrstdio_destroy, /* destroy stream */
+ xdrstdio_getint32, /* deserialize a int */
+ xdrstdio_putint32 /* serialize a int */
+};
+
+/*
+ * Initialize a stdio xdr stream.
+ * Sets the xdr stream handle xdrs for use on the stream file.
+ * Operation flag is set to op.
+ */
+void
+xdrstdio_create (XDR *xdrs, FILE *file, enum xdr_op op)
+{
+ xdrs->x_op = op;
+ /* We have to add the const since the `struct xdr_ops' in `struct XDR'
+ is not `const'. */
+ xdrs->x_ops = (struct xdr_ops *) &xdrstdio_ops;
+ xdrs->x_private = (caddr_t) file;
+ xdrs->x_handy = 0;
+ xdrs->x_base = 0;
+}
+
+/*
+ * Destroy a stdio xdr stream.
+ * Cleans up the xdr stream handle xdrs previously set up by xdrstdio_create.
+ */
+static void
+xdrstdio_destroy (XDR *xdrs)
+{
+ (void) fflush ((FILE *) xdrs->x_private);
+ /* xx should we close the file ?? */
+};
+
+static bool_t
+xdrstdio_getlong (XDR *xdrs, long *lp)
+{
+ u_int32_t mycopy;
+
+ if (fread ((caddr_t) &mycopy, 4, 1, (FILE *) xdrs->x_private) != 1)
+ return FALSE;
+ *lp = (long) ntohl (mycopy);
+ return TRUE;
+}
+
+static bool_t
+xdrstdio_putlong (XDR *xdrs, const long *lp)
+{
+ int32_t mycopy = htonl ((u_int32_t) *lp);
+
+ if (fwrite ((caddr_t) &mycopy, 4, 1, (FILE *) xdrs->x_private) != 1)
+ return FALSE;
+ return TRUE;
+}
+
+static bool_t
+xdrstdio_getbytes (XDR *xdrs, const caddr_t addr, u_int len)
+{
+ if ((len != 0) && (fread (addr, (int) len, 1,
+ (FILE *) xdrs->x_private) != 1))
+ return FALSE;
+ return TRUE;
+}
+
+static bool_t
+xdrstdio_putbytes (XDR *xdrs, const char *addr, u_int len)
+{
+ if ((len != 0) && (fwrite (addr, (int) len, 1,
+ (FILE *) xdrs->x_private) != 1))
+ return FALSE;
+ return TRUE;
+}
+
+static u_int
+xdrstdio_getpos (const XDR *xdrs)
+{
+ return (u_int) ftell ((FILE *) xdrs->x_private);
+}
+
+static bool_t
+xdrstdio_setpos (XDR *xdrs, u_int pos)
+{
+ return fseek ((FILE *) xdrs->x_private, (long) pos, 0) < 0 ? FALSE : TRUE;
+}
+
+static int32_t *
+xdrstdio_inline (XDR *xdrs, u_int len)
+{
+ /*
+ * Must do some work to implement this: must insure
+ * enough data in the underlying stdio buffer,
+ * that the buffer is aligned so that we can indirect through a
+ * long *, and stuff this pointer in xdrs->x_buf. Doing
+ * a fread or fwrite to a scratch buffer would defeat
+ * most of the gains to be had here and require storage
+ * management on this buffer, so we don't do this.
+ */
+ return NULL;
+}
+
+static bool_t
+xdrstdio_getint32 (XDR *xdrs, int32_t *ip)
+{
+ int32_t mycopy;
+
+ if (fread ((caddr_t) &mycopy, 4, 1, (FILE *) xdrs->x_private) != 1)
+ return FALSE;
+ *ip = ntohl (mycopy);
+ return TRUE;
+}
+
+static bool_t
+xdrstdio_putint32 (XDR *xdrs, const int32_t *ip)
+{
+ int32_t mycopy = htonl (*ip);
+
+ ip = &mycopy;
+ if (fwrite ((caddr_t) ip, 4, 1, (FILE *) xdrs->x_private) != 1)
+ return FALSE;
+ return TRUE;
+}
+
+/* libc_hidden_def (xdrstdio_create) */
--- /dev/null
+/*_________________________________________________________________
+ |
+ | xdrf.h - include file for C routines that want to use the
+ | functions below.
+*/
+
+int xdropen(XDR *xdrs, const char *filename, const char *type);
+int xdrclose(XDR *xdrs) ;
+int xdr3dfcoord(XDR *xdrs, float *fp, int *size, float *precision) ;
+
character*8 onethree,cfreq
character*8 ucase
external ucase
- logical oneletter
+ logical oneletter,iblnk
integer rescode
external rescode