ISISNeutronMuon / ISISNeutronMuon/MDMC
Add delete_structural_unit method to Universe
- Dominant language
- Python
- Stars
- 4
- Forks
- 0
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 5
Description
**Is your feature request related to a problem? Please describe.**
Currently a `StructuralUnit` can be added to a `Universe` but not removed. Add a method to `Universe` which can be used to delete a `StructuralUnit`.
**Describe the solution you'd like**
There is one definite consequences of deleting a `StructuralUnit`:
- `Universe.configuration` will need to be modified to delete the atoms of the `StructuralUnit`. Add a `delete_structural_unit` method to `Configuration` to achieve this.
There are several potential consequences of deleting a `StructuralUnit`:
- Any `bonded_interactions` involving the `StructuralUnit` should be removed from the `Universe`, even if they involve another `StructuralUnit` that still belong to the `Universe`. It should be made explicit in the docstring that this occurs.
- Any `bonded_interaction_pairs` involving the `StructuralUnit` should also be removed from the `Universe`. This does not need to be mentioned in the docstring. Add a `remove_bonded_interaction_pairs` method to achieve this.
- If removing the `StructuralUnit` from the `Universe` removes the last `Atom` of a specific `atom_type` from the `Universe`, then `Universe.atom_types` needs to be updated.
- A potential consequence of updating `Universe.atom_types` is that any `NonBondedInteraction` in `Universe.nonbonded_interactions` which involves the removed `atom_type` should be removed. It should be made explicit in the docstring that this occurs. Add a `remove_nonbonded_interactions` method to achieve this.
**Additional context**
This is required for #217
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.