Energetic_Fitness_Contribution.py

Meow

Organisms.GA.Fitness_Operators.Energetic_Fitness_Contribution.check_rho_i(rho_i, cluster, max_energy, min_energy)

This method will check that the rho value for the cluster is within the expected limits. If there are any errors, the program will mention what is wrong and terminate.

Parameters:
  • rho_i (float) – This is the rho value to check.

  • collection (Organisms.GA.Cluster) – This is the cluster that contains the associated rho value to check.

  • min_energy (float) – This is the lowest energy of the current lowest energetic structure across all the collections in the GA (e.g. [population, offspring]).

  • max_energy (float) – This is the highest energy of the current highest energetic structure across all the collections in the GA (e.g. [population, offspring]).

Organisms.GA.Fitness_Operators.Energetic_Fitness_Contribution.get_energetic_fitness_contribution(cluster, highest_energy, lowest_energy, energy_fitness_function)

Get the fitness, based on the energy, for a cluster.

See Theoretical study of Cu-Au nanoalloy clusters using a genetic algorithm, Darby et al., 116, 1536 (2002); doi: 10.1063/1.1429658, page 1538 about this fitness equation, including the definition of max_energy and min_energy.

Parameters:
  • cluster (Cluster) – This is the cluster you want to obtain rho_i for.

  • population (Population) – This is the population which will be used to get the max_energy and min_energy to obtain rho_i.

Returns:

The value for energetic fitness value for the cluster

Rtypes:

float

Organisms.GA.Fitness_Operators.Energetic_Fitness_Contribution.get_lowest_and_highest_energies_from_collections(population, collections)

This method will return the value of the highest and lowest energy from a list of collections that are inputted into this method. The collections variable is a list of collections, for example [population,offspring] This is a private method.

Parameters:

collections (list of collection objects) – A list of all the collections that you want to compare..

Returns:

the lowest energy of clusters out of all the inputed collections, the maximum energy out of all the inputed collections.

Rtypes:

float, float

Organisms.GA.Fitness_Operators.Energetic_Fitness_Contribution.get_rho_i(cluster, highest_energy, lowest_energy)

Get the rho of a cluster. Note that the max and min energy are based on that of the current population.

See Theoretical study of Cu-Au nanoalloy clusters using a genetic algorithm, Darby et al., 116, 1536 (2002); doi: 10.1063/1.1429658, page 1538 about this fitness equation, including the definition of max_energy and min_energy.

Parameters:
  • cluster (Cluster) – This is the cluster you want to obtain rho_i for.

  • highest_energy (float) – This is the highest energy of the current highest energetic structure across all the collections in the GA (e.g. [population, offspring]).

  • lowest_energy (float) – This is the lowest energy of the current lowest energetic structure across all the collections in the GA (e.g. [population, offspring]).

Returns:

The value for rho for the cluster

Rtypes:

float