Author: bugman Date: Fri Jun 22 13:41:40 2012 New Revision: 17021 URL: http://svn.gna.org/viewcvs/relax?rev=17021&view=rev Log: Creation of a fast molecule, residue and spin data lookup framework using private metadata. This consists of two elements: The already existing private lookup table now at cdp.mol._spin_id_lookup which is a dictionary with spin IDs as keys and a list of molecule, residue and spin indices as values; and a set of private variables within the molecule, residue and spin containers which identify the parent container names, numbers and indices. As all data is private, it will not be visible to the user or be saved in the XML results and save files and should be considered volatile. All this private metadata is kept up to date via the two new generic_fns.mol_res_spin functions metadata_prune() and metadata_update(). For fast operation, these methods can update specific container subsets via the mol_index, res_index and spin_index arguments. All parts of relax which modify the data pipe's molecule, residue and spin data structure (the generic_fns.mol_res_spin functions and test suite) call these two functions as needed. Two auxiliary functions spin_id_variants() and spin_id_variants_elim() have been added to create all possible matching spin ID strings for a given spin (the second created IDs strings which should no longer exist). The speed ups from this change are significant. On one system, the system and unit tests decrease from 492.8s/26.4s to 434.3s/25.1s. On another the decrease is from 330.7s/17.4s to 258.9s/15.4s. In addition, the pipe argument has been added to the generic_fns.mol_res_spin functions create_molecule(), create_residue(), create_pseudo_spin() and create_spin(). Also, the molecule name will now always be a string! Previously this was allowed to be an integer. This is needed for the private metadata functions to operate correctly. A number of unit tests have been updated for the changes. Modified: trunk/data/__init__.py trunk/data/mol_res_spin.py trunk/generic_fns/mol_res_spin.py trunk/generic_fns/sequence.py trunk/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py trunk/test_suite/unit_tests/molecule_testing_base.py trunk/test_suite/unit_tests/spin_testing_base.py [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/data/__init__.py URL: http://svn.gna.org/viewcvs/relax/trunk/data/__init__.py?rev=17021&r1=17020&r2=17021&view=diff Modified: trunk/data/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/trunk/data/mol_res_spin.py?rev=17021&r1=17020&r2=17021&view=diff Modified: trunk/generic_fns/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/mol_res_spin.py?rev=17021&r1=17020&r2=17021&view=diff Modified: trunk/generic_fns/sequence.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/sequence.py?rev=17021&r1=17020&r2=17021&view=diff Modified: trunk/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py?rev=17021&r1=17020&r2=17021&view=diff Modified: trunk/test_suite/unit_tests/molecule_testing_base.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/molecule_testing_base.py?rev=17021&r1=17020&r2=17021&view=diff Modified: trunk/test_suite/unit_tests/spin_testing_base.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/spin_testing_base.py?rev=17021&r1=17020&r2=17021&view=diff