Hello,

It seems to work if I both define the name of the spin to 'N' with the
SEQ_ARGS[6] argument (that is including the spin name, here 'N', in the
sequence file) AND add the argument "spin_id='@N'" in the function
strcutre.vector(), part of the section "Diffusion models MII to MV" (see
last line of the following pasted text):



        # Diffusion models MII to MV.
        #############################

        elif DIFF_MODEL == 'sphere' or DIFF_MODEL == 'prolate' or
DIFF_MODEL == 'oblate' or DIFF_MODEL == 'ellipsoid':
            # Loop until convergence if CONV_LOOP is set, otherwise just
loop once.
            # This looping could be made much cleaner by removing the
dependence on the determine_rnd() function.
            while 1:
                # Determine which round of optimisation to do (init,
round_1, round_2, etc).
                self.round = self.determine_rnd(model=DIFF_MODEL)

                # Inital round of optimisation for diffusion models MII
to MV.
                if self.round == 0:
                    # Base directory to place files into.
                    self.base_dir = DIFF_MODEL + '/init/'

                    # Run name.
                    name = DIFF_MODEL

                    # Create the data pipe.
                    pipe.create(name, 'mf')

                    # Load the local tm diffusion model MI results.
                    results.read(file='results', dir='local_tm/aic')

                    # Remove the tm parameter.
                    model_free.remove_tm()

                    # Deselect the spins in the EXCLUDE list.
                    if EXCLUDE:
                        deselect.read(file=EXCLUDE)

                    # Load the PDB file and calculate the unit vectors
parallel to the XH bond.
                    if PDB_FILE:
                        structure.read_pdb(PDB_FILE)
                        structure.vectors(attached='H', spin_id='@N')


However, if the SEQ_ARGS[6] argument is set to None, and, thus, the
following code (you added today) takes care of the spin name:


            # Name the spins if necessary.
            if SEQ_ARGS[6] == None:
                spin.name(HET_NAME)


the following error message is thrown:


Traceback (most recent call last):
  File "./full_analysis-prolate.py", line 641, in <module>
    Main(self.relax)
  File "./full_analysis-prolate.py", line 264, in __init__
    self.multi_model()
  File "./full_analysis-prolate.py", line 600, in multi_model
    spin.name(HET_NAME)
  File "/usr/local/packages/relax-1.3/prompt/spin.py", line 269, in name
    raise RelaxStrError, ('new spin name', name)
RelaxStrError: RelaxError: The new spin name argument None must be a string.




Do you have any clue of what is happening ?

Thanks


Pierre-Yves
      




Pierre-Yves Savard wrote:
> Hi Edward,
>
> Thank you for your quick answer.
>
> I tried with the new script, defining the name of the spin to N with the
> SEQ_ARGS[6] argument, but I still encounter the following error messages
> (which I also get when SEQ_ARGS[6]=None):
>
>    
> relax> structure.vectors(attached='H', spin_id=None, model=None,
> verbosity=1, ave=True, unit=True)
> Extracting vectors from the single model.
> Calculating the unit vectors.
> The attached atom is a proton.
>
> Traceback (most recent call last):
>   File "/usr/local/packages/relax-1.3/relax", line 418, in <module>
>     Relax()
>   File "/usr/local/packages/relax-1.3/relax", line 127, in __init__
>     self.interpreter.run(self.script_file)
>   File "/usr/local/packages/relax-1.3/prompt/interpreter.py", line 273,
> in run
>     return run_script(intro=self.__intro_string, local=self.local,
> script_file=script_file, quit=self.__quit_flag,
> show_script=self.__show_script, raise_relax_error=self.__raise_relax_error)
>   File "/usr/local/packages/relax-1.3/prompt/interpreter.py", line 534,
> in run_script
>     return console.interact(intro, local, script_file, quit,
> show_script=show_script, raise_relax_error=raise_relax_error)
>   File "/usr/local/packages/relax-1.3/prompt/interpreter.py", line 430,
> in interact_script
>     execfile(script_file, local)
>   File "full_analysis-sphere.py", line 641, in <module>
>     Main(self.relax)
>   File "full_analysis-sphere.py", line 230, in __init__
>     structure.vectors(attached='H')
>   File "/usr/local/packages/relax-1.3/prompt/structure.py", line 586, in
> vectors
>     generic_fns.structure.main.vectors(attached=attached,
> spin_id=spin_id, model=model, verbosity=verbosity, ave=ave, unit=unit)
>   File "/usr/local/packages/relax-1.3/generic_fns/structure/main.py",
> line 353, in vectors
>     warn(RelaxWarning("Either the spin number or name must be set for
> the spin " + `id` + " to identify the corresponding atom in the molecule."))
> RelaxWarning: Either the spin number or name must be set for the spin
> ':15' to identify the corresponding atom in the molecule.
>
> I checked the pdb and names are fine:
>
> ...
> ATOM     31  N   ASN     6     -21.732   2.728 -13.120  1.00 25.52
> ATOM     32  H   ASN     6     -11.923   7.967 -12.183  1.00  0.00
> ...
>
>
> Thank you,
>
>
> Pierre-Yves
>
>
>
>
>
>
> Edward d'Auvergne wrote:
>   
>> Hi,
>>
>> The addition of spin_id='@N' should not be necessary if the sequence
>> data you have loaded using this script has the atom/spin name set to
>> 'N'.  If not, I have modified the full_analysis.py script in the
>> repository 1.3 line to name your spins in that way.  The problem is
>> that the spins are unnamed so they cannot be matched to anything in
>> the PDB file.  Hence the NH bond vectors are not extracted for any
>> spins.  Then when it comes to optimisation, all the spins without bond
>> vector information are deselected.  But as this is all spins, then
>> there are essentially no model-free models to optimise and there is
>> only the diffusion tensor.  But this is fixed by the fix() function,
>> the one you can't fix and can't be fixed.  So as the only parameters
>> remaining are those of the diffusion tensor, and these are fixed,
>> relax cannot do anything.  There should be warning messages describing
>> this problem much further up in the script.  I would guess thought
>> that they have been suppressed by your addition in point one, as there
>> are no spins with a spin id of '@N' and hence no NH bond vectors will
>> be loaded.
>>
>> Regards,
>>
>> Edward
>>
>>
>> On Tue, Feb 10, 2009 at 5:00 PM, Pierre-Yves Savard
>> <[email protected]> wrote:
>>   
>>     
>>> Hi,
>>>
>>> I am starting a new relax analysis with the full_analysis.py script,
>>> together with relax 1.3 revision 8769. I performed the first step,
>>> 'local_tm', with success.
>>>
>>> However, for what concerns diffusion models 'sphere', 'prolate', 'oblate
>>> and 'ellipsoid', I encountered the following errors:
>>>
>>>    1. I had to add: "spin_id='@N'" in the function structure.vector()
>>> in order to read the pdb and extract vectors properly:
>>>
>>>
>>>       # Load the PDB file and calculate the unit vectors parallel to
>>> the XH bond.
>>>            if not local_tm and PDB_FILE:
>>>                structure.read_pdb(PDB_FILE)
>>>                structure.vectors(attached='H', spin_id='@N')
>>>
>>>       ...
>>>
>>>       # Load the PDB file and calculate the unit vectors parallel to
>>> the XH bond.
>>>                    if PDB_FILE:
>>>                        structure.read_pdb(PDB_FILE)
>>>                        structure.vectors(attached='H', spin_id='@N')
>>>
>>>
>>>    2. Then, I encountered the following error message (using the debug
>>> option -d) when trying to optimise models 'prolate', 'oblate' and
>>> 'ellipsoid':
>>>
>>>          Traceback (most recent call last):
>>>  File "full_analysis_prolate.py", line 640, in <module>
>>>    Main(self.relax)
>>>  File "full_analysis_prolate.py", line 267, in __init__
>>>    self.multi_model()
>>>  File "full_analysis_prolate.py", line 631, in multi_model
>>>    grid_search(inc=GRID_INC)
>>>  File "/usr/local/packages/relax-1.3/prompt/minimisation.py", line 156,
>>> in grid_search
>>>    minimise.grid_search(lower=lower, upper=upper, inc=inc,
>>> constraints=constraints, verbosity=verbosity)
>>>  File "/usr/local/packages/relax-1.3/generic_fns/minimise.py", line
>>> 185, in grid_search
>>>    grid_search(lower=lower, upper=upper, inc=inc,
>>> constraints=constraints, verbosity=verbosity)
>>>  File
>>> "/usr/local/packages/relax-1.3/specific_fns/model_free/mf_minimise.py",
>>> line 479, in grid_search
>>>    self.minimise(min_algor='grid', lower=lower, upper=upper, inc=inc,
>>> constraints=constraints, verbosity=verbosity, sim_index=sim_index)
>>>  File
>>> "/usr/local/packages/relax-1.3/specific_fns/model_free/mf_minimise.py",
>>> line 788, in minimise
>>>    model_type = self.determine_model_type()
>>>  File "/usr/local/packages/relax-1.3/specific_fns/model_free/main.py",
>>> line 1026, in determine_model_type
>>>    raise RelaxError, "All parameters are fixed."
>>> RelaxError: RelaxError: All parameters are fixed.
>>>
>>>
>>> There seems to be a problem with the fix() function, although I was not
>>> able to fix (!) it...
>>>
>>> Thank you very much for your help,
>>>
>>>
>>> Pierre-Yves
>>>
>>> _______________________________________________
>>> relax (http://nmr-relax.com)
>>>
>>> This is the relax-users 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-users
>>>
>>>     
>>>       
>>   
>>     
>
> _______________________________________________
> relax (http://nmr-relax.com)
>
> This is the relax-users 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-users
>
>   

_______________________________________________
relax (http://nmr-relax.com)

This is the relax-users 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-users

Reply via email to