-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Martini3-IDP #647
base: master
Are you sure you want to change the base?
Martini3-IDP #647
Changes from 8 commits
4b21391
db6722e
4591a61
3ebabba
4bf7810
c510ef3
92d21f6
f4f61ea
cf44b5d
b5a4b6d
e5ef2c0
cddf4eb
c5df2ee
44941d6
d01a03d
e553fc3
72e8ade
008a4f0
9a99cba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,9 @@ LOGGER = StyleAdapter(LOGGER) | |
|
||
VERSION = "martinize with vermouth {}".format(vermouth.__version__) | ||
|
||
SS_CG = {'1': 'H', '2': 'H', '3': 'H', 'H': 'H', 'G': 'H', 'I': 'H', | ||
'B': 'E', 'E': 'E', 'T': 'T', 'S': 'S', 'C': 'C'} | ||
|
||
|
||
def read_system(path, ignore_resnames=(), ignh=None, modelidx=None): | ||
""" | ||
|
@@ -952,16 +955,6 @@ def entry(): | |
'for this force field', | ||
type="missing-feature") | ||
|
||
ss_sequence = list( | ||
itertools.chain( | ||
*( | ||
dssp.sequence_from_residues(molecule, "secstruct") | ||
for molecule in system.molecules | ||
if selectors.is_protein(molecule) | ||
) | ||
) | ||
) | ||
|
||
if args.cystein_bridge == "none": | ||
vermouth.RemoveCysteinBridgeEdges().run_system(system) | ||
elif args.cystein_bridge != "auto": | ||
|
@@ -977,6 +970,17 @@ def entry(): | |
disordered_regions=args.water_idrs | ||
) | ||
|
||
ss_sequence = list( | ||
itertools.chain( | ||
*( | ||
SS_CG[i] | ||
for i in dssp.sequence_from_residues(molecule, "cgsecstruct") | ||
for molecule in system.molecules | ||
if selectors.is_protein(molecule) if i is not None | ||
) | ||
) | ||
) | ||
|
||
# Apply position restraints if required. | ||
if args.posres != "none": | ||
LOGGER.info("Applying position restraints.", type="step") | ||
|
@@ -1004,6 +1008,12 @@ def entry(): | |
defines = ("GO_VIRT",) | ||
itp_paths = {"atomtypes": "go_atomtypes.itp", | ||
"nonbond_params": "go_nbparams.itp"} | ||
if not args.water_bias: | ||
# this ensures that disordered-folded go bonds get removed regardless of force field. | ||
vermouth.processors.ComputeWaterBias(args.water_bias, | ||
{s: float(eps) for s, eps in args.water_bias_eps}, | ||
[(int(start), int(stop)) for start, stop in args.water_idrs], | ||
).run_system(system) | ||
Comment on lines
+1039
to
+1044
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. False and [] respectively. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah wait, |
||
else: | ||
# don't write non-bonded interactions | ||
itp_paths = [] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This translation to CG is too simplistic, no?
Also, how does this interact with the "normal" dssp processing, and people providing a secondary structure on the cli?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't affect the "normal" processing, the annotation is done for both ways before martinize() is called. The dssp/ss flags are dealt with at that point, and this is only to make sure that the cg secondary structure is determined correctly. The ss_sequence needs to be moved here to align with the overwriting that happens in the idr annotation, otherwise the 'uncorrected' string is written out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concern with this is that it becomes ambiguous what's atomistic SS and whats CG SS. The idea of printing the found SS structure is so that users can pass it to the
-ss
flag to reproduce the behaviour. However, if that only works if the SS flavour that's expected is the same as the one printed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point taken. However, for the purposes of the current IDP models, ensuring the ss used when the links are applied doesn't intersect in a nasty way with the -idr flags is fairly important.
Perhaps the way around is if the string gets changed, print it in the itp twice? first what was found by dssp, second what was actually applied in the links?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds reasonable