Skip to content

Commit

Permalink
Merge pull request multi-ego#520 from brunostega/new_sigma_prior
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocamilloni authored Dec 18, 2024
2 parents 28034cd + c594150 commit 14fe20e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/multiego/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,9 @@ def get_lj_pairs(topology):
lj_pairs = pd.DataFrame(columns=["ai", "aj", "epsilon", "sigma"], index=np.arange(len(topology.parameterset.nbfix_types)))
for i, (sbtype_i, sbtype_j) in enumerate(topology.parameterset.nbfix_types):
key = (sbtype_i, sbtype_j)
c12, c6 = topology.parameterset.nbfix_types[key][0] * 4.184, topology.parameterset.nbfix_types[key][1] * 0.1
# This is read as rmin not as sigma --> must be scaled by 1/2**(1/6)
# Any contact present more then once is overwritten by the last one in the nonbond_params
c12, c6 = topology.parameterset.nbfix_types[key][0] * 4.184, topology.parameterset.nbfix_types[key][1] * 0.1 / (2**(1/6))
epsilon = c6**2 / (4 * c12) if c6 > 0 else -c12
sigma = (c12 / c6) ** (1 / 6) if c6 > 0 else c12 ** (1 / 12) / (2.0 ** (1.0 / 6.0))
lj_pairs.loc[i] = [sbtype_i, sbtype_j, epsilon, sigma]
Expand Down

0 comments on commit 14fe20e

Please sign in to comment.