fix: providing self.box from sim.py when .pdb does not have it#41
Closed
PolyachenkoYA wants to merge 1 commit intoKULL-Centre:mainfrom
Closed
fix: providing self.box from sim.py when .pdb does not have it#41PolyachenkoYA wants to merge 1 commit intoKULL-Centre:mainfrom
PolyachenkoYA wants to merge 1 commit intoKULL-Centre:mainfrom
Conversation
Collaborator
|
Thanks, closing this using #42 |
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.
Addresses this issue
Current behaviour:
I tried running the AF-CALVADOS example, but it failed at the
box = np.append(u.dimensions[:3]/10., u.dimensions[3:])line inbuild.py.The reason was: my
.pdbfrom AF2 did not have aCRYSTline, which resulted inu.dimensionsbeingNone.Desired behaviour:
Actually, not 100% sure how the situation "L-box is provided in
config.yamlbut not in*.pdb" should be handled. More precisely, I think L-box should be passed toProtein.dimensions, but I am not sure at which level the L-box should be passed (self.defaultsvs "a separate argument" vs ??).The provided fix:
Pass the L-box info via
comp_defaults.All tests passed.
sim.py) Add the L-box info to the Sim.comp_defaults so that it is later propagated to child objects, e.g. Proteinbuild.py) Thegeometry_from_pdbreturnspos, boxalways, meaning downstream code may rely on that. So, I added a default way to constructboxwhen.pdbdoes not have the box info.The proposed default way: take the X-range of positions and add
auto_box_marginto it (in Angstroms). Theverboseoption is to report this construction in case it's not intended.I actually think it'd better to make this
verbose=Trueby default, but I wanted to utilize the already-presentverbosefromcalc_properties(line 174 fromcomponents.py), which isFalseand may affect other things. Any thoughts on that?Also, what should the
boxbe in case it's not provided by.pdb, and also no auto-construction is requested (auto_box_margin < 0) ?components.py) Handle the new defaultProtein.dimensions: skip reading it from.pdbif it is already present. Check the pre-existing box is consistent with the X-s from.pdb.A related question: what should be prioritized if both
config.yamland.pdbprovide L-box info?