Now that I've finished writing the code in the 'tensor_pdb' branch, I'll soon merge it back into the 1.3 line. Chris, the work on the scaling of the diffusion rates to be proportional to mass in the tensor PDB file can continue within the 1.3 line. Anyway, if you make any changes to the 'tensor_pdb' branch after the merge, don't worry, it's easy enough to port those changes back into the 1.3 line.
Oh, do you think it should be inversely proportional so that the bigger the molecule, the bigger the tensor? In a hybrid model created using run.hybridise(), do you think we should scale the multiple diffusion tensors equally? One way would be to loop over every last atom in the PDB and get the mass of the entire lot (rather than just the selected residues).
In any case, the diffusion rate per Angstrom should be made abundantly clear to the user so that they then hopefully report the rate per Angstrom in their figure legend. I personally feel that this is essential, despite the fact Tensor hides this info. It's not uncommon in the literature for the diffusion tensor parameters to not be reported. Comparisons are very important, especially if working on a homologous system, attempting to replicate published results, or reanalysing data.
An ideal way of doing this could be as follows. Add an atom to the positive pole of the vector distribution, probably about 5-10 Angstroms out from the pole. Give it a unique atom name for selection and add it to a new residue named something like RT for the diffusion rate. The HETNAM record could then contain the string "Diffusion rate per Angstrom: " + `1.0 / scale` in the chemical name field. Finally the 'pymol.tensor_pdb()' function displays the chemical name for that residue. This way, the significance of the magnitude of the tensor is unavoidable. The labelling can always be turned off in PyMOL, but this way the user is confronted with this useful info.
Cheers,
Edward
P.S. Once merged, I'll rename the 'pdb' user function class to 'structure'.