Commit 86edec1f authored by Remi Perenon's avatar Remi Perenon

Merge branch 'bugfix-ndtsf_error' into 'develop'

Bugfix ndtsf error

See merge request !53
parents 91e207b3 f304d47a
Pipeline #6990 passed with stages
in 15 minutes and 10 seconds
version 1.4.0
--------------
* FIXED issue #49 Some LAMMPS files could not be converted
* FIXED issue #48 There was an error in NDTSF analysis
* FIXED issue #47 GUI converter did not close
* CHANGED (internal) Docker build has been changed
* CHANGED (internal) macOS build has been changed
......
......@@ -210,9 +210,12 @@ class NeutronDynamicTotalStructureFactor(IJob):
self._outputData["f(q,t)_coh_weighted_%s%s" % pair][:] = self._outputData["f(q,t)_coh_%s%s" % pair][:] * numpy.sqrt(ci*cj) * bi * bj
self._outputData["s(q,f)_coh_weighted_%s%s" % pair][:] = self._outputData["s(q,f)_coh_%s%s" % pair][:] * numpy.sqrt(ci*cj) * bi * bj
self._outputData["f(q,t)_coh_total"][:] += self._outputData["f(q,t)_coh_weighted_%s%s" % pair][:]
self._outputData["s(q,f)_coh_total"][:] += self._outputData["s(q,f)_coh_weighted_%s%s" % pair][:]
if pair[0] == pair[1]: # Add a factor 2 if the two elements are different
self._outputData["f(q,t)_coh_total"][:] += self._outputData["f(q,t)_coh_weighted_%s%s" % pair][:]
self._outputData["s(q,f)_coh_total"][:] += self._outputData["s(q,f)_coh_weighted_%s%s" % pair][:]
else:
self._outputData["f(q,t)_coh_total"][:] += 2*self._outputData["f(q,t)_coh_weighted_%s%s" % pair][:]
self._outputData["s(q,f)_coh_total"][:] += 2*self._outputData["s(q,f)_coh_weighted_%s%s" % pair][:]
# Compute incoherent functions and structure factor
for element, ni in nAtomsPerElement.items():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment