diff --git a/.gitignore b/.gitignore index 6e2ab84..39cbb64 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ old/resultsAnalysis.py testScripts/ old/oldFunctions.py misc +*.out diff --git a/README_CONSTRAINTS.md b/README_CONSTRAINTS.md index cd303be..9557115 100644 --- a/README_CONSTRAINTS.md +++ b/README_CONSTRAINTS.md @@ -63,7 +63,7 @@ residue_num,phi,psi,chain_id 5,-85,-120,0 ``` -### Common errors that might occur +### Common errors that might occur** *Assuming everything above is followed*, some common errors that might show up are: 1. ```Particle Coordinate is nan``` @@ -86,4 +86,8 @@ Psi: [, None] ``` Which shows the problem mentioned earlier in this paragraph. +3. Residue indexing issue + +In PDB files, whenever a new chain starts, the residue indexes start counting from 0. However, this is not the case with OpenMM. It will continue counting the residues. For instance, say a PDB contained a 2-chain protein with 10 residues each. In the ```.pdb``` file, once residue 10 of Chain A is reached, it will count residue 1 of Chain B. However, OpenMM will count residue 1 of Chain B as residue 11 (or rather, residue 10 by its counting convention). While this program has been written to account for such an error, it is always good to keep this in mind, especially when writing your own modifications to the simulation or analysis code. + ****This is by no means an exhaustive list. If more errors are found, they will be added here.** diff --git a/main.py b/main.py index dce4695..319b011 100644 --- a/main.py +++ b/main.py @@ -94,6 +94,7 @@ params['sequence'] = cmdLineInputs[1] # sequence specified from command line params['peptide'] = cmdLineInputs[2] # peptide specified from command line params['max walltime'] = cmdLineInputs[3] # maximum walltime + params['peptide backbone constraint constant'] = cmdLineInputs[4] elif params['device'] == 'local': params['run num'] = 0 # manual setting, for 0, do a fresh run, for != 0, pickup on a previous run. params['sequence'] = 'CCCGGGCCCGGG' # manually set sequence # ATP aptamer @@ -167,7 +168,6 @@ params['rigid water'] = True params['constraint tolerance'] = 1e-6 params['hydrogen mass'] = 1.5 # in amu - we can increase the time if we increase this value -params['peptide backbone constraint constant'] = 10000 # paths if params['device'] == 'local': diff --git a/utils.py b/utils.py index 6953298..8a6dc05 100644 --- a/utils.py +++ b/utils.py @@ -200,11 +200,12 @@ def buildPeptide(peptide, customAngles=False): :return: """ geo = Geometry.geometry(peptide[0]) - angles_to_constrain = findAngles() # all values in the list are strings - printRecord("Found angles_to_constrain successfully, beginning to constrain...\n") - + if customAngles: printRecord("customAngles on\n") + angles_to_constrain = findAngles() # all values in the list are strings + printRecord("Found angles_to_constrain successfully, beginning to constrain...\n") + phis = {row[0]: float(row[1]) for row in angles_to_constrain} psis = {row[0]: float(row[2]) for row in angles_to_constrain} @@ -212,6 +213,8 @@ def buildPeptide(peptide, customAngles=False): if int(row[0]) == 0: printRecord('phi[0] and psi[0]:', phis[row[0]], psis[row[0]], "\n") # only used for debugging geo.phi, geo.psi = phis[row[0]], psis[row[0]] + else: + printRecord("Custom angles off") structure = PeptideBuilder.initialize_res(peptide[0])