Menu

Commit [r17021]  Maximize  Restore  History

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.

bugman 2012-06-22

changed /trunk/data/__init__.py
changed /trunk/data/mol_res_spin.py
changed /trunk/generic_fns/mol_res_spin.py
changed /trunk/generic_fns/sequence.py
changed /trunk/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py
changed /trunk/test_suite/unit_tests/molecule_testing_base.py
changed /trunk/test_suite/unit_tests/spin_testing_base.py
/trunk/data/__init__.py Diff Switch to side-by-side view
Loading...
/trunk/data/mol_res_spin.py Diff Switch to side-by-side view
Loading...
/trunk/generic_fns/mol_res_spin.py Diff Switch to side-by-side view
Loading...
/trunk/generic_fns/sequence.py Diff Switch to side-by-side view
Loading...
/trunk/test_suite/unit_tests/_generic_fns/test_mol_res_spin.py Diff Switch to side-by-side view
Loading...
/trunk/test_suite/unit_tests/molecule_testing_base.py Diff Switch to side-by-side view
Loading...
/trunk/test_suite/unit_tests/spin_testing_base.py Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.