Hi, Please see my comments below. It's a pity that the code was developed using the 1.2 line code as there will need to be a migration to the 1.3 line. Note that the branch I created (https://mail.gna.org/public/relax-commits/2008-12/msg00146.html) is based on the 1.3 line. This is because the 1.2 line is stable, i.e. only bug fixes are allowed, and that code is now more than 2 years old (the 1.2 line started on 2006-01-14 and the 1.3 line on 2006-07-06). On Fri, Dec 12, 2008 at 2:46 PM, Pavel Kaderavek <kada@xxxxxxxxxxxxx> wrote:
Hi, we have embodied into the Relax program possibility to perform the analysis with consideration of the asymmetric character of the CST and also all dipole-dipole interactions arising from the spins in the proximity to the studied S-I spin pair. This should be taken into the account for the dynamic studies of the fully labeled nucleic acid (Poster 118 at 23rd ICMBRS meeting in San Diego) and we would like to add this feature to the public version of the Relax program.
As long as the relax conventions are followed, as described in the development part of the manual, the code does not break the other parts of relax, and there are no copyright issues, then any code for dynamics will be considered for relax. This is an open source project, so you are most welcome to contribute. Note the code quality and design are quite important and many people will see and review your contributions.
These changes can be done by the addition of new terms into the equations for the relaxation rates. The description of the relaxation due to the fully anisotropic CST can be written in concordance with the article by Goldman M, J magn. Reson 60, 437-452 (1984). The CST tensor is splitted into two axially symmetric subtensors which both contribute to the relaxation. Such approach has advantage that the spectral density function do not change the form used in Relax program. The calculation is done in the same manner using only different input orientation. The function for chi^2 calculation and minimalization procedure is not affected.
This sounds quite promising for easy integration into relax.
Definition additional input information: The orientation of the CS tensor is defined in the new input file containing for each studied nucleus three Euler angles in separate columns defining the orientation of the CS tensor with respect to the PDB frame (these values are then stored in the variable called CSEA). Separate file contains three columns with the eigenvalues of the chemical shielding tensor (these values are then stored in the variable called CST).
For this part, we need to design a new user function. We'll see how you have this designed, but the best would be to have the user function called something like cs_tensor.read() to read values from a file. As there are 3 geometric parameters (tensor eigenvalues) and 3 orientational parameters (Euler angles), I would recommend the following. There should be 2 keyword arguments for this function - 'param' and 'value_col'. Then to read from 2 separate files, you could have something like param=['alpha', 'beta', 'gamma'], value_col=[2, 3, 4]. Therefore this gives one user function which handles both files, or one file with everything, or 6 separate files. Importantly this gives the user flexibility. An additional function such as cs_tensor.set() would allow greater flexibility in scripting for the user.
The choice of atom responsible for the significant dipole-dipole interaction with the studied nuclei is done in the PDB file. Atoms, which are to be considered in the calculations, should be marked in the PDB file by adding the distance to the studied nuclei (in the 1e-10m unit) after the z coordinate. Other atoms should have zero distance instead. So far only atoms from the same residuum may be taken into the account.
We'll again have to see how you have this one implemented. A function could possibly be written to find all atoms within a sphere of fixed size. The 1.3 line is far better for handling structural data now.
Suggested changes in the code: generic_fns/nuclei.py added function for setting gyromagnetic ratios for selected atoms Y (atoms dipole-dipole interaction should be considered in the calculation) and ratio of gyromagnetic ratios of atoms Y and X (nucleus which relaxation is studied)
This function no longer exists and the gyromagnetic ratios are automatically determined in the 1.3 line.
generic_fns/pdb.py added function for calculating XY unit vector from the structure
This is now a series of modules located in generic_fns/structure/. This function already exists, although it may need to be modified for your purposes.
generic_fns/runs.py added 'mf_csa' model name
The 'run' concept no longer exists, it has been replaced by the data pipe. See the thread starting at https://mail.gna.org/public/relax-devel/2006-10/msg00053.html (Message-id: <1160550133.9523.54.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>). This post lead to the creation of the 1.3 line.
prompt/interpreter and other files in prompt directory added code for accessing Csa_data and Model_free_csa functions
The design in here has also changed. Actually, there are not many lines which match between the 1.2 and 1.3 lines anymore.
prompt/model_free_csa.py added csa extended model_free code (according to model_free.py)
We'll see how this develops, but I would suggest making this independent of model-free analysis. Then it could be used in SRLS theory, or any other analysis that can benefit from an ellipsoidal CS tensor. It might be possible to make this automatic so the user does nothing.
prompt/csa_data.py Class for manipulating CST and CSEA csa data.
I would suggest the name cs_tensor. relax already has the user function classes diffusion_tensor and align_tensor. Hence the name cs_tensor fits better into relax.
specific_fns/model_free_csa.py added csa extended model_free code (according to model_free.py)
This could go into the model-free specific code rather than being a separate module.
specific_fns/csa_data.py Class for manipulating CST and CSEA csa data.
This is not analysis specific, it can be used by numerous theories, and therefore would be better placed in generic_fns/cs_tensor.py
Instead of the only jw_mf.py file in the original version of the Relax program we added files: jw_mf_csa1.py (calculate the spectral density function for the first CS subtensor) jw_mf_csa2.py (calculate the spectral density function for the second CS subtensor) jw_mf_csacross.py (calculate the cross correlation spectral density function between both CS subtensors) jw_mf_dipY.py (calculate the vector of the spectral density functions for the dipole-dipole interactions to all nuclei Y, i.e. each component of vector correspond to the individual dipole-dipole interaction) direction_cosine_csa.py (calculate direction cosines of the principal axis of the two CS pseudo tensors and first and second derivations of the directions cosines with respect to the angles defining the orientation of the diffusion tensor) direction_cosine_dipY.py (calculate direction cosines of the principal axis of the dipole-dipole interactions to atoms Y and first and second derivations of the directions cosines with respect to the angles defining the orientation of the diffusion tensor, data are store as a vector, in which each component correspond to the individual dipole-dipole interaction) weights_csa1.py (calculate the coefficient necessary to calculate the spectral density function for the first CS subtensor) weights_csa2.py (calculate the coefficient necessary to calculate the spectral density function for the second CS subtensor) weights_csaC.py (calculate the coefficient necessary to calculate the cross correlation spectral density function of the first and second CS subtensor ... the form of the equation is slightly different to previous) weights_dipY.py (calculate the coefficient necessary to calculate the spectral density function for the first CS subtensor)
These shouldn't be a problem as they don't affect the rest of relax.
mf_csa.py (analogy of mf.py, redirect the calculation according to the setup and initialize all necessary parameter)
Depending on how complicated this is, I would prefer the code go into mf.py. This is still the Lipari and Szabo model-free analysis.
ri_comps_csa_dipY.py (analogy to ri_comps.py, prepare the linear combination of the spectral density functions and the constants corresponding to the each type of the relaxation mechanism i.e. instead of only data.dip_jw_comps_func[i] ("i" goes over residues) data.csa_jw_comps_func[i] ("i" goes over residues) is necessary to introduce: data.dip_jw_comps_func[i] ("i" goes over residues) data.dipY_jw_comps_func[j][i] ("i" goes over residues, "j" over atoms Y interacting with atom X) data.csa1_jw_comps_func[i] ("i" goes over residues) data.csa2_jw_comps_func[i] ("i" goes over residues) data.csaC_jw_comps_func[i] ("i" goes over residues) and similarly for constants: data.dip_const_func by function comp_dip_const_func data.dipY_const_func[i] by function comp_dipY_const_func ("j" over atoms Y interacting with atom X) data.csa1_const_func[i] by function comp_csa1_const_func ("i" goes over spectrometer frequencies) data.csa2_const_func[i] by function comp_csa2_const_func ("i" goes over spectrometer frequencies) data.csaC_const_func[i] by function comp_csaC_const_func ("i" goes over spectrometer frequencies) similarly for gradients and Hessian. So far the fitting the distance to the selected neighbouring nuclei and the fitting of parameters of CS tensor is not included.
This can all go into mf.py with careful design.
ri_prime_csa_dipY.py (analogy of ri_prime.py, but relaxation rates, gradients and Hessians comprises all terms calculated by mf_csa.py ) ri_csa_dipY.py (analogy to ri.py, but again the number of variables is enlarged by those introduced previously) All comments or suggestions are welcomed. Pavel Kaderavek, Petr Novak
I hope we can get your code into relax without too much pain and then make it extremely easy for the end user to use the ellipsoidal CS tensor and neighbouring dipoles for studying the dynamics of RNA and other systems. This will take work to migrate to the 1.3 line though. Cheers, Edward