I asked ChatGPT to write some python code to calculate the normalized contrast angle of the square root of two vectors:
https://chatgpt.com/share/67c7db02-3014-800a-971e-c17f955c827d
My knowledge of python is not very good so I can't be sure it's correct.
I am not sure I understand why you are specifically saying "rdotp".
There are several dot products in Skyline:
1. Library dot product ("dotp"): measure of the similarity between the chromatogram peak areas of MS2 transitions and the intensities from a library spectrum
2. Isotope dot product ("idotp"): measure of the similarity between chromatogram peak areas of MS1 transitions and the predicted distribution based on isotope abundances
3. Ratio dot product ("rdotp"): when calculating the ratio of the light molecule to the heavy molecule, a measure of whether the ratios of the individual transition peak areas are the same as the ratio of the sum of all of the transitions
Let me know if you have any questions about the ratio dot product.
-- Nick