From 4c4350d6888cf098405c463f300f76d1610a53df Mon Sep 17 00:00:00 2001 From: James Krieger Date: Fri, 15 Nov 2024 17:08:11 +0100 Subject: [PATCH 1/5] update insty docs --- prody/proteins/interactions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/prody/proteins/interactions.py b/prody/proteins/interactions.py index 88e796c56..339248947 100644 --- a/prody/proteins/interactions.py +++ b/prody/proteins/interactions.py @@ -1517,7 +1517,7 @@ def calcInteractionsMultipleFrames(atoms, interaction_type, trajectory, **kwargs def calcProteinInteractions(atoms, **kwargs): - """Compute all protein interactions (shown below) using default parameters. + """Compute all protein interactions (shown below). (1) Hydrogen bonds (2) Salt Bridges (3) RepulsiveIonicBonding @@ -1525,6 +1525,10 @@ def calcProteinInteractions(atoms, **kwargs): (5) Pi-cation interactions (6) Hydrophobic interactions (7) Disulfide Bonds + + kwargs can be passed on to the underlying functions as described + in their documentation. For example, distDA and angleDHA can be used + to control hydrogen bonds, or distA and angle can be used across types. :arg atoms: an Atomic object from which residues are selected :type atoms: :class:`.Atomic` From 07ef0357708f98f4d05bf8b1fb50fde4e44206a7 Mon Sep 17 00:00:00 2001 From: James Krieger Date: Fri, 15 Nov 2024 18:51:46 +0100 Subject: [PATCH 2/5] more info --- prody/proteins/interactions.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/prody/proteins/interactions.py b/prody/proteins/interactions.py index 339248947..4ac276960 100644 --- a/prody/proteins/interactions.py +++ b/prody/proteins/interactions.py @@ -1336,7 +1336,7 @@ def calcDisulfideBonds(atoms, **kwargs): :arg atoms: an Atomic object from which residues are selected :type atoms: :class:`.Atomic` - :arg distDB: non-zero value, maximal distance between atoms of hydrophobic residues. + :arg distDB: non-zero value, maximal distance between atoms of cysteine residues. default is 3. distA works too :type distDB: int, float @@ -1455,7 +1455,7 @@ def calcMetalInteractions(atoms, distA=3.0, extraIons=['FE'], excluded_ions=['SO def calcInteractionsMultipleFrames(atoms, interaction_type, trajectory, **kwargs): """Compute selected type interactions for DCD trajectory or multi-model PDB - using default parameters.""" + using default parameters or those from kwargs.""" try: coords = getCoords(atoms) @@ -1580,10 +1580,12 @@ def calcHydrogenBondsTrajectory(atoms, trajectory=None, **kwargs): :arg distA: non-zero value, maximal distance between donor and acceptor. default is 3.5 + distDA also works :type distA: int, float :arg angle: non-zero value, maximal (180 - D-H-A angle) (donor, hydrogen, acceptor). default is 40. + angleDHA also works :type angle: int, float :arg seq_cutoff: non-zero value, interactions will be found between atoms with index differences @@ -1624,6 +1626,7 @@ def calcSaltBridgesTrajectory(atoms, trajectory=None, **kwargs): :arg distA: non-zero value, maximal distance between center of masses of N and O atoms of negatively and positevely charged residues. default is 5. + distSB also works :type distA: int, float :arg selection: selection string @@ -1660,6 +1663,7 @@ def calcRepulsiveIonicBondingTrajectory(atoms, trajectory=None, **kwargs): :arg distA: non-zero value, maximal distance between center of masses between N-N or O-O atoms of residues. default is 4.5. + distRB also works :type distA: int, float :arg selection: selection string @@ -1696,6 +1700,7 @@ def calcPiStackingTrajectory(atoms, trajectory=None, **kwargs): :arg distA: non-zero value, maximal distance between center of masses of residues aromatic rings. default is 5. + distPS also works :type distA: int, float :arg angle_min: minimal angle between aromatic rings. @@ -1740,6 +1745,7 @@ def calcPiCationTrajectory(atoms, trajectory=None, **kwargs): :arg distA: non-zero value, maximal distance between center of masses of aromatic ring and positively charge group. default is 5. + distPC also works :type distA: int, float :arg selection: selection string @@ -1775,6 +1781,7 @@ def calcHydrophobicTrajectory(atoms, trajectory=None, **kwargs): :arg distA: non-zero value, maximal distance between atoms of hydrophobic residues. default is 4.5. + distHPh also works :type distA: int, float :arg selection: selection string @@ -1807,8 +1814,9 @@ def calcDisulfideBondsTrajectory(atoms, trajectory=None, **kwargs): :arg trajectory: trajectory file :type trajectory: class:`.Trajectory` - :arg distA: non-zero value, maximal distance between atoms of hydrophobic residues. + :arg distA: non-zero value, maximal distance between atoms of cysteine residues. default is 2.5. + distDB also works :type distA: int, float :arg start_frame: index of first frame to read From ec00e2d0666cbfe6f48ade29ae8336ccf8c2da76 Mon Sep 17 00:00:00 2001 From: James Krieger Date: Mon, 18 Nov 2024 13:45:19 +0100 Subject: [PATCH 3/5] fix angleDHA --- prody/proteins/interactions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prody/proteins/interactions.py b/prody/proteins/interactions.py index 4ac276960..eb80779f0 100644 --- a/prody/proteins/interactions.py +++ b/prody/proteins/interactions.py @@ -522,7 +522,7 @@ def calcHydrogenBonds(atoms, **kwargs): :arg angleDHA: non-zero value, maximal (180 - D-H-A angle) (donor, hydrogen, acceptor). default is 40. - angle also works + angle and angleDA also work :type angleDHA: int, float :arg seq_cutoff_HB: non-zero value, interactions will be found between atoms with index differences @@ -576,6 +576,7 @@ def calcHydrogenBonds(atoms, **kwargs): distA = kwargs.pop('distA', distDA) angleDHA = kwargs.pop('angleDA', 40) + angleDHA = kwargs.pop('angleDHA', angleDHA) angle = kwargs.pop('angle', angleDHA) seq_cutoff_HB = kwargs.pop('seq_cutoff_HB', 25) From 290663300e1432830f4f6d3208b35a8b386844ee Mon Sep 17 00:00:00 2001 From: James Krieger Date: Mon, 18 Nov 2024 17:46:36 +0100 Subject: [PATCH 4/5] add chain bar to showCumulativeInteractionTypes energy --- prody/proteins/interactions.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/prody/proteins/interactions.py b/prody/proteins/interactions.py index 88e796c56..3ecd4e094 100644 --- a/prody/proteins/interactions.py +++ b/prody/proteins/interactions.py @@ -3798,9 +3798,13 @@ def showCumulativeInteractionTypes(self, **kwargs): fig, ax = plt.subplots(num=None, figsize=(20,6), facecolor='w') matplotlib.rcParams['font.size'] = '24' - ax.bar(ResNumb, matrix_en_sum, width, color='blue') + zeros_row = np.zeros(matrix_en_sum.shape) + pplot(zeros_row, atoms=atoms.ca) + + ax.bar(ResList, matrix_en_sum, width, color='blue') - plt.xlim([ResNumb[0]-0.5, ResNumb[-1]+0.5]) + #plt.xlim([ResList[0]-0.5, ResList[-1]+0.5]) + plt.ylim([min(matrix_en_sum)-1,0]) plt.tight_layout() plt.xlabel('Residue') plt.ylabel('Cumulative Energy [kcal/mol]') From 1a026476130ac153d4f34d47bda6205d5fb12733 Mon Sep 17 00:00:00 2001 From: James Krieger Date: Mon, 18 Nov 2024 18:18:20 +0100 Subject: [PATCH 5/5] typo fix --- prody/proteins/interactions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prody/proteins/interactions.py b/prody/proteins/interactions.py index eb80779f0..e6d90f723 100644 --- a/prody/proteins/interactions.py +++ b/prody/proteins/interactions.py @@ -3689,7 +3689,7 @@ def showFrequentInteractors(self, cutoff=4, **kwargs): """Plots regions with the most frequent interactions. :arg cutoff: minimal score per residue which will be displayed. - If cutoff value is to big, top 30% with the higest values will be returned. + If cutoff value is too big, top 30% with the higest values will be returned. Default is 4. :type cutoff: int, float