mailRe: CST branch


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Pavel Kaderavek on July 27, 2010 - 19:51:
Dear Edward,

we are a bit confused by last few posts. In the post:
https://mail.gna.org/public/relax-devel/2010-05/msg00000.html
it is suggested to consider the interactions as higher level than the spin and build the data matrix as follows:
self.data[interaction_index][spin_index]
Based on this we created an example:
https://mail.gna.org/public/relax-devel/2010-05/msg00010.html
However, in the post:
https://mail.gna.org/public/relax-devel/2010-05/msg00012.html
the example was commented in the following way:
"The first index is the spin and the second is the interaction - your example here has this around the other way."

As it seems to be a bit contradictory and we would like to clarify this point. We think that the correct order of the indices should be like this:
self.data[spin_index][interaction_index]
as mentioned in the last reply.

Generally, the code suggested in:
https://mail.gna.org/public/relax-devel/2010-05/msg00000.html
could be used with the following modifications:

        # Create the data list of lists used to store the interaction
and spin specific data.
self.data = ""> for spin_index in xrange(self.num_spins):
# Add an empty list for the spin.
self.data.append([])

# Total number of ri (only sum for the first interaction).
  self.total_num_ri = self.total_num_ri + num_ri[spin_index]

# Loop over the interactions.
for int_index in xrange(self.num_interactions[spin_index]):
# The ratio of gyromagnetic ratios.
g_ratio = gh[spin_index][int_index] / gx[spin_index][int_index]

# Append the class instance Data to the interaction
list for this spin.
self.data[spin_index].append(Data()


Best regards,
Pavel & Petr


Related Messages


Powered by MHonArc, Updated Wed Jul 28 17:20:18 2010