Author: bugman Date: Sun Oct 1 10:20:53 2006 New Revision: 2598 URL: http://svn.gna.org/viewcvs/relax?rev=2598&view=rev Log: Completion of task #3630 (https://gna.org/task/?3630). The unmodified Hessian and turning the line search off are no longer both specified by the string 'None'. Now they are specified by the regular expressions '^[Nn]o [Ll]ine [Ss]earch$' and '^[Nn]o [Hh]essian [Mm]od' respecively. Modified: 1.3/minimise/base_classes.py 1.3/minimise/generic.py Modified: 1.3/minimise/base_classes.py URL: http://svn.gna.org/viewcvs/relax/1.3/minimise/base_classes.py?rev=2598&r1=2597&r2=2598&view=diff ============================================================================== --- 1.3/minimise/base_classes.py (original) +++ 1.3/minimise/base_classes.py Sun Oct 1 10:20:53 2006 @@ -430,7 +430,7 @@ if self.print_flag: print self.print_prefix + "Line search: More and Thuente line search." self.line_search = self.mt - elif match('^[Nn]one$', self.line_search_algor): + elif match('^[Nn]o [Ll]ine [Ss]earch$', self.line_search_algor): if self.print_flag: print self.print_prefix + "Line search: No line search." self.line_search = self.no_search @@ -441,7 +441,7 @@ if type == None: return 0 - elif match('^[Bb]ack', type) or match('^[Nn]ocedal[ _][Ww]right[ _][Ii]nt', type) or match('^[Nn][Ww][Ii]', type) or match('^[Nn]ocedal[ _][Ww]right[ _][Ww]olfe', type) or match('^[Nn][Ww][Ww]', type) or match('^[Mm]ore[ _][Tt]huente$', type) or match('^[Mm][Tt]', type) or match('^[Nn]one$', type): + elif match('^[Bb]ack', type) or match('^[Nn]ocedal[ _][Ww]right[ _][Ii]nt', type) or match('^[Nn][Ww][Ii]', type) or match('^[Nn]ocedal[ _][Ww]right[ _][Ww]olfe', type) or match('^[Nn][Ww][Ww]', type) or match('^[Mm]ore[ _][Tt]huente$', type) or match('^[Mm][Tt]', type) or match('^[Nn]o [Ll]ine [Ss]earch$', type): return 1 else: return 0 @@ -659,7 +659,7 @@ """Initialise the Hessian modification functions.""" # Unmodified Hessian. - if self.hessian_mod == None or match('[Nn]one', self.hessian_mod): + if self.hessian_mod == None or match('^[Nn]o [Hh]essian [Mm]od', self.hessian_mod): if self.print_flag: print self.print_prefix + "Hessian modification: Unmodified Hessian." self.get_pk = self.unmodified_hessian @@ -710,7 +710,7 @@ def valid_hessian_mod(self, mod): """Test if the string 'mod' is a valid Hessian modification.""" - if mod == None or match('^[Ee]igen', mod) or match('^[Cc]hol', mod) or match('^[Gg][Mm][Ww]$', mod) or match('^[Gg][Mm][Ww][ -_]old', mod) or match('^[Ss][Ee]99', mod) or match('^[Nn]one', mod): + if mod == None or match('^[Ee]igen', mod) or match('^[Cc]hol', mod) or match('^[Gg][Mm][Ww]$', mod) or match('^[Gg][Mm][Ww][ -_]old', mod) or match('^[Ss][Ee]99', mod) or match('^[Nn]o [Hh]essian [Mm]od', mod): return 1 else: return 0 Modified: 1.3/minimise/generic.py URL: http://svn.gna.org/viewcvs/relax/1.3/minimise/generic.py?rev=2598&r1=2597&r2=2598&view=diff ============================================================================== --- 1.3/minimise/generic.py (original) +++ 1.3/minimise/generic.py Sun Oct 1 10:20:53 2006 @@ -244,7 +244,7 @@ | | | | More and Thuente line search | '^[Mm][Tt]' or '^[Mm]ore[ _][Tt]huente$' | | | | - | No line search | '^[Nn]one$' | + | No line search | '^[Nn]o [Ll]ine [Ss]earch$' | |___________________________________|_____________________________________________________| @@ -255,7 +255,7 @@ | Hessian modification | Patterns | |___________________________________|_____________________________________________________| | | | - | Unmodified Hessian | '[Nn]one' | + | Unmodified Hessian | '^[Nn]o [Hh]essian [Mm]od' | | | | | Eigenvalue modification | '^[Ee]igen' | | | |