Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InSty - changes in calcStatisticsInteractions #1948

Merged
merged 31 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
66786ad
Energy optional in calcStatisticsInteractions() [InSty]
karolamik13 Sep 3, 2024
8ffaed3
Merge branch 'interactions' of github.com:karolamik13/ProDy into inte…
karolamik13 Sep 3, 2024
86714f4
HIS/HSD/HSP added to tabulated_energies.txt; bug fix in get_energy()
karolamik13 Sep 4, 2024
dfc9205
Merge branch 'prody:main' into interactions
karolamik13 Sep 4, 2024
3c7fde9
reference/energy added [InSty]
karolamik13 Sep 4, 2024
285ae4d
Merge branch 'interactions' of github.com:karolamik13/ProDy into inte…
karolamik13 Sep 4, 2024
1e16368
HSE/HSD/HSP removed from tabulated_energies.txt and get_energy() is m…
karolamik13 Sep 4, 2024
d5c64c2
new function - checkNonstandardResidues()
karolamik13 Sep 4, 2024
0263b04
check for checkNonstandardResidues()
karolamik13 Sep 4, 2024
e22ff3d
More info in docs about energies
karolamik13 Sep 5, 2024
75fbd58
more info in docs InSty
karolamik13 Sep 5, 2024
1e15ef9
improvement in the non-standard residues in get_energy
karolamik13 Sep 5, 2024
9f2484b
new function saveInteractionsAsDummyAtoms() is added
karolamik13 Sep 7, 2024
def37bb
saveInteractionsAsDummyAtoms fix with kwargs
karolamik13 Sep 8, 2024
6277f1d
improvements of checkNonstandardResidues()
karolamik13 Sep 9, 2024
286ceb8
getInteractions - replace option for trajectory
karolamik13 Sep 10, 2024
3a06083
getInteractions - replace for a single PDB interactions
karolamik13 Sep 10, 2024
d86f7b8
getTimeInteractions() improvement to include selection replacement
karolamik13 Sep 10, 2024
4b5d687
showFrequentInteractors() [InSty] improvement - return dict with resi…
karolamik13 Sep 10, 2024
d5de489
addMissingAtoms() [fixer.py] - keep_ids added
karolamik13 Sep 11, 2024
6c10c46
typo in addMissingAtoms
karolamik13 Sep 11, 2024
cf86d94
typo found by James
karolamik13 Sep 11, 2024
11738ad
InSty - typos and TypeError fixed [James comments]
karolamik13 Sep 11, 2024
95a9a0d
InSty [docs and checks improvements]
karolamik13 Sep 12, 2024
860c7b3
fix typos
jamesmkrieger Sep 12, 2024
0ffa953
fix replace type
jamesmkrieger Sep 12, 2024
e1f4c6f
fix pkg_resources for PY3K
jamesmkrieger Sep 12, 2024
370e561
fix checkNonstandardResidues
jamesmkrieger Sep 12, 2024
e0f4d10
rename putDUMatom
jamesmkrieger Sep 12, 2024
670db54
add and for readability
jamesmkrieger Sep 12, 2024
2db6ea9
another typo fix
jamesmkrieger Sep 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions prody/proteins/fixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def addMissingAtoms(infile, method='openbabel', pH=7.0, outfile=None, **kwargs):
or PDBFixer with OpenMM.

There are also options whether to *model_residues* (default False), *remove_heterogens*
(default False), *keep_waters* (default True), *overwrite* (default False).
(default False), *keep_waters* (default True), *overwrite* (default False), *keep_ids* (default True).

:arg infile: PDB file name
:type infile: str
Expand All @@ -41,9 +41,17 @@ def addMissingAtoms(infile, method='openbabel', pH=7.0, outfile=None, **kwargs):
default is 'openbabel'
:type method: str

:arg pH: pH value applyed only for PDBfixer.
:arg pH: pH value applied only for PDBfixer.
:type pH: int, float

:arg model_residues: add all missing atoms from residues, applied only for PDBfixer.
default is False
:type model_residues: bool

:arg keep_ids: keep the original residue number, applied only for PDBfixer.
default is True
:type keep_ids: bool

Instalation of Openbabel:
conda install -c conda-forge openbabel

Expand All @@ -58,6 +66,7 @@ def addMissingAtoms(infile, method='openbabel', pH=7.0, outfile=None, **kwargs):
remove_heterogens = kwargs.get("remove_heterogens", False)
keep_water = kwargs.get("keep_water", True)
overwrite = kwargs.get("overwrite", False)
keep_ids = kwargs.get("keep_ids", True)

import os

Expand All @@ -70,6 +79,9 @@ def addMissingAtoms(infile, method='openbabel', pH=7.0, outfile=None, **kwargs):
if not isinstance(keep_water, bool):
raise TypeError('keep_water should be True or False')

if not isinstance(keep_ids, bool):
raise TypeError('keep_ids should be True or False')

if not isinstance(overwrite, bool):
raise TypeError('overwrite should be True or False')

Expand Down Expand Up @@ -136,7 +148,7 @@ def addMissingAtoms(infile, method='openbabel', pH=7.0, outfile=None, **kwargs):
fixer.findMissingAtoms()
fixer.addMissingAtoms()
fixer.addMissingHydrogens(pH)
PDBFile.writeFile(fixer.topology, fixer.positions, open(outfile, 'w'))
PDBFile.writeFile(fixer.topology, fixer.positions, open(outfile, 'w'), keepIds=keep_ids)
LOGGER.info("Hydrogens were added to the structure. New structure is saved as {0}.".format(outfile))

except ImportError:
Expand Down Expand Up @@ -165,8 +177,16 @@ def fixStructuresMissingAtoms(infiles, method='openbabel', pH=7.0, outfiles=None
'pdbfixer': PDBFixer and OpenMM
default is 'openbabel'
:type method: str

:arg model_residues: add all missing atoms from residues, applied only for PDBfixer.
default is False
:type model_residues: bool

:arg keep_ids: keep the original residue number, applied only for PDBfixer.
default is True
:type keep_ids: bool

:arg pH: pH value applyed only for PDBfixer.
:arg pH: pH value applied only for PDBfixer.
:type pH: int, float

Instalation of Openbabel:
Expand Down
Loading
Loading