carmm.run package¶
Submodules¶
carmm.run.aims_calculator module¶
- carmm.run.aims_calculator.get_aims_and_sockets_calculator(dimensions, port=None, host=None, logfile='socketio.log', check_socket=True, verbose=False, codata_warning=True, **kwargs)¶
Method to return a sockets calculator (for i-Pi based socket connectivity) and also an associated FHI-aims calculator for ASE
- Parameters:
dimensions – Integer Dimensions is _not_ used in this routine, but we make it necessary so the passthrough isn’t problematic for inexperienced users. See get_aims_calculator()
port – None or Integer The port for connection between FHI-aims and ASE with i-Pi sockets. This is fairly arbitrary as long as it doesn’t clash with local settings. If None an integer between 12345 and 60000 will be picked at random.
host – String Name of host computer for ASE. Necessary for calculations where MPI runs on the compute nodes. This is now defaulted to None, and then will self-identify the host name if unidentified. Long-term, we should consider removing this variable to insulate the users from having to set it.
logfile – String Location of output from sockets communication.
check_socket – Boolean Whether we want the automatically identify and resolve port clashes.
verbose – Boolean For testing of the interface when searching for empty ports.
codata_warning – Boolean Warn the user about Hartree to eV conversion being performed in ASE rather than FHI-aims. ASE uses CODATA 2014 and FHI-aims uses CODATA 2002 which yields energy discrepancies. The warning message can be turned off if set to False.
- **kwargs:
Any other keyword arguments that a user wants to set. These are passed through.
- Returns:
- Wrapper for ASE calculator
Used for i-Pi connectvity, and should be assigned to optimisation/dynamics Object
FHI_calc: FHI-aims ASE calculator
- Return type:
Socket_calc
- carmm.run.aims_calculator.get_aims_calculator(dimensions, spin=None, relativistic=None, k_grid=None, xc='pbe', compute_forces=True, directory='./', **kwargs)¶
Method to return a “default” FHI-aims calculator. Note: This file should not be changed without consultation,
as changes could affect many users in the group.
- Parameters:
dimensions – Integer Determines whether we have a “gas”-phase (0) or “periodic” structure (2 or 3)
spin – String Determines if spin is to be invoked for the calculation
relativistic – String Determines what setting for relativity is to be used
k_grid – List of integers Gives the k-grid sampling in x-, y- and z- direction. e.g. [3, 3, 3]
xc – String XC of choice
compute_forces – String Determines whether forces are enabled (“true”) or not enabled (“false”).
directory – String ???
**kwargs – Any other keyword arguments that a user wants to set. These are passed through.
- Returns:
FHI-aims ASE calculator
- Return type:
FHI_calc
- carmm.run.aims_calculator.get_k_grid(model, sampling_density, verbose=False, simple_reciprocal_space_parameters=True)¶
Based converged value of reciprocal space sampling provided, this function analyses the xyz-dimensions of the simulation cell and returns the minimum k-grid as a tuple that can be used as a value for the k_grid keyword in the Aims calculator. This function allows to maintain consistency in input for variable supercell sizes.
- Parameters:
model – Atoms object Periodic model that requires k-grid for calculation in FHI-aims.
sampling_density –
float In a simple approach, this is a value of minimum reciprocal space sampling required for accuracy of the periodic calculation. The value is a fraction between 0 and 1, unit is /Å. It is often reported as one k-point per (sampling_density) * 2π Å^-1 in literature, representing the spacing of k-points along the vector of the reciprocal unit cell.
In FHI-aims, there is a similar parameter called “k_grid_density”, which is float defining the density of k-point splits along the vector of the reciprocal unit cell, unit is nkpts/Å^-1. This FHI-aims specific parameter is inversely related to the definition above for sampling density as: k_grid_density = 1 / (sampling_density * 2 * math.pi)
Ultimately the choice of definition is a matter of taste, and should be explained in any distribution of the outcomes
simple_reciprocal_space_parameters – bool Flag switching between the simplified definition of reciprocal lattice parameters, which is 2π/a (a is the real space lattice parameter), and the strict definition (see p86 Neil W. Ashcroft Solid State Physics (1976) or section 2.4 of https://www.physics-in-a-nutshell.com/article/15/the-reciprocal-lattice).
verbose – bool Flag turning print statements on/off
Returns – float containing 3 integers: (kx, ky, kz) or None if a non-periodic model is presented
carmm.run.aims_path module¶
- carmm.run.aims_path.set_aims_command(hpc='hawk', basis_set='light', defaults=2010, nodes_per_instance=None)¶
Choose supercomputer and basis_set to obtain FHI-aims run command. Can be useful to e.g. perform a calculation with a larger basis set after a geometry optimisation.
Parameters: hpc: String
Name of the HPC facility where the jobs are being run Options: ‘hawk’, ‘hawk-amd’, ‘isambard’, ‘archer2’, ‘young’, ‘aws’, ‘custom’ NOTE 1: ‘custom’ requires the environmental variable “CARMM_AIMS_ROOT_DIRECTORY” before running to allow logic of basis set selection, while maintaining free choice of basis set folders. NOTE 2: ‘custom’ requires environmental variable ASE_AIMS_COMMAND be set, with the desired number of mpi processes and WITHOUT a default output file
- basis_set: String
Name of basis set for FHI-aims Options: ‘light’, ‘intermediate’, ‘tight’, ‘really_tight’ etc.
- defaults: int
Either 2010 or 2020 referring to the default species basis sets that come with new FHI-aims release, which adhere to the year 2010
or 2020 standard. Old 2010 value by default to avoid disruption for users.
- nodes_per_instance: int, optional
Number of nodes per separate instance of FHI-aims, when running task-farmed