Commit 79af7515 authored by Remi Perenon's avatar Remi Perenon
Browse files

Merge branch 'bugfix-fix_dcsf_q_vectors_and_rmsd' into 'develop'

Bugfix fix dcsf q vectors and rmsd

See merge request !34
parents 16071ec2 264c1d7a
Pipeline #4337 passed with stages
in 26 minutes and 15 seconds
......@@ -2,6 +2,8 @@ version 1.2.0
* ADDED issue #27 Better error handling when an error occurs when running an analysis from the GUI
* ADDED issue #10 Implemented Gromacs trajectory converter
* FIXED issue #32 Result of DCSF was incorrect (the QVectors changed over frames) /!\ Modifies job behavior
* FIXED issue #31 Result of RMSD was incorrect (the sqrt was not applied) /!\ Modifies job behavior
* FIXED issue #30 Normalization of VACF total value was incorrect
* FIXED issue #29 Some jobs (AC, CCF, DOS, DACF, DCSF, DISF, GACF, MSD, PACF, RMSD, VACF) did not behave properly if first time of the MD is not zero
* FIXED issue #28 The time step is now part of the settings for DCD based converters
......@@ -124,26 +124,24 @@ class DynamicCoherentStructureFactor(IJob):
return index, None
traj = self.configuration['trajectory']['instance']
qVectors = self.configuration["q_vectors"]["value"][shell]["q_vectors"]
qVectors = traj.universe._boxToRealPointArray(qVectors.T)
qVectors = qVectors.T
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*, qVectors)),axis=0)
......@@ -189,4 +187,4 @@ class DynamicCoherentStructureFactor(IJob):
REGISTRY['dcsf'] = DynamicCoherentStructureFactor
\ No newline at end of file
......@@ -50,10 +50,6 @@ class OutputData(collections.OrderedDict):
for fmt in formats:
REGISTRY["format"][fmt].write(basename, self, header)
def __setitem__(self, item, value):
# Explicitely discard any changes on output data
class IOutputVariable(numpy.ndarray):
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