Closed StevenCHowell closed 7 years ago
Hi,
I just gave a try on the TAMC script "gui_mimic_iso_peptide.py" from the most recent revision (#3362) in sassie-2.0. I did not see "resid<48" in line 106; instead, I did see it in line 36:
36 post_basis_string_array = ['(segname UB2 and resid<48) or (segname UB2 and resid>48)']
However, changing "resid<48" to "resid < 48" here did not affect TAMC running. Maybe we were referring to some different driver script? If yes, could you attach the driver script you were using?
This may be an issue caused by what is on SASSIE-web and in the svn differing from this repo. I will look into this more and post back here.
@hailiangzhang, try entering your input on sassie-web. Here is the log file. It breaks when parsing the flexible and post input. Here are my inputs.
The problem is that the input parsing does not use the basis filtering.This is from sassie_2.0/trunk/sassie/simulate/monte_carlo/monte_carlo_utilities/isopeptide_bond_torsion/isopeptide_bond_torsion_parameters.py
which is the code running on SASSIE-web:
def build_basis_strings(residue_main_pivots,residue_main_pivots_outside,residue_main_pivots_list, isopeptide_basis_string):
'''
method to create basis strings for each main pivot in each residue
'''
cter = isopeptide_basis_string.split('or')[0] ## @NOTE to ZHL: assume contract
lys = isopeptide_basis_string.split('or')[1] ## @NOTE to ZHL: assume contract
cter_list = cter.split()
cter_resid = int(cter_list[cter_list.index('resid')+1])
cter_segname = cter_list[cter_list.index('segname')+1]
lys_list = lys.split()
lys_resid = int(lys_list[lys_list.index('resid')+1])
lys_segname = lys_list[lys_list.index('segname')+1]
It should instead be something like:
import sassie.util.basis_to_python as basis_to_python
cter_basis_string = isopeptide_basis_string + ' and resname LYS'
cter_basis = basis_to_python.parse_basis(cter_basis_string )
error, cter_mask = mol.get_subset_mask(cter_basis)
Yes, I should have use basis_to_python to parse the basis string; however, Isopeptide basis string follows a different contract compared to other regular moveset due to its unique topology.
Attached is the modified "isopeptide_bond_torsion_parameters.py" to fix this bug (not tested), and following are the changes
87 def build_basis_strings(residue_main_pivots,residue_main_pivots_outside,residue_main_pivots_list, isopeptide_basis_string):
88
89 '''
90 method to create basis strings for each main pivot in each residue
91 '''
92 cter = isopeptide_basis_string.split('or')[0] ## @NOTE to ZHL: assume contract
93 lys = isopeptide_basis_string.split('or')[1] ## @NOTE to ZHL: assume contract
94
95 r_resid = re.compile(r'resid\[i\]\s*==\s*("|\'{0,1})([\w\'"]+)\1')
96 r_segname = re.compile(r'segname\[i\]\s*==\s*("|\'{0,1})([\w\'"]+)\1')
97
98 basis_python = basis_to_python.parse_basis(cter)
99 cter_resid = int(r_resid.search(basis_python).groups()[1])
100 cter_segname = r_segname.search(basis_python).groups()[1]
101
102 basis_python = basis_to_python.parse_basis(lys)
103 lys_resid = int(r_resid.search(basis_python).groups()[1])
104 lys_segname = r_segname.search(basis_python).groups()[1]
NOTE: the DOCs need to state that the c-terminal part of the flexible region MUST come before the LYS part.
The current implementation of the post region seems it could be simplified. The current gui_mimic
script has the post regions as follows:
forward: (segname UB2 and resid < 48) or (segname UB2 and resid > 48)
reverse: (segname UB1 and resid < 76) or (segname UB1 and resid > 76)
I tested the following and got comparable results:
forward: segname UB2 and not resid 48
Any problems with this?
I am now able to enter input comparable to the other modules.
I changed the gui mimic input from
resid<48
toresid < 48
and it crashes with the error: