Skip to content

Exclude alchemical ions from the REST2 region#277

Merged
lohedges merged 4 commits intodevelfrom
fix_rest2_alchemical_ions
Jan 29, 2025
Merged

Exclude alchemical ions from the REST2 region#277
lohedges merged 4 commits intodevelfrom
fix_rest2_alchemical_ions

Conversation

@lohedges
Copy link
Contributor

This PR applies a small fix by excluding alchemical ions from the REST2 region. These are tagged in somd2 using the is_alchemical_ion property, then excluded via a REST2 mask.

  • I confirm that I have merged the latest version of devel into this branch before issuing this pull request (e.g. by running git pull origin devel): [y]
  • I confirm that I have added a changelog entry to the changelog (we will add a link to this PR as part of the review): [y]
  • I confirm that I have permission to release this code under the GPL3 license: [y]

Copy link
Contributor

@mb2055 mb2055 left a comment

Choose a reason for hiding this comment

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

There seems to be an issue when running without explicitly defining lambda_windows.
To recreate:

import sire as sr

mols = sr.load(sr.expand(sr.tutorial_url, "merged_molecule.s3"))

mols = sr.morph.link_to_reference(mols)

mols = mols.minimisation(lambda_value=0.5).run().commit()

d = mols.dynamics(lambda_value=0.5, timestep="4fs", temperature="25oC")

d.run("10ps", save_frequency="1ps")

raises TypeError: object of type 'NoneType' has no len() due to line 393. Can probably be fixed by just setting lambda_windows equal to lambda_value in the case where the user doesn't set it.

@lohedges
Copy link
Contributor Author

Ah yes, good point, I'll just only store num_lambda_windows if not None.

mb2055
mb2055 previously approved these changes Jan 29, 2025
Copy link
Contributor

@mb2055 mb2055 left a comment

Choose a reason for hiding this comment

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

Looks good

@lohedges lohedges merged commit 961e15e into devel Jan 29, 2025
@lohedges lohedges deleted the fix_rest2_alchemical_ions branch January 29, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants