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
d7a22b4a
Commit
d7a22b4a
authored
Jul 06, 2018
by
Gonzalez, Miguel
Committed by
Remi Perenon
Jul 30, 2018
Browse files
Correct Q vectors in CurrentCorrelationFunction and avoid unnecessary conversion in DCSF (issue 24)
parent
e1965474
Changes
2
Hide whitespace changes
Inline
Side-by-side
MDANSE/Framework/Jobs/CurrentCorrelationFunction.py
View file @
d7a22b4a
...
...
@@ -128,11 +128,7 @@ class CurrentCorrelationFunction(IJob):
traj
=
self
.
configuration
[
'trajectory'
][
'instance'
]
qVectors
=
self
.
configuration
[
"q_vectors"
][
"value"
][
shell
][
"q_vectors"
]
qVectors
=
traj
.
universe
.
_boxToRealPointArray
(
qVectors
.
T
)
qVectors
=
qVectors
.
T
nQVectors
=
qVectors
.
shape
[
1
]
rho
=
{}
...
...
MDANSE/Framework/Jobs/DynamicCoherentStructureFactor.py
View file @
d7a22b4a
...
...
@@ -127,11 +127,7 @@ class DynamicCoherentStructureFactor(IJob):
traj
=
self
.
configuration
[
'trajectory'
][
'instance'
]
qVectors
=
self
.
configuration
[
"q_vectors"
][
"value"
][
shell
][
"q_vectors"
]
qVectors
=
traj
.
universe
.
_boxToRealPointArray
(
qVectors
.
T
)
qVectors
=
qVectors
.
T
rho
=
{}
for
element
in
self
.
configuration
[
'atom_selection'
][
'unique_names'
]:
rho
[
element
]
=
numpy
.
zeros
((
self
.
_nFrames
,
qVectors
.
shape
[
1
]),
dtype
=
numpy
.
complex64
)
...
...
@@ -141,8 +137,6 @@ class DynamicCoherentStructureFactor(IJob):
conf
=
traj
.
configuration
[
frame
]
conf
.
convertToBoxCoordinates
()
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
)
...
...
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