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
ace24522
Commit
ace24522
authored
Oct 03, 2018
by
João Rodrigues
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a seed parameter to addMissingAtoms to allow reproducible results
parent
699ba103
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
pdbfixer/pdbfixer.py
+9
-1
No files found.
pdbfixer/pdbfixer.py
View file @
ace24522
...
@@ -855,9 +855,15 @@ class PDBFixer(object):
...
@@ -855,9 +855,15 @@ class PDBFixer(object):
self
.
missingAtoms
=
missingAtoms
self
.
missingAtoms
=
missingAtoms
self
.
missingTerminals
=
missingTerminals
self
.
missingTerminals
=
missingTerminals
def
addMissingAtoms
(
self
):
def
addMissingAtoms
(
self
,
seed
=
None
):
"""Add all missing heavy atoms, as specified by the missingAtoms, missingTerminals, and missingResidues fields.
"""Add all missing heavy atoms, as specified by the missingAtoms, missingTerminals, and missingResidues fields.
Parameters
----------
seed : int
Integer to set the random seed number of the integrator used in the minimization of the
coordinates of the newly-added atoms.
Notes
Notes
-----
-----
You must already have called findMissingAtoms() to have identified atoms to be added.
You must already have called findMissingAtoms() to have identified atoms to be added.
...
@@ -924,6 +930,8 @@ class PDBFixer(object):
...
@@ -924,6 +930,8 @@ class PDBFixer(object):
# Do an energy minimization.
# Do an energy minimization.
integrator
=
mm
.
LangevinIntegrator
(
300
*
unit
.
kelvin
,
10
/
unit
.
picosecond
,
5
*
unit
.
femtosecond
)
integrator
=
mm
.
LangevinIntegrator
(
300
*
unit
.
kelvin
,
10
/
unit
.
picosecond
,
5
*
unit
.
femtosecond
)
if
seed
is
not
None
:
integrator
.
setRandomNumberSeed
(
seed
)
context
=
mm
.
Context
(
system
,
integrator
)
context
=
mm
.
Context
(
system
,
integrator
)
context
.
setPositions
(
newPositions
)
context
.
setPositions
(
newPositions
)
mm
.
LocalEnergyMinimizer
.
minimize
(
context
)
mm
.
LocalEnergyMinimizer
.
minimize
(
context
)
...
...
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