gnrs.energy


gnrs.energy.energy_task

This module computes the energy.

This source code is licensed under the BSD-3-Clause license found in the LICENSE file in the root directory of this source tree.

class gnrs.energy.energy_task.EnergyCalculationTask[source]

Bases: TaskABC

Task for computing energy using DFT, semi-empirical, or MLIP methods. Uses ASE calculators for energy evaluation.

Initialize the energy calculation task.

Parameters:
  • comm – MPI communicator

  • config – Config dictionary

  • gnrs_info – Genarris info dictionary

  • energy_method – Energy calculation method

__init__(comm, config, gnrs_info, energy_method)[source]

Initialize the energy calculation task.

Parameters:
  • comm (mpi4py.MPI.Comm) – MPI communicator

  • config (dict) – Config dictionary

  • gnrs_info (dict) – Genarris info dictionary

  • energy_method (str) – Energy calculation method

Return type:

None

initialize()[source]

Initialize the energy calculation task.

Return type:

None

pack_settings()[source]

Pack the settings for the energy calculation task.

Return type:

dict

print_settings(task_settings)[source]

Print the settings for the energy calculation task.

Parameters:

task_settings (dict)

Return type:

None

create_folders()[source]

Create the folders for the energy calculation task.

Return type:

None

perform_task(task_settings)[source]

Perform the energy calculation task.

Parameters:

task_settings (dict)

Return type:

None

collect_results()[source]

Collect the results from the energy calculation task.

Return type:

None

analyze()[source]

Analyze the results from the energy calculation task.

Return type:

None

finalize()[source]

Finalize the energy calculation task.

Return type:

None

gnrs.energy.maceoff

This module computes the energy using MACE-OFF model.

https://github.com/ACEsuit/mace https://github.com/ACEsuit/mace-off

This source code is licensed under the BSD-3-Clause license found in the LICENSE file in the root directory of this source tree.

class gnrs.energy.maceoff.MACEOFFEnergy[source]

Bases: EnergyCalculatorABC

Computes the energy using MACE-OFF model.

GPU device assignment is managed by the base class via GPUDeviceManager. Feeder ranks skip model loading entirely; only GPU workers instantiate the MACE calculator.

Initialize the energy calculations.

Parameters:
  • comm – MPI communicator

  • task_settings – Task settings

  • energy_name – Energy name

requires_gpu: bool = True
__init__(*args)[source]

Initialize the energy calculations.

Parameters:
  • comm – MPI communicator

  • task_settings – Task settings

  • energy_name – Energy name

Return type:

None

initialize()[source]

Initialize the energy calculator.

Return type:

None

compute(xtal)[source]

Compute the energy of the crystal.

Parameters:

xtal (ase.Atoms)

Return type:

None

finalize()[source]

Finalize the energy calculator.

Return type:

None

gnrs.energy.uma

This module computes the energy using the Universal Model for Atoms (UMA) model from fairchem.

https://github.com/facebookresearch/fairchem https://fair-chem.github.io/ https://huggingface.co/facebook/UMA

Models are made accessible for commerical and non-commerical use under a permissive license found in https://huggingface.co/facebook/UMA/blob/main/LICENSE.

This source code is licensed under the BSD-3-Clause license found in the LICENSE file in the root directory of this source tree.

class gnrs.energy.uma.UMAEnergy[source]

Bases: EnergyCalculatorABC

Computes the energy using UMA model.

GPU device assignment is managed by the base class via GPUDeviceManager. Feeder ranks skip model loading entirely; only GPU workers instantiate the FAIRChem calculator.

Initialize the energy calculations.

Parameters:
  • comm – MPI communicator

  • task_settings – Task settings

  • energy_name – Energy name

requires_gpu: bool = True
__init__(*args)[source]

Initialize the energy calculations.

Parameters:
  • comm – MPI communicator

  • task_settings – Task settings

  • energy_name – Energy name

Return type:

None

initialize()[source]

Initialize the energy calculator.

Return type:

None

compute(xtal)[source]

Compute the energy of the crystal.

Parameters:

xtal (ase.Atoms)

Return type:

None

finalize()[source]

Finalize the energy calculator.

Return type:

None

gnrs.energy.aimnet

This module computes the energy using AIMNet2 model.

https://github.com/isayevlab/aimnetcentral

This source code is licensed under the BSD-3-Clause license found in the LICENSE file in the root directory of this source tree.

class gnrs.energy.aimnet.AIMNETEnergy[source]

Bases: EnergyCalculatorABC

Computes the energy using AIMNet model.

GPU device assignment is managed by the base class via GPUDeviceManager. Feeder ranks skip model loading entirely; only GPU workers instantiate the AIMNet calculator.

Initialize the energy calculations.

Parameters:
  • comm – MPI communicator

  • task_settings – Task settings

  • energy_name – Energy name

requires_gpu: bool = True
__init__(*args)[source]

Initialize the energy calculations.

Parameters:
  • comm – MPI communicator

  • task_settings – Task settings

  • energy_name – Energy name

Return type:

None

initialize()[source]

Initialize the energy calculator.

Return type:

None

compute(xtal)[source]

Compute the energy of the crystal.

Parameters:

xtal (ase.Atoms)

Return type:

None

finalize()[source]

Finalize the energy calculator.

Return type:

None

gnrs.energy.dftbp

This module computes the energy using DFTB+ code with ASE.

This source code is licensed under the BSD-3-Clause license found in the LICENSE file in the root directory of this source tree.

class gnrs.energy.dftbp.DFTBPEnergy[source]

Bases: EnergyCalculatorABC

Computes energy using DFTB+ code. https://wiki.fysik.dtu.dk/ase/ase/calculators/dftb.html

Initialize the energy calculations.

Parameters:
  • comm – MPI communicator

  • task_settings – Task settings

  • energy_name – Energy name

__init__(*args)[source]

Initialize the energy calculations.

Parameters:
  • comm – MPI communicator

  • task_settings – Task settings

  • energy_name – Energy name

Return type:

None

initialize()[source]

Initialize the energy calculator.

Return type:

None

compute(xtal)[source]

Compute the energy of the crystal.

Parameters:

xtal (ase.Atoms)

Return type:

None

finalize()[source]

Finalize the energy calculator.

Return type:

None

gnrs.energy.aims

This module computes the energy using FHI-aims DFT code with ASE.

This source code is licensed under the BSD-3-Clause license found in the LICENSE file in the root directory of this source tree.

class gnrs.energy.aims.AIMSEnergy[source]

Bases: EnergyCalculatorABC

Computes the energy using FHI-aims DFT code with ASE

Initialize the energy calculations.

Parameters:
  • comm – MPI communicator

  • task_settings – Task settings

  • energy_name – Energy name

__init__(*args)[source]

Initialize the energy calculations.

Parameters:
  • comm – MPI communicator

  • task_settings – Task settings

  • energy_name – Energy name

Return type:

None

initialize()[source]

Initialize the energy calculator.

Return type:

None

compute(xtal)[source]

Compute the energy of the crystal.

Parameters:

xtal (ase.Atoms)

Return type:

None

finalize()[source]

Finalize the energy calculator.

Return type:

None

gnrs.energy.vasp

This module computes the energy using VASP DFT code with ASE.

This source code is licensed under the BSD-3-Clause license found in the LICENSE file in the root directory of this source tree.

class gnrs.energy.vasp.VASP[source]

Bases: EnergyCalculatorABC

Computes the energy using VASP DFT code with ASE https://wiki.fysik.dtu.dk/ase/ase/calculators/vasp.html

Initialize the energy calculations.

Parameters:
  • comm – MPI communicator

  • task_settings – Task settings

  • energy_name – Energy name

__init__(*args)[source]

Initialize the energy calculations.

Parameters:
  • comm – MPI communicator

  • task_settings – Task settings

  • energy_name – Energy name

Return type:

None

initialize()[source]

Initialize the energy calculator.

Return type:

None

compute(xtal)[source]

Compute the energy of the crystal.

Parameters:

xtal (ase.Atoms)

Return type:

None

finalize()[source]

Finalize the energy calculator.

Return type:

None