-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1053 from OpenFreeEnergy/cli_charge_changes
CLI adaptive settings for charge change transformations
- Loading branch information
Showing
5 changed files
with
135 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
**Added:** | ||
|
||
* <news item> | ||
|
||
**Changed:** | ||
|
||
* Networks planned using the CLI will now automatically use an extended protocol for transformations involving a net charge change `PR#1053 <https://github.com/OpenFreeEnergy/openfe/pull/1053>`_ | ||
|
||
**Deprecated:** | ||
|
||
* <news item> | ||
|
||
**Removed:** | ||
|
||
* <news item> | ||
|
||
**Fixed:** | ||
|
||
* <news item> | ||
|
||
**Security:** | ||
|
||
* <news item> |
This file contains 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
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from gufe import LigandAtomMapping | ||
|
||
def get_alchemical_charge_difference(mapping: LigandAtomMapping) -> int: | ||
""" | ||
Return the difference in formal charge between stateA and stateB defined as (formal charge A - formal charge B) | ||
Parameters | ||
---------- | ||
mapping: LigandAtomMapping | ||
The mapping between the end states A and B. | ||
Returns | ||
------- | ||
int: | ||
The difference in formal charge between the end states. | ||
""" | ||
from rdkit import Chem | ||
charge_a = Chem.rdmolops.GetFormalCharge(mapping.componentA.to_rdkit()) | ||
charge_b = Chem.rdmolops.GetFormalCharge(mapping.componentB.to_rdkit()) | ||
return charge_a - charge_b |
This file contains 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