Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
00f4c0d7
Commit
00f4c0d7
authored
Aug 06, 2018
by
eric pellegrini
Browse files
Fixed bug when using q vectors under NPT conditions
parent
e56a01f5
Pipeline
#4328
failed with stages
in 9 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
MDANSE/Framework/Jobs/DynamicCoherentStructureFactor.py
View file @
00f4c0d7
...
...
@@ -124,20 +124,24 @@ class DynamicCoherentStructureFactor(IJob):
return
index
,
None
else
:
traj
=
self
.
configuration
[
'trajectory'
][
'instance'
]
q
Vectors
=
self
.
configuration
[
"q_vectors"
][
"value"
][
shell
][
"q_vectors"
]
nQ
Vectors
=
self
.
configuration
[
"q_vectors"
][
"value"
][
shell
][
"q_vectors"
]
.
shape
[
1
]
rho
=
{}
for
element
in
self
.
configuration
[
'atom_selection'
][
'unique_names'
]:
rho
[
element
]
=
numpy
.
zeros
((
self
.
_nFrames
,
q
Vectors
.
shape
[
1
]
),
dtype
=
numpy
.
complex64
)
rho
[
element
]
=
numpy
.
zeros
((
self
.
_nFrames
,
nQ
Vectors
),
dtype
=
numpy
.
complex64
)
# loop over the trajectory time steps
for
i
,
frame
in
enumerate
(
self
.
configuration
[
'frames'
][
'value'
]):
qVectors
=
self
.
configuration
[
"q_vectors"
][
"value"
][
shell
][
"q_vectors"
]
conf
=
traj
.
configuration
[
frame
]
for
element
,
idxs
in
self
.
_indexesPerElement
.
items
():
selectedCoordinates
=
numpy
.
take
(
conf
.
array
,
idxs
,
axis
=
0
)
rho
[
element
][
i
,:]
=
numpy
.
sum
(
numpy
.
exp
(
1j
*
numpy
.
dot
(
selectedCoordinates
,
qVectors
)),
axis
=
0
)
...
...
@@ -183,4 +187,4 @@ class DynamicCoherentStructureFactor(IJob):
self
.
configuration
[
'trajectory'
][
'instance'
].
close
()
REGISTRY
[
'dcsf'
]
=
DynamicCoherentStructureFactor
\ No newline at end of file
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