From df373d2bf09ff9ab31f6c3f914d0b24165301d3c Mon Sep 17 00:00:00 2001 From: lunamorrow Date: Thu, 13 Feb 2025 14:13:54 +1000 Subject: [PATCH] Added documentation to PolyBuild RTPCharge describing how the monomer charges are adjusted --- polybuild/polybuild/RTPcharge.py | 22 ++++++++++++++++++++++ polytop/polytop/Dihedrals.py | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/polybuild/polybuild/RTPcharge.py b/polybuild/polybuild/RTPcharge.py index d811009..727ff07 100644 --- a/polybuild/polybuild/RTPcharge.py +++ b/polybuild/polybuild/RTPcharge.py @@ -11,6 +11,28 @@ conda activate polyconstruct-env RTPcharge +**How monomer charges are adjusted by RTPCharge:** + +Once the connectivity information has been generated by ITP2RTP, the .rtp file +is processed using RTPCharge to modify partial changes to ensure that each +monomer contains an integer (or zero) net charge. The user specifies which +atoms should be kept, and any unselected atoms are removed. Since removing +atoms can alter the net charge, the script calculates the total charge of the +remaining atoms and applies proportional adjustments to partial charges to +restore the defined charge. Initially, it attempts to distribute the correction +within a 5% tolerance of each atom's original charge. If defined charge cannot +be achieved, it increases the tolerance to 10%. If neither threshold is +sufficient, the script stops execution, notifying the user. Since these +adjustments are done to all the atoms in monomer level, the relative charge +distribution across the monomer remains similar. Therefore, the dipole moments, +hydrogen bonding patterns, and overall electrostatic potential should not +deviate significantly from the original system. However, the charge adjustment +tolerance is capped at 10% to limit major alterations to partial charges. If +the net charge of a monomer cannot be corrected within this 10% threshold, +manual adjustment by the user is required to ensure essential chemical +properties are accurately maintained. The final output is a modified .rtp file +in the pdb2gmx format required to extract the monomer parameters for the final +polymer topology. """ import os diff --git a/polytop/polytop/Dihedrals.py b/polytop/polytop/Dihedrals.py index 1acafc9..e382f8c 100644 --- a/polytop/polytop/Dihedrals.py +++ b/polytop/polytop/Dihedrals.py @@ -13,7 +13,7 @@ class Dihedral_type(IntEnum): Enum to track Dihedral types including proper (1) and improper (2). Proper dihedrals also include: Ryckaert-Bellemans (3), Fourier (5), - proper (multiple) (9), tabulated (8) and restricted (10). + proper (multiple) (9), tabulated (8) and restricted (10). Improper dihedrals also include: periodic improper (4). For more information, see