Skip to content

Commit

Permalink
Merge pull request #59 from openforcefield/test_ncaa
Browse files Browse the repository at this point in the history
Test ncaa
  • Loading branch information
Yoshanuikabundi authored Feb 12, 2025
2 parents 6c0a2b8 + 6a4aaea commit 06719cf
Show file tree
Hide file tree
Showing 14 changed files with 64,583 additions and 345 deletions.
6 changes: 6 additions & 0 deletions docs/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ Pablo has a (developing) PDB test suite.
- NMR model direct from PDB, multi-model file, RNA and protein in same file
* - 1a45_samechain.pdb
- RNA and protein in same file, missing TER record between incompatible polymers with same chain ID
* - 2MUM_blowup.pdb
- Strained conformation
* - 5eil_fixed.pdb
- Non-canonical amino acid from CCD, iron ion
* - 3ip9_dye_solvated.pdb
- Large system with water and NaCl, non-canonical amino acid not in CCD
:::

<script>
Expand Down
743 changes: 405 additions & 338 deletions examples/prepare_jsontop.ipynb

Large diffs are not rendered by default.

849 changes: 849 additions & 0 deletions examples/smiles_names.ipynb

Large diffs are not rendered by default.

17 changes: 13 additions & 4 deletions openff/pablo/_pdb_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,11 @@ def residue_indices(self) -> Iterator[tuple[int, ...]]:
),
):
if alt_loc != "":
# TODO: Support alt locs
raise ValueError("Alt loc not supported")
warnings.warn(
"Alt locs not supported; only empty or 'A' alt locs will be read",
)
if alt_loc != "A":
continue
if prev is not None and residue_info[0] != prev[0]:
# TODO: Support multi-model files
warnings.warn(
Expand Down Expand Up @@ -556,14 +559,20 @@ def get_residue_matches(
match.expect_prior_bond != neighbours_support_prior_bond
)
if prior_bond_mismatched:
logging.debug(" Prior bond mismatched")
logging.debug(" Match failed: Prior bond mismatched")
logging.debug(
f" {match.expect_prior_bond=} but {neighbours_support_prior_bond=}",
)
continue

posterior_bond_mismatched = (
match.expect_posterior_bond != neighbours_support_posterior_bond
)
if posterior_bond_mismatched:
logging.debug(" Posterior bond mismatched")
logging.debug(" Match failed: Posterior bond mismatched")
logging.debug(
f" {match.expect_posterior_bond=} but {neighbours_support_posterior_bond=}",
)
continue

this_filtered_matches.append(match)
Expand Down
37 changes: 37 additions & 0 deletions openff/pablo/_tests/data/capped_arg_altresonance.pdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
ATOM 1 C ACE 1 -1.029 -4.440 2.368 1.00 0.00 C
ATOM 2 O ACE 1 -1.515 -4.609 1.242 1.00 0.00 O
ATOM 3 CH3 ACE 1 -1.599 -5.150 3.577 1.00 0.00 C
ATOM 4 1HH3 ACE 1 -1.537 -6.220 3.442 1.00 0.00 H
ATOM 5 2HH3 ACE 1 -1.044 -4.876 4.463 1.00 0.00 H
ATOM 6 3HH3 ACE 1 -2.635 -4.874 3.714 1.00 0.00 H
ATOM 7 N ARG 2 -0.022 -3.647 2.514 1.00 0.00 N
ATOM 8 CA ARG 2 0.519 -2.968 1.340 1.00 0.00 C
ATOM 9 C ARG 2 2.029 -2.951 1.374 1.00 0.00 C
ATOM 10 O ARG 2 2.654 -2.667 2.392 1.00 0.00 O
ATOM 11 CB ARG 2 -0.063 -1.527 1.282 1.00 0.00 C
ATOM 12 CG ARG 2 0.188 -0.757 -0.045 1.00 0.00 C
ATOM 13 CD ARG 2 -0.388 0.668 -0.004 1.00 0.00 C
ATOM 14 NE ARG 2 -0.136 1.349 -1.308 1.00 0.00 N
ATOM 15 CZ ARG 2 -0.497 2.593 -1.608 1.00 0.00 C
ATOM 16 NH1 ARG 2 -1.121 3.383 -0.780 1.00 0.00 N
ATOM 17 NH2 ARG 2 -0.215 3.048 -2.788 1.00 0.00 N1+
ATOM 18 H ARG 2 0.386 -3.498 3.425 1.00 0.00 H
ATOM 19 HA ARG 2 0.211 -3.538 0.443 1.00 0.00 H
ATOM 20 2HB ARG 2 0.336 -0.947 2.140 1.00 0.00 H
ATOM 21 3HB ARG 2 -1.156 -1.569 1.465 1.00 0.00 H
ATOM 22 2HG ARG 2 -0.252 -1.330 -0.887 1.00 0.00 H
ATOM 23 3HG ARG 2 1.276 -0.706 -0.255 1.00 0.00 H
ATOM 24 2HD ARG 2 0.080 1.230 0.834 1.00 0.00 H
ATOM 25 3HD ARG 2 -1.476 0.622 0.217 1.00 0.00 H
ATOM 26 HE ARG 2 0.348 0.865 -2.071 1.00 0.00 H
ATOM 27 1HH1 ARG 2 -1.312 2.964 0.133 1.00 0.00 H
ATOM 28 2HH1 ARG 2 -1.365 4.326 -1.087 1.00 0.00 H
ATOM 29 1HH2 ARG 2 0.275 2.415 -3.423 1.00 0.00 H
ATOM 30 2HH2 ARG 2 -0.502 4.005 -3.000 1.00 0.00 H
ATOM 31 N NME 3 2.682 -3.244 0.300 1.00 0.00 N
ATOM 32 CH3 NME 3 4.134 -3.234 0.309 1.00 0.00 C
ATOM 33 H NME 3 2.183 -3.480 -0.546 1.00 0.00 H
ATOM 34 1HH3 NME 3 4.498 -2.228 0.165 1.00 0.00 H
ATOM 35 2HH3 NME 3 4.501 -3.607 1.254 1.00 0.00 H
ATOM 36 3HH3 NME 3 4.512 -3.861 -0.486 1.00 0.00 H
END
Loading

0 comments on commit 06719cf

Please sign in to comment.