On Fri, Feb 6, 2009 at 6:38 PM, Sébastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:
Hi, I was looking at the code for function 'vectors()' in both 'prompt/structure.py' and 'generic_fns/structure/main.py' and saw some possible problems... ============ 1. ============ The default arguments for 'prompt/structure.vectors()' are: attached='H' spin_id=None model=None verbosity=1 ave=True unit=True while, for 'generic_fns/structure/main.vectors()', they are: attached=None spin_id=None model=None verbosity=1 ave=True unit=True The attached argument has two different default values ? Is that normal ?
This is perfectly normal. The vectors() function in generic_fns.structure.main is supposed to be generic for calculating the vector between 2 atoms. The structure.vectors() user function is used more often in relax scripts for getting the XH bond vector where X is represented by the spin container and H is the attached atom. 'H' probably the most generic name for the attached proton, and this works nicely for protein NH work. Note this default value is used simply as a suggestion and if a user forgets to set this correctly, they will quickly find out with all the warning messages.
============ 2. ============ There seems to be an error in the docstring example for 'prompt/structure.vectors()' where the argument 'attached' is replaced by 'proton'... relax> structure.vectors(proton='H', spin_id='@N') ... relax> structure.vectors(proton='HN', spin_id='@N') ... relax> structure.vectors(proton='HA', spin_id='@CA') Should this be corrected ?
Yes! The 'attached_atom' argument used to be called 'proton' until I generalised the user function. So this is just a out of date docstring. Cheers, Edward