Open
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces a new flag that controls the box size for solvent addition during protein preprocessing and updates the related function signatures and command line arguments.
- Modified the prepare_protein function to accept a new box_size parameter and adjusted solvent addition logic accordingly.
- Updated prepare_one and simulate_one signatures and the argparse configuration in batch_generate.py to pass the new box_size parameter.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/module/preprocess.py | Added box_size parameter to prepare_protein and adjusted solvent logic. |
| scripts/batch_generate.py | Updated function signatures and argparse options to pass box_size. |
| # Add the water molecules if we're using explicit solvent | ||
| if not implicit_solvent: | ||
| modeller.addSolvent(forcefield, padding=1.0 * unit.nanometers, ionicStrength=0.15 * unit.molar) | ||
| # Attmpt to match box size |
There was a problem hiding this comment.
Correct the spelling error in the comment ('Attmpt' should be 'Attempt').
Suggested change
| # Attmpt to match box size | |
| # Attempt to match box size |
Comment on lines
+20
to
21
| box_size(float): If 0.0 adds water solvent with padding = 1 Angstroms. If negative, attempts to match box size, defaulting back to padding = 1 Angstroms. If > 0, uses that value as a box size. | ||
|
|
There was a problem hiding this comment.
[nitpick] Clarify the expected units and behavior of the box_size parameter in the docstring. For example, specify that a positive value is expected in Angstroms (which is converted to nanometers inside the function) and that negative values fall back to using a padding of 1 nm.
Suggested change
| box_size(float): If 0.0 adds water solvent with padding = 1 Angstroms. If negative, attempts to match box size, defaulting back to padding = 1 Angstroms. If > 0, uses that value as a box size. | |
| box_size (float, optional): The size of the simulation box. Positive values are interpreted as the box size in Angstroms | |
| and are converted to nanometers internally. A value of 0.0 adds water solvent with a padding of 1 nm. Negative values | |
| fall back to using a default padding of 1 nm. Defaults to None. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
added a flag for box size :D