Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mrdna
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tbgl
tools
mrdna
Commits
561b8d26
Commit
561b8d26
authored
5 years ago
by
cmaffeo2
Browse files
Options
Downloads
Patches
Plain Diff
Made an option for specifying a frame range for readAvgArbdCoords
parent
45bbc767
No related branches found
Branches containing commit
Tags
1.0a
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mrdna/arbdmodel/coords.py
+3
-3
3 additions, 3 deletions
mrdna/arbdmodel/coords.py
with
3 additions
and
3 deletions
mrdna/arbdmodel/coords.py
+
3
−
3
View file @
561b8d26
...
...
@@ -163,17 +163,17 @@ def readArbdCoords(fname):
coords
.
append
([
float
(
x
)
for
x
in
line
.
split
()[
1
:]])
return
np
.
array
(
coords
)
def
readAvgArbdCoords
(
psf
,
pdb
,
dcd
,
rmsdThreshold
=
3.5
):
def
readAvgArbdCoords
(
psf
,
pdb
,
dcd
,
rmsdThreshold
=
3.5
,
first_frame
=
0
,
last_frame
=-
1
,
stride
=
1
):
import
MDAnalysis
as
mda
usel
=
mda
.
Universe
(
psf
,
dcd
)
sel
=
usel
.
select_atoms
(
"
name D*
"
)
# r0 = ref.xyz[0,ids,:]
ts
=
usel
.
trajectory
[
-
1
]
ts
=
usel
.
trajectory
[
last_frame
]
r0
=
sel
.
positions
pos
=
[]
for
t
in
range
(
ts
.
frame
-
1
,
-
1
,
-
1
):
for
t
in
range
(
ts
.
frame
-
1
,
first_frame
-
1
,
-
stride
):
usel
.
trajectory
[
t
]
R
,
comA
,
comB
=
minimizeRmsd
(
sel
.
positions
,
r0
)
r
=
np
.
array
(
[(
r
-
comA
).
dot
(
R
)
+
comB
for
r
in
sel
.
positions
]
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment