Skip to content
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

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
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
26 changes: 25 additions & 1 deletion bin/martinize2
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ LOGGER = StyleAdapter(LOGGER)

VERSION = "martinize with vermouth {}".format(vermouth.__version__)


def read_system(path, ignore_resnames=(), ignh=None, modelidx=None):
"""
Read a system from a PDB or GRO file.
Expand Down Expand Up @@ -1037,6 +1036,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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do args.water_bias_eps and args.water_idrs have sane defaults?

else:
# don't write non-bonded interactions
itp_paths = []
Expand Down Expand Up @@ -1167,6 +1172,25 @@ def entry():
"".join(ss_sequence),
]

supp_ss_seq = list(
itertools.chain(
*(
dssp.sequence_from_residues(molecule, "cgsecstruct")
for molecule in system.molecules
if selectors.is_protein(molecule)
)
)
)
if any([molecule.meta.get('modified_cgsecstruct', False) for molecule in system.molecules]):
LOGGER.info(("Secondary structure assignment changed between dssp and martinize. "
"Check files for details."), type="general")
header += [
"The assigned secondary structure conflicted with ",
"annotated IDRs. The following sequence of Martini secondary ",
"structure was actually applied to the system:",
"".join([dssp.SS_CG[i] for i in supp_ss_seq])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why the dssp.SS_CG[i], rather than calling convert_dssp_to_martini? The latter does a more complex around helices

]

Comment on lines +1184 to +1193
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance we can fold this into an (existing) processor?

if args.top_path is not None:
write_gmx_topology(system,
args.top_path,
Expand Down
Loading
Loading