Author: bugman Date: Tue Aug 12 17:04:13 2008 New Revision: 7185 URL: http://svn.gna.org/viewcvs/relax?rev=7185&view=rev Log: Updated the set() function to set the alignment tensor parameters rather than Saupe order matrix. Modified: branches/rdc_analysis/generic_fns/align_tensor.py Modified: branches/rdc_analysis/generic_fns/align_tensor.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/generic_fns/align_tensor.py?rev=7185&r1=7184&r2=7185&view=diff ============================================================================== --- branches/rdc_analysis/generic_fns/align_tensor.py (original) +++ branches/rdc_analysis/generic_fns/align_tensor.py Tue Aug 12 17:04:13 2008 @@ -1168,11 +1168,11 @@ Syz = geo_values[geo_params.index('Syz')] # Set the internal parameter values. - tensor.Sxx = Sxx - tensor.Syy = Syy - tensor.Sxy = Sxy - tensor.Sxz = Sxz - tensor.Syz = Syz + tensor.Axx = 2.0/3.0 * Sxx + tensor.Ayy = 2.0/3.0 * Syy + tensor.Axy = 2.0/3.0 * Sxy + tensor.Axz = 2.0/3.0 * Sxz + tensor.Ayz = 2.0/3.0 * Syz # The geometric parameter set {Szz, Sxxyy, Sxy, Sxz, Syz}. elif geo_params.count('Szz') == 1 and geo_params.count('Sxxyy') == 1 and geo_params.count('Sxy') == 1 and geo_params.count('Sxz') == 1 and geo_params.count('Syz') == 1: @@ -1184,11 +1184,11 @@ Syz = geo_values[geo_params.index('Syz')] # Set the internal parameter values. - tensor.Sxx = -0.5*(Szz-Sxxyy) - tensor.Syy = -0.5*(Szz+Sxxyy) - tensor.Sxy = Sxy - tensor.Sxz = Sxz - tensor.Syz = Syz + tensor.Axx = 2.0/3.0 * -0.5*(Szz-Sxxyy) + tensor.Ayy = 2.0/3.0 * -0.5*(Szz+Sxxyy) + tensor.Axy = 2.0/3.0 * Sxy + tensor.Axz = 2.0/3.0 * Sxz + tensor.Ayz = 2.0/3.0 * Syz # The geometric parameter set {Axx, Ayy, Axy, Axz, Ayz}. elif geo_params.count('Axx') == 1 and geo_params.count('Ayy') == 1 and geo_params.count('Axy') == 1 and geo_params.count('Axz') == 1 and geo_params.count('Ayz') == 1: @@ -1200,11 +1200,11 @@ Ayz = geo_values[geo_params.index('Ayz')] # Set the internal parameter values. - tensor.Sxx = 3.0/2.0 * Axx - tensor.Syy = 3.0/2.0 * Ayy - tensor.Sxy = 3.0/2.0 * Axy - tensor.Sxz = 3.0/2.0 * Axz - tensor.Syz = 3.0/2.0 * Ayz + tensor.Axx = Axx + tensor.Ayy = Ayy + tensor.Axy = Axy + tensor.Axz = Axz + tensor.Ayz = Ayz # The geometric parameter set {Azz, Axxyy, Axy, Axz, Ayz}. elif geo_params.count('Azz') == 1 and geo_params.count('Axxyy') == 1 and geo_params.count('Axy') == 1 and geo_params.count('Axz') == 1 and geo_params.count('Ayz') == 1: @@ -1216,11 +1216,11 @@ Ayz = geo_values[geo_params.index('Ayz')] # Set the internal parameter values. - tensor.Sxx = 3.0/2.0 * -0.5*(Azz-Axxyy) - tensor.Syy = 3.0/2.0 * -0.5*(Azz+Axxyy) - tensor.Sxy = 3.0/2.0 * Axy - tensor.Sxz = 3.0/2.0 * Axz - tensor.Syz = 3.0/2.0 * Ayz + tensor.Axx = -0.5*(Azz-Axxyy) + tensor.Ayy = -0.5*(Azz+Axxyy) + tensor.Axy = Axy + tensor.Axz = Axz + tensor.Ayz = Ayz # The geometric parameter set {Pxx, Pyy, Pxy, Pxz, Pyz}. elif geo_params.count('Pxx') == 1 and geo_params.count('Pyy') == 1 and geo_params.count('Pxy') == 1 and geo_params.count('Pxz') == 1 and geo_params.count('Pyz') == 1: @@ -1232,11 +1232,11 @@ Pyz = geo_values[geo_params.index('Pyz')] # Set the internal parameter values. - tensor.Sxx = 3.0/2.0 * (Pxx - 1.0/3.0) - tensor.Syy = 3.0/2.0 * (Pyy - 1.0/3.0) - tensor.Sxy = 3.0/2.0 * Pxy - tensor.Sxz = 3.0/2.0 * Pxz - tensor.Syz = 3.0/2.0 * Pyz + tensor.Axx = Pxx - 1.0/3.0 + tensor.Ayy = Pyy - 1.0/3.0 + tensor.Axy = Pxy + tensor.Axz = Pxz + tensor.Ayz = Pyz # The geometric parameter set {Pzz, Pxxyy, Pxy, Pxz, Pyz}. elif geo_params.count('Pzz') == 1 and geo_params.count('Pxxyy') == 1 and geo_params.count('Pxy') == 1 and geo_params.count('Pxz') == 1 and geo_params.count('Pyz') == 1: @@ -1248,11 +1248,11 @@ Pyz = geo_values[geo_params.index('Pyz')] # Set the internal parameter values. - tensor.Sxx = 3.0/2.0 * (-0.5*(Pzz-Pxxyy) - 1.0/3.0) - tensor.Syy = 3.0/2.0 * (-0.5*(Pzz+Pxxyy) - 1.0/3.0) - tensor.Sxy = 3.0/2.0 * Pxy - tensor.Sxz = 3.0/2.0 * Pxz - tensor.Syz = 3.0/2.0 * Pyz + tensor.Axx = -0.5*(Pzz-Pxxyy) - 1.0/3.0 + tensor.Ayy = -0.5*(Pzz+Pxxyy) - 1.0/3.0 + tensor.Axy = Pxy + tensor.Axz = Pxz + tensor.Ayz = Pyz # Unknown parameter combination. else: