Skip to content

Commit 4833013

Browse files
committed
Merge branch 'forced-swap' of github.com:wehs7661/ensemble_md into forced-swap
2 parents 0285df3 + 7008d84 commit 4833013

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Ensemble Molecular Dynamics
22
==============================
33
[//]: # (Badges)
4-
[![wehs7661](https://circleci.com/gh/wehs7661/ensemble_md.svg?style=shield)](https://app.circleci.com/pipelines/github/wehs7661/ensemble_md?branch=master)
4+
[![weitse-hsu](https://circleci.com/gh/weitse-hsu/ensemble_md.svg?style=shield)](https://app.circleci.com/pipelines/github/weitse-hsu/ensemble_md?branch=master)
55
[![codecov](https://codecov.io/gh/wehs7661/ensemble_md/branch/master/graph/badge.svg)](https://app.codecov.io/gh/wehs7661/ensemble_md/tree/master)
66
[![Documentation Status](https://readthedocs.org/projects/ensemble-md/badge/?version=latest)](https://ensemble-md.readthedocs.io/en/latest/?badge=latest)
77
[![GitHub Actions Lint Status](https://github.com/wehs7661/ensemble_md/actions/workflows/lint.yaml/badge.svg)](https://github.com/wehs7661/ensemble_md/actions/workflows/lint.yaml)

ensemble_md/replica_exchange_EE.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def set_params(self, analysis):
164164
"resname_transform": None,
165165
"resname_list": None,
166166
"swap_rep_pattern": None,
167-
"allow_virtual_V": False, # Allow use of V to indicate virtual atoms in topology
167+
"allow_virtual_V": True, # Allow use of V to indicate virtual atoms in topology
168168
"nst_sim": None,
169169
"proposal": 'exhaustive',
170170
"w_combine": False,

ensemble_md/utils/coordinate_swap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ def _read_gro(side, resname_list, gro_list):
12521252
return name, num
12531253

12541254

1255-
def create_atom_map(gro_list, resname_list, swap_patterns, allow_virtual_V=False):
1255+
def create_atom_map(gro_list, resname_list, swap_patterns, allow_virtual_V=True):
12561256
"""
12571257
If you generate your hybrid topologies in a way that the
12581258
same atom has the same name in each molecule then this

ensemble_md/utils/gmx_parser.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,14 +335,18 @@ def compare_MDPs(mdp_list, print_diff=False):
335335
# the parameter is not in all MDP files
336336
diff_params[p] = [d[p] if p in d else None for d in params_dicts]
337337
else:
338-
# the parameter is in all MDP files (Note that "set([1, 1, 1]={1}.)")
339-
if isinstance(params_dicts[0][p], list):
340-
# the parameter is a list, which is unhashable
341-
if len(set([tuple(d[p]) for d in params_dicts])) > 1:
342-
diff_params[p] = [d[p] for d in params_dicts]
338+
if type(params_dicts[0][p]) is not type(params_dicts[1][p]):
339+
# e.g., tau_t = 1.0 1.0 1.0 v.s. tau_t = 1.0 (list v.s. float)
340+
diff_params[p] = [d[p] for d in params_dicts]
343341
else:
344-
if len(set([d[p] for d in params_dicts])) > 1:
345-
diff_params[p] = [d[p] for d in params_dicts]
342+
# the parameter is in all MDP files (Note that "set([1, 1, 1]={1}.)")
343+
if isinstance(params_dicts[0][p], list):
344+
# the parameter is a list, which is unhashable
345+
if len(set([tuple(d[p]) for d in params_dicts])) > 1:
346+
diff_params[p] = [d[p] for d in params_dicts]
347+
else:
348+
if len(set([d[p] for d in params_dicts])) > 1:
349+
diff_params[p] = [d[p] for d in params_dicts]
346350

347351
if print_diff:
348352
print("The following parameters are different among the MDP files:")

readthedocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
version: 2
22

3+
sphinx:
4+
configuration: docs/conf.py
5+
36
build:
47
os: "ubuntu-22.04"
58
tools:

0 commit comments

Comments
 (0)