GPUMD IO

calorine.gpumd.read_hac(filename)[source]

Parses a file in hac.out format from GPUMD and returns the content as a data frame. More information concerning file format, content and units can be found here.

Parameters:

filename (str) – input file name

Return type:

DataFrame

calorine.gpumd.read_kappa(filename)[source]

Parses a file in kappa.out format from GPUMD and returns the content as a data frame. More information concerning file format, content and units can be found here.

Parameters:

filename (str) – input file name

Return type:

DataFrame

calorine.gpumd.read_thermo(filename, natoms=1)[source]

Parses a file in thermo.out format from GPUMD and returns the content as a data frame. More information concerning file format, content and units can be found here.

Parameters:
  • filename (str) – input file name

  • natoms (int) – number of atoms; used to normalize energies

Return type:

DataFrame

calorine.gpumd.read_xyz(filename)[source]

Read the structure input file (model.xyz) for GPUMD and return the structure along with run input parameters from the file.

This is a wrapper function around ase.io.read_xyz() since the ASE implementation does not read velocities properly.

Parameters:

filename (str) – Name of file from which to read the structure

Return type:

Atoms

Returns:

  • structure as ASE Atoms object with additional per-atom arrays

  • representing atomic masses, velocities etc.

calorine.gpumd.write_xyz(filename, structure, groupings=None)[source]

Writes a structure into GPUMD input format (model.xyz).

Parameters:
  • filename (str) – Name of file to which the structure should be written

  • structure (Atoms) – Input structure

  • groupings (Optional[List[List[List[int]]]]) – Groups into which the individual atoms should be divided in the form of a list of list of lists. Specifically, the outer list corresponds to the grouping methods, of which there can be three at the most, which contains a list of groups in the form of lists of site indices. The sum of the lengths of the latter must be the same as the total number of atoms.

Raises:

ValueError – Raised if parameters are incompatible