structopt.common.individual.fitnesses

class structopt.common.individual.fitnesses.Fitnesses(parameters)

Bases: object

calculate_fitness(individual)

Perform the fitness calculations on an individual.

Args:
individual (Individual): the individual to evaluate

(@parallel) Designed to run code that runs differently on different cores. The MPI functionality should be implemented inside these functions.

post_processing()
class structopt.common.individual.fitnesses.LAMMPS(parameters)

Bases: object

LAMMPS class for running LAMMPS on a single individual. Takes a dictionary, where the key: value are the parameters for running LAMMPs.

Parameters:
  • min_style (str) – The minimization scheme for running LAMMPS. See LAMMPS doc.
  • min_modify (str) – Parameters for min_style energy minimization algorithm. See LAMMPS doc.
  • minimize (str) – Convergence criteria for minimization algorithm. Note for fitness values, the last two values are set to 0, so no relaxation is done. See LAMMPS doc.
  • pair_style (str) – Type of potential used. See LAMMPS doc.
  • potential_file (str) – The path to the potential_file. Should be absolute.
  • thermo_steps (int) – How much output to print of thermodynamic information. If set to 0, only the last step is printed.See LAMMPS doc.
  • keep_file (bool) – Will keep all of the LAMMPS input and output files for each individual. Use with caution.
  • reference (dict) – Reference energies of the particle. These are values to subtract from the values returned by LAMMPS. Given as a dictionary of {sym : E} pairs, where sym is a str denoating the the element, while E is the value to be subtracted per sym. This is typically the pure component formation energy calculated with LAMMPS. Note since this is merely a fixed subtraction, should not change the performance in constant composition runs.
calculate_fitness(individual)
get_command(individual)
normalize(E, individual)
reference(E, individual)

References the energy of the cluster to a reference energy

class structopt.common.individual.fitnesses.FEMSIM(parameters)

Bases: object

Contains parameters and functions for running FEMSIM through Python.

chi2(vk)
get_spawn_args(individual)

Returns a dictionary of arguments to be passed to MPI.COMM_SELF.Spawn which will be collected for all structures and concatenated into MPI.COMM_SELF.Spawn_multiple: https://github.com/mpi4py/mpi4py/blob/2acfc552c42846628304e54a3b87e2bf3a59af07/src/mpi4py/MPI/Comm.pyx#L1555

get_vk_data()
read_inputs(parameters)
setup_individual_evaluation(individual)
update_parameters(**kwargs)
write_paramfile(individual)