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

scfix behaviour change #621

Merged
merged 8 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
29 changes: 23 additions & 6 deletions bin/martinize2
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ from vermouth.rcsu.contact_map import read_go_map
from vermouth.rcsu.go_pipeline import GoPipeline
from vermouth.citation_parser import citation_formatter
from vermouth.gmx.topology import write_gmx_topology
from operator import not_

# TODO Since vermouth's __init__.py does some logging (KDTree), this may or may
# not work as intended. Investigation required.
Expand Down Expand Up @@ -625,12 +626,19 @@ def entry():


prot_group = parser.add_argument_group("Protein description")
prot_group.add_argument(
"-noscfix",
dest="noscfix",
action="store_true",
default=False,
help="Don't apply side chain corrections. Please note the change in behaviour from martinize v0.11.0",
)
prot_group.add_argument(
"-scfix",
dest="scfix",
action="store_false",
default=True,
help="[don't] apply side chain corrections.",
action="store_true",
help="Old -scfix argument. Side chain fixes are now assumed by default, and the flag does not need"
" to be specified. Will be depreciated in future."
csbrasnett marked this conversation as resolved.
Show resolved Hide resolved
)
prot_group.add_argument(
"-cys",
Expand Down Expand Up @@ -923,14 +931,23 @@ def entry():
type="missing-feature",
)
vermouth.SetMoleculeMeta(extdih=args.extdih).run_system(system)
if args.scfix and not target_ff.has_feature("scfix"):
if args.scfix:
LOGGER.warning(
"The scfix argument has been depreciated and will be removed in future. "
csbrasnett marked this conversation as resolved.
Show resolved Hide resolved
"Side chain fixing is now assumed by default, so no flag needs to be "
"passed. If you do not want side chain fixes to be applied, the -noscfix "
"flag can be used."
)
scfix = not_(args.noscfix)
csbrasnett marked this conversation as resolved.
Show resolved Hide resolved
if scfix and not target_ff.has_feature("scfix"):
LOGGER.warning(
'The force field "{}" does not define angle and '
"torsion for the side chain corrections (-scfix).",
"torsion for the side chain corrections."
" If intended, please specify -noscfix explicitly",
target_ff.name,
type="missing-feature",
)
vermouth.SetMoleculeMeta(scfix=args.scfix).run_system(system)
vermouth.SetMoleculeMeta(scfix=scfix).run_system(system)

vermouth.SetMoleculeMeta(idr=args.idr_tune).run_system(system)
if args.idr_tune:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ martinize2
-o topol.top
-ff martini3001
-nt
-scfix
-noscfix
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ martinize2
-ff martini22
-dssp
-cys auto
-scfix
-noscfix
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ martinize2
-nter NH2-ter
-cter COOH-ter
-ef 500
-scfix
-noscfix
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ martinize2
-dssp
-eu 0.7
-ef 800.0
-scfix
-noscfix
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ martinize2
-ep 2
-modify A-ASP50:ASP-HD2
-ignore HOH
-scfix
-noscfix
-ef 500
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ martinize2
-water-bias-eps idr:0.5
-id-regions 1:24
-idr-tune
-scfix
-noscfix
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ martinize2
-eu 0.85
-water-bias
-water-bias-eps E:-.5 C:1.0 H:-1.0
-scfix
-noscfix
-cys none
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ martinize2
-ignore HOH
-ss CBCCHHHHHHHHHHTTCTTBTTBCHHHHHHHHHHHHTTBTTCEEECTTSCEEETTTTEETTTTCBCSCCTTCCCTTCSBGGGGGSSSCHHHHHHHHHHHHTSSGGGGSHHHHHHTTTSCGGGGGTTCCC
-go ../map.map
-scfix
-noscfix
-cys none
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ martinize2
-go ../map.map
-water-bias
-water-bias-eps E:-.5 C:1.0 H:-1.0
-scfix
-noscfix
-cys none
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ martinize2
-ff martini22p
-mutate A-MET53:VAL
-resid input
-scfix
-noscfix
2 changes: 1 addition & 1 deletion vermouth/tests/test_name_moltype.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_martinize2_moltypes(tmp_path, deduplicate):
'-f', str(PDB_HB),
'-o', 'topol.top',
'-x', 'out.pdb',
'-ignore', 'HOH', '-ignore', 'HEME', '-scfix',
'-ignore', 'HOH', '-ignore', 'HEME', '-noscfix',
]
if deduplicate:
expected = ['molecule_{}.itp'.format(i) for i in range(2)]
Expand Down
Loading