Author: bugman Date: Thu Oct 29 14:52:14 2009 New Revision: 9846 URL: http://svn.gna.org/viewcvs/relax?rev=9846&view=rev Log: Fixes for the method saveframe. This should now work correctly. Modified: branches/bmrb/bmrblib/experimental_details/method.py Modified: branches/bmrb/bmrblib/experimental_details/method.py URL: http://svn.gna.org/viewcvs/relax/branches/bmrb/bmrblib/experimental_details/method.py?rev=9846&r1=9845&r2=9846&view=diff ============================================================================== --- branches/bmrb/bmrblib/experimental_details/method.py (original) +++ branches/bmrb/bmrblib/experimental_details/method.py Thu Oct 29 14:52:14 2009 @@ -74,13 +74,24 @@ # Check that nothing is missing. no_missing(name, 'method name') + no_missing(file_name, 'file name') + no_missing(file_text, 'file text') # Check. if not isinstance(cite_ids, list): raise NameError, "The cite_ids argument '%s' should be a list." % cite_ids # Place the args into the namespace. + self.method_name = name + self.details = translate(details) self.cite_ids = translate(cite_ids) + self.file_name = translate(file_name) + self.file_text = translate(file_text) + self.param_file_name = translate(param_file_name) + self.param_file_text = translate(param_file_text) + + # The text format. + self.text_format = '?' # Increment the ID number. self.method_num = self.method_num + 1 @@ -152,6 +163,10 @@ def create(self): """Create the Method tag category.""" + # Skip this tag category if no citations are present. + if not self.sf.cite_ids: + return + # Keys and objects. info = [ ['CitationID', 'cite_ids'], @@ -195,7 +210,8 @@ # Keys and objects. info = [ ['Name', 'file_name'], - ['Text', 'text'], + ['TextFormat', 'text_format'], + ['Text', 'file_text'], ['MethodID', 'method_id_num'] ] @@ -219,9 +235,10 @@ TagCategory.tag_setup(self, tag_category_label='Method_file', sep=sep) # Tag names for the relaxation data. - self.tag_names['Name'] = 'Name' - self.tag_names['Text'] = 'Text' - self.tag_names['MethodID'] = 'Method_ID' + self.tag_names['Name'] = 'Name' + self.tag_names['TextFormat'] = 'Text_format' + self.tag_names['Text'] = 'Text' + self.tag_names['MethodID'] = 'Method_ID' class MethodParam(TagCategory):