Package schrodinger :: Package application :: Package matsci :: Package genetic_optimization :: Module genetic_optimization :: Class CheckInput
[hide private]
[frames] | no frames]

Class CheckInput

object --+
         |
        CheckInput

Manage checking user input.

Instance Methods [hide private]
 
checkMaeFile(self, input_file, logger=None)
Check that a file exists and is *mae.
 
checkOperators(self, operators, logger=None)
Check the operators.
 
checkRates(self, crossover_rate, mutation_rate, logger=None)
Check the specified rates of crossover and mutation.
 
checkInitialPopulation(self, initial_population, crossover_names, mutator_names, crossover_rate, mutation_rate, no_open_shell, logger=None)
Check the initial population.
 
checkPopulationParam(self, population, num_structures_given, logger=None)
Check the population parameter.
list
checkFragmentLibs(self, fragment_libs, logger=None)
Check the specified fragment libraries.
 
checkProperties(self, properties, logger=None)
Check the list of properties.
 
checkGenerations(self, generations, logger=None)
Check the specified number of generations.
 
checkSelection(self, selection, logger=None)
Check the specified selection protocol.
 
checkTournamentSize(self, tournament_size, population, logger=None)
Check the specified tournament size.
list and int
checkTerminationParams(self, terminators, num_unproductive, logger=None)
Check the termination parameters.
 
checkScaling(self, scaling, properties, logger=None)
Check the scaling.
 
checkElitism(self, elitism, population, logger=None)
Check the elitism.
 
checkTpp(self, tpp_ga, population, eval_kwargs, logger=None)
Check the threads per processor.
 
checkNodeFile(self, logger=None)
Check the hosts in the node file, specified by the SCHRODINGER_NODEFILE envvar, that have been allocated by the queue manager.
 
checkConformationalSearch(self, conformational_search, logger=None)
Check the conformational search.
list
checkFreezers(self, freezers, pop_size, input_size, logger=None)
Check the freezers.
 
checkInoculate(self, inoculate, logger=None)
Check the inoculate.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

checkMaeFile(self, input_file, logger=None)

 

Check that a file exists and is *mae.

Parameters:
  • input_file (str) - the name of the input file
  • logger (logging.Logger) - output logger

checkOperators(self, operators, logger=None)

 

Check the operators.

Parameters:
  • operators (list) - contains tuples of the operator functions and their weights
  • logger (logging.Logger) - output logger

checkRates(self, crossover_rate, mutation_rate, logger=None)

 

Check the specified rates of crossover and mutation.

Parameters:
  • crossover_rate (float) - the rate of crossover as a percentage
  • mutation_rate (float) - the rate of mutation as a percentage
  • logger (logging.Logger) - output logger

checkInitialPopulation(self, initial_population, crossover_names, mutator_names, crossover_rate, mutation_rate, no_open_shell, logger=None)

 

Check the initial population.

Parameters:
  • initial_population (list) - the initial population of schrodinger.structure.Structure
  • crossover_names (list) - contains the function names of the crossover operators to be used
  • mutator_names (list) - contains the function names of the mutation operators to be used
  • crossover_rate (float) - the rate of crossover
  • mutation_rate (float) - the rate of mutation
  • no_open_shell (bool) - if True then check for open shell structures otherwise do not
  • logger (logging.Logger) - output logger

checkPopulationParam(self, population, num_structures_given, logger=None)

 

Check the population parameter.

Parameters:
  • population (int) - the size of the population to use in the genetic optimization
  • num_structures_given (int) - the number of structures provided to the genetic optimization
  • logger (logging.Logger) - output logger

checkFragmentLibs(self, fragment_libs, logger=None)

 

Check the specified fragment libraries.

Parameters:
  • fragment_libs (list) - strings specifying fragment libraries to be used
  • logger (logging.Logger) - output logger
Returns: list
valid user provided fragment files

checkProperties(self, properties, logger=None)

 

Check the list of properties.

Parameters:
  • properties (list) - contains Property instances
  • logger (logging.Logger) - output logger

checkGenerations(self, generations, logger=None)

 

Check the specified number of generations.

Parameters:
  • generations (int) - the number of generations
  • logger (logging.Logger) - output logger

checkSelection(self, selection, logger=None)

 

Check the specified selection protocol.

Parameters:
  • selection (str) - the selection protocol to use.
  • logger (logging.Logger) - output logger

checkTournamentSize(self, tournament_size, population, logger=None)

 

Check the specified tournament size.

Parameters:
  • tournament_size (int) - the size of tournament to use in tournament based selection
  • population (int) - the size of population to use
  • logger (logging.Logger) - output logger

checkTerminationParams(self, terminators, num_unproductive, logger=None)

 

Check the termination parameters.

Parameters:
  • terminators (list) - the list of terminators to use
  • num_unproductive (int) - used when the unproductive termination option is active, it is the generation number on which to exit if the score hasn't improved
  • logger (logging.Logger) - output logger
Returns: list and int
valid terminators and valid num_unproductive

checkScaling(self, scaling, properties, logger=None)

 

Check the scaling.

Parameters:
  • scaling (str) - the scaling protocol to use in the genetic optimization
  • properties (list) - the properties to be optimized
  • logger (logging.Logger) - output logger

checkElitism(self, elitism, population, logger=None)

 

Check the elitism.

Parameters:
  • elitism (int) - the number of elite individuals to use
  • population (int) - the size of population to use
  • logger (logging.Logger) - output logger

checkTpp(self, tpp_ga, population, eval_kwargs, logger=None)

 

Check the threads per processor.

Parameters:
  • tpp_ga (int) - the threads per processor for the genetic optimization
  • population (int) - the size of population to use
  • eval_kwargs (dict) - the kwargs for the evaluation function
  • logger (logging.Logger) - output logger

checkNodeFile(self, logger=None)

 

Check the hosts in the node file, specified by the SCHRODINGER_NODEFILE envvar, that have been allocated by the queue manager.

Parameters:
  • logger (logging.Logger) - output logger

checkConformationalSearch(self, conformational_search, logger=None)

 

Check the conformational search.

Parameters:
  • conformational_search (bool or str) - specifies whether a conformational search is to be performed, if a string is given specifies a file used to set options
  • logger (logging.Logger) - output logger

checkFreezers(self, freezers, pop_size, input_size, logger=None)

 

Check the freezers.

Parameters:
  • freezers (list) - collection of freezers to use
  • pop_size (int) - the size of the population
  • input_size (int) - the number of structures given
  • logger (logging.Logger) - output logger
Returns: list
collection of freezers to use

checkInoculate(self, inoculate, logger=None)

 

Check the inoculate.

Parameters:
  • inoculate (list) - circumstances in which to inoculate
  • logger (logging.Logger) - output logger