Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ old/resultsAnalysis.py
testScripts/
old/oldFunctions.py
misc
*.out
6 changes: 5 additions & 1 deletion README_CONSTRAINTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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```
Expand All @@ -86,4 +86,8 @@ Psi: [<AtomGroup with 4 atoms>, 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.**
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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':
Expand Down
9 changes: 6 additions & 3 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,21 @@ 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}

for row in angles_to_constrain:
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])

Expand Down