Hi, This is probably correct. The str_id argument can be deleted as it is unused. Actually, it is not used anywhere within relax, for example if I look for it: [edward@localhost xyz]$ grep str_id *.py */*.py */*/*.py generic_fns/structure/api_base.py: def atom_loop(self, atom_id=None, str_id=None, model_num_flag=False, mol_name_flag=False, res_num_flag=False, res_name_flag=False, atom_num_flag=False, atom_name_flag=False, element_flag=False, pos_flag=False, ave=False): generic_fns/structure/api_base.py: @keyword str_id: The structure identifier. This can be the file name, model generic_fns/structure/api_base.py: @type str_id: str, int, or None generic_fns/structure/internal.py: def atom_loop(self, atom_id=None, str_id=None, model_num_flag=False, mol_name_flag=False, res_num_flag=False, res_name_flag=False, atom_num_flag=False, atom_name_flag=False, element_flag=False, pos_flag=False, ave=False): generic_fns/structure/internal.py: @keyword str_id: The structure identifier. This can be the file name, model generic_fns/structure/internal.py: @type str_id: str, int, or None generic_fns/structure/main.py:def get_pos(spin_id=None, str_id=None, ave_pos=False): generic_fns/structure/main.py: @keyword str_id: The structure identifier. This can be the file name, model number, generic_fns/structure/main.py: @type str_id: int or str generic_fns/structure/main.py: for model_num, mol_name, res_num, res_name, atom_num, atom_name, element, pos in cdp.structure.atom_loop(atom_id=spin_id, str_id=str_id, model_num_flag=True, mol_name_flag=True, res_num_flag=True, res_name_flag=True, atom_num_flag=True, atom_name_flag=True, element_flag=True, pos_flag=True, ave=ave_pos): generic_fns/structure/main.py:def load_spins(spin_id=None, str_id=None, combine_models=True, ave_pos=False): generic_fns/structure/main.py: @keyword str_id: The structure identifier. This can be the file name, model number, generic_fns/structure/main.py: @type str_id: int or str generic_fns/structure/main.py: for model_num, mol_name, res_num, res_name, atom_num, atom_name, element, pos in cdp.structure.atom_loop(atom_id=spin_id, str_id=str_id, model_num_flag=True, mol_name_flag=True, res_num_flag=True, res_name_flag=True, atom_num_flag=True, atom_name_flag=True, element_flag=True, pos_flag=True, ave=ave_pos): generic_fns/structure/scientific.py: def atom_loop(self, atom_id=None, str_id=None, model_num_flag=False, mol_name_flag=False, res_num_flag=False, res_name_flag=False, atom_num_flag=False, atom_name_flag=False, element_flag=False, pos_flag=False, ave=False): generic_fns/structure/scientific.py: @keyword str_id: The structure identifier. This can be the file name, model generic_fns/structure/scientific.py: @type str_id: str, int, or None [edward@localhost xyz]$ As you can see, it is only used as a function argument and does not actually do anything. This is probably one example of many of ancient unused code which is still present but not hurting relax. Then again it could be an idea for a future feature that I haven't implemented yet (but I can't remember if that is the case). Anyway, it can be deleted throughout relax without problem. Note that with it still present, relax will function. You can pass anything as the str_id arg, and it will do nothing. So it is safe to ignore as well, the number of args do not need to match if those arguments are keyword arguments! Cheers, Edward On 21 June 2011 12:23, Han Sun <hasu@xxxxxxxxxxxxxxxxx> wrote:
Hi Edward, I have a question concerning about loading the spins in the xyz file. In the prompt/structure.py there is a function load_spins. At the end of this function it calls another function load_spins in the generic_fns/structure/main.py. But in the first function it gives three values: spin_id, combine_models and ave_pos and in the second function it requests four values, which are spin_id, str_id, combine_models and ave_pos. In my opinion the number of values should be matched. Do I misunderstand something? Best, Han