Merge pull request #2740 from RosettaCommons/vmullig/netcharge
Adding a score term that penalizes deviation from a desired net charge in a pose or region
This is to complement @dougrenfrew's refactoring of the Supercharge application (pull request #2721 and #2737). The term, called `netcharge` will be analogous to `aa_composition`, but instead of letting a user control amino acid composition, it will let him or her control regional or global net charge in any context that calls the packer. (Used in conjunction with `aa_composition`, it can also control total number of charged residues. It will also be usable with the `hbnet` score term to create hydrogen bond networks with a desired net charge.)
Tasks:
- [x] Copy `aa_composition` files to create the score term.
- [x] Add `netcharge` score term to score terms list.
- [x] Modify to penalize deviation from a desired net charge rather than a desired amino acid composition.
- [x] Set up suitable interface for controlling the score term.
- [x] Flags for control from commandline.
- [x] Document this.
- [x] Options for control from RosettaScripts/PyRosetta/C++ code. (Modify `ScoreFunctionLoader` for this.)
- [x] Document this.
- [x] Add `NetChargeConstraint` (a type of `SequenceConstraint`) to control desired net charge on either a pose level or a region level.
- [x] Mover to add constraints to pose or region selected by a ResidueSelector.
- ~~Options in mover so that I don't have to pass in a file if I don't want to.~~ --> for a future pull request.
- [x] Test this.
- [x] Document this.
- [x] Unit tests.
- [x] For symmetric case, too.
- [x] Add more unit tests for out-of-bounds functions. I'm not 100% sure that my logic is correct.
- [x] Good thing I checked. Correct the tailfunction behaviour.
- [x] Integration tests.
- [x] For symmetric case, too.
- [x] Beauty.
- [x] Documentation.
Possibly in a future pull request:
- Modify the `AddHelixSequenceConstraintsMover` to add net charge constraints to helix termini instead of amino acid constraints.