Repository navigation
Add support for angle potentials - #150
Merged
Merged
Conversation
pm-blanco
self-requested a review
April 8, 2026 16:05
pm-blanco
reviewed
May 2, 2026
pm-blanco
reviewed
May 2, 2026
pm-blanco
requested changes
May 2, 2026
pm-blanco
left a comment
Collaborator
There was a problem hiding this comment.
I have a few final formal revisions to the PR, but overall it looks really good. Thank you very much @1234somesh for an excellent work, I really like how the implementation looks.
pm-blanco
reviewed
May 3, 2026
pm-blanco
reviewed
May 3, 2026
rajkumarrb
added a commit
to rajkumarrb/pyMBE
that referenced
this pull request
Sep 3, 2026
Completes the last unchecked task of pyMBE-dev#143 (angles were merged in pyMBE-dev#150; dihedrals are the remaining bonded-potential scope). The motivating case is Martini 2.1 peptide backbone dihedrals. New: - DihedralTemplate / DihedralInstance in pyMBE/storage. The template holds a list of terms, so GROMACS-style stacked multiplicities on the same quadruplet register as one Dihedral object per term. - pmb.define_dihedral_potential / define_default_dihedral_potential / create_dihedral_potential / get_dihedral_template. - _generate_dihedrals_for_entity and a gen_dihedral kwarg on create_residue / create_molecule / create_hydrogel, mirroring gen_angle. - espresso_engine _add_dihedral / _get_dihedral_instance / _create_dihedral_instance, wired into add_instances_to_engine. - storage manager + io: register / update / delete / templates-df / save / load branches for the dihedral type. - testsuite/dihedral_tests.py, samples/setup_dihedral_potential.py. The canonical template key is invariant under full reversal of the quadruplet. The "periodic" type maps onto the ESPResSo Dihedral bond V(phi) = k*[1 - cos(n*phi - phi_0)]; "tabulated" is reserved but raises NotImplementedError. GROMACS proper dihedral type 1, V(phi) = k*[1 + cos(n*phi - phi_s)], is recovered with phi_0 = phi_s + pi (documented in the docstrings and the sample, not applied implicitly). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
rajkumarrb
added a commit
to rajkumarrb/pyMBE
that referenced
this pull request
Sep 3, 2026
Completes the last unchecked task of pyMBE-dev#143 (angles were merged in pyMBE-dev#150; dihedrals are the remaining bonded-potential scope). The motivating case is Martini 2.1 peptide backbone dihedrals. New: - DihedralTemplate / DihedralInstance in pyMBE/storage. The template holds a list of terms, so GROMACS-style stacked multiplicities on the same quadruplet register as one Dihedral object per term. - pmb.define_dihedral_potential / define_default_dihedral_potential / create_dihedral_potential / get_dihedral_template. - _generate_dihedrals_for_entity and a gen_dihedral kwarg on create_residue / create_molecule / create_hydrogel, mirroring gen_angle. - espresso_engine _add_dihedral / _get_dihedral_instance / _create_dihedral_instance, wired into add_instances_to_engine. - storage manager + io: register / update / delete / templates-df / save / load branches for the dihedral type. - testsuite/dihedral_tests.py, samples/setup_dihedral_potential.py. The canonical template key is invariant under full reversal of the quadruplet. The "periodic" type maps onto the ESPResSo Dihedral bond V(phi) = k*[1 - cos(n*phi - phi_0)]; "tabulated" is reserved but raises NotImplementedError. GROMACS proper dihedral type 1, V(phi) = k*[1 + cos(n*phi - phi_s)], is recovered with phi_0 = phi_s + pi (documented in the docstrings and the sample, not applied implicitly).
3 tasks done
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.
Partially solves #143
Added
Angleto store information about angular potentials in the pyMBE database.define_angleand ``define_default_angle` to define a templates of angular potentials in pyMBE.create_angleto create instances of angular potential in pyMBEget_angle_templateto retrieve a template of an angle potential in the pyMBE database.Fixed