Hi, I don't know if I've fully explained the implications of the redesign for how the gyromagnetic ratios should now be handled in the 1.3 line, but things are now quite different. Please see below for more.
On Fri, 2008-04-11 at 14:46 +0000, [EMAIL PROTECTED] wrote: > Author: semor > Date: Fri Apr 11 16:46:39 2008 > New Revision: 5587 > > URL: http://svn.gna.org/viewcvs/relax?rev=5587&view=rev > Log: > Aliased the current data pipe and removed the run arguments. > > > Modified: > 1.3/generic_fns/palmer.py > > Modified: 1.3/generic_fns/palmer.py > URL: > http://svn.gna.org/viewcvs/relax/1.3/generic_fns/palmer.py?rev=5587&r1=5586&r2=5587&view=diff > ============================================================================== > --- 1.3/generic_fns/palmer.py (original) > +++ 1.3/generic_fns/palmer.py Fri Apr 11 16:46:39 2008 > @@ -34,6 +34,7 @@ > > # relax module imports. > from data import Data as relax_data_store > +from generic_fns.selection import exists_mol_res_spin_data, spin_loop > from relax_errors import RelaxDirError, RelaxFileError, > RelaxFileOverwriteError, RelaxNoPdbError, RelaxNoPipeError, > RelaxNoSequenceError, RelaxNucleusError, RelaxProgFailError > > > @@ -48,7 +49,7 @@ > self.relax = relax > > > - def create(self, run, dir, force, binary, diff_search, sims, sim_type, > trim, steps, constraints, nucleus, atom1, atom2): > + def create(self, dir, force, binary, diff_search, sims, sim_type, trim, > steps, constraints, nucleus, atom1, atom2, spin_id=None): > """Function for creating the Modelfree4 input files. > > The following files are created: > @@ -59,29 +60,24 @@ > dir/run.sh > """ > > - # Test if the run exists. > - if not run in relax_data_store.run_names: > - raise RelaxNoPipeError, run > + # Alias the current data pipe. > + cdp = relax_data_store[relax_data_store.current_pipe] > > # Test if sequence data is loaded. > - if not relax_data_store.res.has_key(run): > - raise RelaxNoSequenceError, run > + if not exists_mol_res_spin_data(): > + raise RelaxNoSequenceError > > # Test if the PDB file is loaded (for the spheroid and ellipsoid). > - if not relax_data_store.diff[run].type == 'sphere' and not > relax_data_store.pdb.has_key(run): > - raise RelaxNoPdbError, run > - > - # Test if the nucleus type has been set. > - if not hasattr(relax_data_store, 'gx'): > - raise RelaxNucleusError Previously the gyromagnetic ratio was stored in the very base of the relax data store, at 'relax_data_store.gx'. This has the obvious implication that only one type of spin can be analysed at once. Now the relax data store can handle multiple types of spin simultaneously. So the information has shifted from: relax_data_store.gx relax_data_store.gh to: cdp.mol[i].res[j].spin[k].heteronuc_type cdp.mol[i].res[j].spin[k].proton_type Previously the gyromagnetic ratio was set by the user function nuclei() whereas now value.set() is used. Also note that the old structures were floats (the gyromagnetic ratio) whereas the new structures are strings (the name of the spin, e.g. '15N'). So, this will affect a number of places in relax where the gyromagnetic ratio is used. Because only the spin name is stored in the SpinContainer, the physical_constants.return_gyromagnetic_ratio() function needs to be used to get the desired number. You can see an example of this in specific_fns/model_free/mf_minimise.py at line 1154 (r5603). Therefore the last test here that was deleted ('# Test if the nucleus type has been set') needs to be shifted into the spin_loop and each spin tested instead. Both heteronuc_type and proton_type needs to be checked, because if these are not set then the frequencies of the spectral densities cannot be determined. Regards, Edward _______________________________________________ relax (http://nmr-relax.com) This is the relax-devel mailing list [email protected] To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-devel

