Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pycgtool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
James Graham
pycgtool
Commits
1621caa9
Commit
1621caa9
authored
8 years ago
by
James Graham
Browse files
Options
Downloads
Patches
Plain Diff
Added simulation time to Frame
Fixes graphs from GROMACS tools analysing output XTCs
parent
569e2840
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pycgtool/frame.py
+5
-1
5 additions, 1 deletion
pycgtool/frame.py
pycgtool/mapping.py
+1
-0
1 addition, 0 deletions
pycgtool/mapping.py
with
6 additions
and
1 deletion
pycgtool/frame.py
+
5
−
1
View file @
1621caa9
...
@@ -135,6 +135,7 @@ class Frame:
...
@@ -135,6 +135,7 @@ class Frame:
"""
"""
self
.
residues
=
[]
self
.
residues
=
[]
self
.
number
=
frame_start
-
1
self
.
number
=
frame_start
-
1
self
.
time
=
0
self
.
numframes
=
0
self
.
numframes
=
0
self
.
natoms
=
0
self
.
natoms
=
0
self
.
box
=
np
.
zeros
(
3
,
dtype
=
np
.
float32
)
self
.
box
=
np
.
zeros
(
3
,
dtype
=
np
.
float32
)
...
@@ -249,6 +250,7 @@ class Frame:
...
@@ -249,6 +250,7 @@ class Frame:
i
+=
1
i
+=
1
self
.
number
+=
1
self
.
number
+=
1
self
.
time
=
xtc_frame
.
time
[
0
]
self
.
box
=
xtc_frame
.
unitcell_lengths
[
0
]
self
.
box
=
xtc_frame
.
unitcell_lengths
[
0
]
return
True
return
True
# IndexError - run out of xtc frames
# IndexError - run out of xtc frames
...
@@ -274,6 +276,7 @@ class Frame:
...
@@ -274,6 +276,7 @@ class Frame:
atom
.
coords
=
self
.
xtc
.
x
[
i
]
atom
.
coords
=
self
.
xtc
.
x
[
i
]
i
+=
1
i
+=
1
self
.
number
+=
1
self
.
number
+=
1
self
.
time
=
self
.
xtc
.
time
self
.
box
=
np
.
diag
(
self
.
xtc
.
box
)[
0
:
3
]
/
10
self
.
box
=
np
.
diag
(
self
.
xtc
.
box
)[
0
:
3
]
/
10
...
@@ -303,13 +306,14 @@ class Frame:
...
@@ -303,13 +306,14 @@ class Frame:
xyz
[
0
][
i
]
=
atom
.
coords
xyz
[
0
][
i
]
=
atom
.
coords
i
+=
1
i
+=
1
time
=
np
.
array
([
self
.
time
],
dtype
=
np
.
float32
)
step
=
np
.
array
([
self
.
number
],
dtype
=
np
.
int32
)
step
=
np
.
array
([
self
.
number
],
dtype
=
np
.
int32
)
box
=
np
.
zeros
((
1
,
3
,
3
),
dtype
=
np
.
float32
)
box
=
np
.
zeros
((
1
,
3
,
3
),
dtype
=
np
.
float32
)
for
i
in
range
(
3
):
for
i
in
range
(
3
):
box
[
0
][
i
][
i
]
=
self
.
box
[
i
]
box
[
0
][
i
][
i
]
=
self
.
box
[
i
]
self
.
_xtc_buffer
.
write
(
xyz
,
step
=
step
,
box
=
box
)
self
.
_xtc_buffer
.
write
(
xyz
,
time
=
time
,
step
=
step
,
box
=
box
)
def
_parse_gro
(
self
,
filename
):
def
_parse_gro
(
self
,
filename
):
"""
"""
...
...
This diff is collapsed.
Click to expand it.
pycgtool/mapping.py
+
1
−
0
View file @
1621caa9
...
@@ -175,6 +175,7 @@ class Mapping:
...
@@ -175,6 +175,7 @@ class Mapping:
aa_residues
=
list
(
aa_residues
)
aa_residues
=
list
(
aa_residues
)
cgframe
=
self
.
_cg_frame_setup
(
aa_residues
,
frame
.
name
)
cgframe
=
self
.
_cg_frame_setup
(
aa_residues
,
frame
.
name
)
cgframe
.
time
=
frame
.
time
cgframe
.
number
=
frame
.
number
cgframe
.
number
=
frame
.
number
cgframe
.
box
=
frame
.
box
cgframe
.
box
=
frame
.
box
...
...
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