Hi everybody,
I have been trying to insert the TLS matrices for molecular motion in my refinement with no success.
I wrote a macro taking the equations that I found in the TLSview manual:
http://pymmlib.sourceforge.net/tlsview/tlsview.html
Here are the lines I wrote in my local.inc:
macro TLS_adps(T11, vT11, T12, vT12, T13, vT13, T22, vT22, T23, vT23, T33, vT33, L11, vL11, L12, vL12, L13, vL13, L22, vL22, L23, vL23, L33, vL33, S11, vS11, S12, vS12, S13, vS13, S21, vS21, S22, vS22, S23, vS23, S31, vS31, S32, vS32, S33, vS33)
{
#m_argu T11
#m_argu T12
#m_argu T13
#m_argu T22
#m_argu T23
#m_argu T33
#m_argu L11
#m_argu L12
#m_argu L13
#m_argu L22
#m_argu L23
#m_argu L33
#m_argu S11
#m_argu S12
#m_argu S13
#m_argu S21
#m_argu S22
#m_argu S23
#m_argu S31
#m_argu S32
#m_argu S33
u11 = CeV(L22, vL22) * uz ^ 2 + CeV(L33, vL33) * uy ^ 2 - 2 * CeV(L23, vL23) * uy * uz + 2 * CeV(S21, vS21) * uz - 2 * CeV(S31, vS31) * uy + CeV(T11, vT11);
u22 = CeV(L11, vL11) * uz ^ 2 + CeV(L33, vL33) * ux ^ 2 - 2 * CeV(L13, vL13) * ux * uz - 2 * CeV(S12, vS12) * uz + 2 * CeV(S31, vS32) * ux + CeV(T22, vT22);
u33 = CeV(L11, vL11) * uy ^ 2 + CeV(L22, vL22) * ux ^ 2 - 2 * CeV(L12, vL12) * ux * uy - 2 * CeV(S23, vS23) * ux + 2 * CeV(S13, vS13) * uy + CeV(T33, vT33);
u12 = - CeV(L33, vL33) * ux * uy + CeV(L23, vL23) * uy * ux * uz - CeV(L13, vL13) * uy * uz - CeV(L12, vL12) * uz ^ 2 - CeV(S11, vS11) * uz + CeV(S22, vS22) * uz + CeV(S31, vS31) * ux - CeV(S32, vS32) * uy + CeV(T12, vT12);
u13 = - CeV(L22, vL22) * ux * uz + CeV(L23, vL23) * uy * ux - CeV(L13, vL13) * uy ^ 2 + CeV(L12, vL12) * uy * uz + CeV(S11, vS11) * uy - CeV(S33, vS33) * uy + CeV(S23, vS23) * uz - CeV(S21, vS21) * ux + CeV(T13, vT13);
u23 = - CeV(L11, vL11) * uy * uz - CeV(L23, vL23) * ux ^ 2 + CeV(L13, vL13) * ux * uy + CeV(L12, vL12) * ux * uz - CeV(S22, vS22) * ux + CeV(S33, vS33) * ux + CeV(S12, vS12) * uy - CeV(S13, vS13) * uz + CeV(T23, vT23);
}
Consider that I am describing my rigid body using point_for_site with Cartesian coordinates.
This is the line I added in my input file:
TLS_adps(T11, 1, T12, 0, T13, 0, T22, 1, T23, , T33, 1, L11, 10, L12, 0, L13, 0, L22, 10, L23, 0, L33, 10, S11, 0, S12, 0, S13, 0, S21, 0, S22, 0, S23, 0, S31, 0, S32, 0, S33, 0)
If I run Topas with this line AFTER the atom list I get an abnormal program termination and Topas says “Uninitialized_Variable in equation: L22”.
If I run Topas with this line BEFORE the atom list, Topas performs the refinement but does not use my macro at all. I tried to activate the adps before inserting the macro, but it did not help.
Can anybody help me?
Ciao!
Giulio