cgexplore.utilities.run_constrained_optimisation

cgexplore.utilities.run_constrained_optimisation(assigned_system, name, output_dir, bond_ff_scale, angle_ff_scale, max_iterations, platform)[source]

Run optimisation with constraints and softened potentials.

Parameters:
  • assigned_system (AssignedSystem) – The system to optimise with force field assigned.

  • name (str) – Name to use for naming output files. E.g. produces a file {name}_constrained_ff.xml in output_dir.

  • output_dir (Path) – Directory to save outputs of optimisation process.

  • bond_ff_scale (float) – Scale (divide) the bond terms in the model by this value.

  • angle_ff_scale (float) – Scale (divide) the angle terms in the model by this value.

  • max_iterations (int) – Number of iterations to use in optimisation. Can be None, for until convergence is met.

  • platform (str | None) – Which platform to use with OpenMM optimisation. Options are CPU or CUDA. More are available but may not work well out of the box.

Returns:

An stk molecule.

Return type:

Molecule