mailRe: CSA & bond length


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Gary S. Thompson on August 07, 2007 - 10:34:
Edward d'Auvergne wrote:

On 7/26/07, gary thompson <garyt.and.sarahb@xxxxxxxxx> wrote:
On 7/23/07, Sebastien Morin < sebastien.morin.1@xxxxxxxxx> wrote:

[snip]

This is part of the changes from the 1.2 to the 1.3 line.

The default CSA value we're talking about here is only the system's CSA
that is used in the test-suite and also in the program when someone doesn't
set a value. That said, the value used by someone can be input in the
scripts like it is the case in the sample scripts (e.g.   value.set(name,
-172 * 1e-6, 'csa')   ). So, a global default value as is planned in the 1.3
line should be used everywhere except in the sample scripts


most probably the default value should be used in the  sample scripts as
well... it will get the users into the good habit of using named constants

I would prefer that we have raw numbers in the script.  That will then
not discourage the user from changing the value if they wish.  If
instead of

value.set(name, -172 * 1e-6, 'csa')

we have

value.set(name, N15_CSA, 'csa')

in the script then the user is less likely to change the value
(whether this is good or bad is debatable).
However, the second is better practice: bugs with typos etc are much
less likley to creap in, what the number is is also alot clearer to the user
how about 15N_CSA_160PPM  etc

value.set(name, 15N_CSA_160PPM, 'csa')


The other point is that
with the obligatory statement

from physical_constants import N15_CSA

the modified scripts of the user will be less portable if we ever
change file names, constant locations, constant naming, etc.

this can be fixed using programmatic module imports which give
deprecation warings so again is not a problem and it is a small price to
pay for a clearer more maintainable code base. Magic numbers should
always be eliminated at all possible junctures ;-)


as an aside as we change things and put in the new csa we ought to still run
against the old tests with the old csa value etc to check that we haven't
changed things other than the csa...

This is the case in the 1.3 line for the
'opt_setup_S2_0_970_te_2048_Rex_0_149()' system test in
'test_suite/system_tests/model_free.py' where the value of -160 ppm is
used.  But this is a good point and I won't let these tests change -
only new ones created with the new value.

exactly this is right way to do things

Seb's change to the
spectral density mapping test is very, very minor - the values hardly
change - and not worth having another test for it.  However two tests
where the value is set to -172 and -160 ppm could be useful.

Regards,

Edward

.


regards
gary

--
-------------------------------------------------------------------
Dr Gary Thompson
Astbury Centre for Structural Molecular Biology,
University of Leeds, Astbury Building,
Leeds, LS2 9JT, West-Yorkshire, UK             Tel. +44-113-3433024
email: garyt@xxxxxxxxxxxxxxx                   Fax  +44-113-2331407
-------------------------------------------------------------------






Related Messages


Powered by MHonArc, Updated Tue Aug 07 11:20:29 2007