Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for capped AAs #92

Merged
merged 6 commits into from
Oct 21, 2024
Merged

Conversation

ijpulidos
Copy link
Contributor

These set of changes implement basic tests for capped amino acids.

Solves #78

It follows the same testing structure that was created for the NonEquilibriumCyclingProtocol, which is based on fixtures.

To avoid having to generate the mapping every time, the mappings are being deserialized from json files.

Please note that this is aimed to be merged to a feature branch where we would have the complete functional MVP for the protein mutation protocol.

@ijpulidos ijpulidos requested a review from IAlibay September 26, 2024 21:34
@pep8speaks
Copy link

Hello @ijpulidos! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 11:80: E501 line too long (105 > 79 characters)
Line 33:80: E501 line too long (97 > 79 characters)
Line 34:80: E501 line too long (102 > 79 characters)
Line 49:80: E501 line too long (94 > 79 characters)

Line 47:1: E302 expected 2 blank lines, found 1
Line 75:80: E501 line too long (84 > 79 characters)
Line 85:80: E501 line too long (84 > 79 characters)
Line 107:80: E501 line too long (80 > 79 characters)
Line 168:80: E501 line too long (80 > 79 characters)
Line 179:80: E501 line too long (80 > 79 characters)
Line 180:80: E501 line too long (81 > 79 characters)

@ijpulidos
Copy link
Contributor Author

tests are expected to fail here, that should be OK, since we would be implementing the protocol to pass the tests in future PRs.

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

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

A reasonably big copnceptual question (i.e. new protocol vs existing protocol), and a few small things, otherwise it looks good to me.

@@ -2,14 +2,51 @@
Implementation of protein mutation protocol based on Nonequilibrium Cycling, using OpenMM as
MD engine.
"""
from pathlib import Path
Copy link
Member

Choose a reason for hiding this comment

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

Are we really going to have a different setupunit / protocol for this? I thought the aim was to just make sure our current Protocols could just handle this use case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes probably, for now I create a basic skeleton for it, but we would probably use the same SetupUnit for all the protocols as possible. I can remove this placeholder if that makes it better.

from typing import Dict, Any

from gufe import ChemicalSystem, Context, ProtocolUnit, AtomMapping


def mutate_with_pdbfixer(filename: str | Path, mutation_spec: str, chain_id: str = "A", output_pdb=None):
Copy link
Member

Choose a reason for hiding this comment

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

I would suggest putting this in a separate place, like a feflow.setup or feflow.utils.

Reasoning: this is something you'll do before you reach the Protocol, so from a user standpoint, it's a setup tools (indeed, it might even make sense to make a separate toolling akin to kartograf or konnektor if this goes beyond just a single method!)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, 100%, this was something I added temporarily and forgot to remove. My bad!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It shouldn't be here at all.

Comment on lines 17 to 20
filename
mutation_spec
chain_id
output_pdb
Copy link
Member

Choose a reason for hiding this comment

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

docstring details?

Copy link
Member

Choose a reason for hiding this comment

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

Could you move these under a sub-category of the data folder?
It's maybe a little bit of eager tidying up, but annotating the data by folders would be super useful!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's fine with me. I did think about that.

@ijpulidos ijpulidos linked an issue Oct 4, 2024 that may be closed by this pull request
@ijpulidos
Copy link
Contributor Author

It seems like the only tests failing here are the ones expected to be failing https://github.com/OpenFreeEnergy/feflow/actions/runs/11185794043/job/31099415246?pr=92#step:8:298 this one should be good to go now. We will be implementing the code for the tests to pass in different PRs. This is to make reviews more modular and easier to do.

@ijpulidos ijpulidos requested a review from IAlibay October 4, 2024 19:39
Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

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

I'll say lgtm here, but let's revisit the new protocol thing later on.

@ijpulidos ijpulidos merged commit 4d52587 into protein-mutation-protocol Oct 21, 2024
1 of 9 checks passed
@ijpulidos ijpulidos deleted the tests/capped-aas branch October 21, 2024 14:07
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.

Test capped AAs for protein mutation protocol
3 participants