Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pdbfixer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pdbfixer
Commits
db288690
Unverified
Commit
db288690
authored
Dec 09, 2022
by
Jonathan King
Committed by
GitHub
Dec 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add forcefield arg to addMissingHydrogens. (#262)
Also remove trailing whitespace.
parent
92f73ccc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
pdbfixer/pdbfixer.py
+5
-3
No files found.
pdbfixer/pdbfixer.py
View file @
db288690
...
@@ -790,7 +790,7 @@ class PDBFixer(object):
...
@@ -790,7 +790,7 @@ class PDBFixer(object):
residue_map
[
residue
]
=
new_name
residue_map
[
residue
]
=
new_name
# If there are mutations to be made, make them.
# If there are mutations to be made, make them.
if
len
(
residue_map
)
>
0
:
if
len
(
residue_map
)
>
0
:
deleteAtoms
=
[]
# list of atoms to delete
deleteAtoms
=
[]
# list of atoms to delete
# Find atoms that should be deleted.
# Find atoms that should be deleted.
...
@@ -1017,13 +1017,15 @@ class PDBFixer(object):
...
@@ -1017,13 +1017,15 @@ class PDBFixer(object):
self
.
topology
=
modeller
.
topology
self
.
topology
=
modeller
.
topology
self
.
positions
=
modeller
.
positions
self
.
positions
=
modeller
.
positions
def
addMissingHydrogens
(
self
,
pH
=
7.0
):
def
addMissingHydrogens
(
self
,
pH
=
7.0
,
forcefield
=
None
):
"""Add missing hydrogen atoms to the structure.
"""Add missing hydrogen atoms to the structure.
Parameters
Parameters
----------
----------
pH : float, optional, default=7.0
pH : float, optional, default=7.0
The pH based on which to select hydrogens.
The pH based on which to select hydrogens.
forcefield : ForceField, optional, default=None
The forcefield used when adding and minimizing hydrogens. If None, a default forcefield is used.
Notes
Notes
-----
-----
...
@@ -1042,7 +1044,7 @@ class PDBFixer(object):
...
@@ -1042,7 +1044,7 @@ class PDBFixer(object):
"""
"""
modeller
=
app
.
Modeller
(
self
.
topology
,
self
.
positions
)
modeller
=
app
.
Modeller
(
self
.
topology
,
self
.
positions
)
modeller
.
addHydrogens
(
pH
=
pH
)
modeller
.
addHydrogens
(
pH
=
pH
,
forcefield
=
forcefield
)
self
.
topology
=
modeller
.
topology
self
.
topology
=
modeller
.
topology
self
.
positions
=
modeller
.
positions
self
.
positions
=
modeller
.
positions
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment