Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
MDANSE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Scientific Software
MDANSE
Commits
00f4c0d7
Commit
00f4c0d7
authored
Aug 06, 2018
by
eric pellegrini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
MDANSE/Framework/Jobs/DynamicCoherentStructureFactor.py
MDANSE/Framework/Jobs/DynamicCoherentStructureFactor.py
+9
-5
No files found.
MDANSE/Framework/Jobs/DynamicCoherentStructureFactor.py
View file @
00f4c0d7
...
...
@@ -124,20 +124,24 @@ class DynamicCoherentStructureFactor(IJob):
return
index
,
None
else
:
traj
=
self
.
configuration
[
'trajectory'
][
'instance'
]
qVectors
=
self
.
configuration
[
"q_vectors"
][
"value"
][
shell
][
"q_vectors"
]
nQVectors
=
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
,
qVectors
.
shape
[
1
]
),
dtype
=
numpy
.
complex64
)
rho
[
element
]
=
numpy
.
zeros
((
self
.
_nFrames
,
nQVectors
),
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