pymatgen.command_line.gulp_caller module

class BuckinghamPotential(bush_lewis_flag)[source]

Bases: object

Generate the Buckingham Potential Table from the bush.lib and lewis.lib.

Ref: T.S.Bush, J.D.Gale, C.R.A.Catlow and P.D. Battle, J. Mater Chem., 4, 831-837 (1994). G.V. Lewis and C.R.A. Catlow, J. Phys. C: Solid State Phys., 18, 1149-1161 (1985)

class GulpCaller(cmd='gulp')[source]

Bases: object

Class to run gulp from commandline

Initialize with the executable if not in the standard path

Parameters:cmd – Command. Defaults to gulp.
run(gin)[source]

Run GULP using the gin as input

Parameters:gin – GULP input string
Returns:GULP output string
Return type:gout
exception GulpConvergenceError(msg='')[source]

Bases: Exception

Exception class for GULP. Raised when proper convergence is not reached in Mott-Littleton defect energy optimisation procedure in GULP

exception GulpError(msg)[source]

Bases: Exception

Exception class for GULP. Raised when the GULP gives an error

class GulpIO[source]

Bases: object

To generate GULP input and process output

buckingham_input(structure, keywords, library=None, uc=True, valence_dict=None)[source]

Gets a GULP input for an oxide structure and buckingham potential from library.

Parameters:
  • structure – pymatgen.core.structure.Structure
  • keywords – GULP first line keywords.
  • library (Default=None) – File containing the species and potential.
  • uc (Default=True) – Unit Cell Flag.
  • valence_dict – {El: valence}
buckingham_potential(structure, val_dict=None)[source]

Generate species, buckingham, and spring options for an oxide structure using the parameters in default libraries.

Ref:
  1. G.V. Lewis and C.R.A. Catlow, J. Phys. C: Solid State Phys., 18, 1149-1161 (1985)
  2. T.S.Bush, J.D.Gale, C.R.A.Catlow and P.D. Battle, J. Mater Chem., 4, 831-837 (1994)
Parameters:
  • structure – pymatgen.core.structure.Structure
  • val_dict (Needed if structure is not charge neutral) – {El:valence} dict, where El is element.
get_energy(gout)[source]
get_relaxed_structure(gout)[source]
keyword_line(*args)[source]

Checks if the input args are proper gulp keywords and generates the 1st line of gulp input. Full keywords are expected.

Parameters:*args – 1st line keywords
library_line(file_name)[source]

Specifies GULP library file to read species and potential parameters. If using library don’t specify species and potential in the input file and vice versa. Make sure the elements of structure are in the library file.

Parameters:file_name – Name of GULP library file
Returns:GULP input string specifying library option
specie_potential_lines(structure, potential, **kwargs)[source]

Generates GULP input specie and potential string for pymatgen structure.

Parameters:
  • structure – pymatgen.core.structure.Structure object
  • potential – String specifying the type of potential used
  • **kwargs – Additional parameters related to potential. For potential == “buckingham”, anion_shell_flg (default = False): If True, anions are considered polarizable. anion_core_chrg=float anion_shell_chrg=float cation_shell_flg (default = False): If True, cations are considered polarizable. cation_core_chrg=float cation_shell_chrg=float
Returns:

string containing specie and potential specification for gulp input.

structure_lines(structure, cell_flg=True, frac_flg=True, anion_shell_flg=True, cation_shell_flg=False, symm_flg=True)[source]

Generates GULP input string corresponding to pymatgen structure.

Parameters:
  • structure – pymatgen Structure object
  • cell_flg (default = True) – Option to use lattice parameters.
  • fractional_flg (default = True) – If True, fractional coordinates are used. Else, cartesian coodinates in Angstroms are used. ** GULP convention is to use fractional coordinates for periodic structures and cartesian coordinates for non-periodic structures. **
  • anion_shell_flg (default = True) – If True, anions are considered polarizable.
  • cation_shell_flg (default = False) – If True, cations are considered polarizable.
  • symm_flg (default = True) – If True, symmetry information is also written.
Returns:

string containing structure for GULP input

tersoff_input(structure, periodic=False, uc=True, *keywords)[source]

Gets a GULP input with Tersoff potential for an oxide structure

Parameters:
  • structure – pymatgen.core.structure.Structure
  • periodic (Default=False) – Flag denoting whether periodic boundary conditions are used
  • library (Default=None) – File containing the species and potential.
  • uc (Default=True) – Unit Cell Flag.
  • keywords – GULP first line keywords.
tersoff_potential(structure)[source]

Generate the species, tersoff potential lines for an oxide structure

Parameters:structure – pymatgen.core.structure.Structure
class TersoffPotential[source]

Bases: object

Generate Tersoff Potential Table from “OxideTersoffPotentialentials” file

get_energy_buckingham(structure, gulp_cmd='gulp', keywords=('optimise', 'conp', 'qok'), valence_dict=None)[source]

Compute the energy of a structure using Buckingham potential.

Parameters:
  • structure – pymatgen.core.structure.Structure
  • gulp_cmd – GULP command if not in standard place
  • keywords – GULP first line keywords
  • valence_dict – {El: valence}. Needed if the structure is not charge neutral.
get_energy_relax_structure_buckingham(structure, gulp_cmd='gulp', keywords=('optimise', 'conp'), valence_dict=None)[source]

Relax a structure and compute the energy using Buckingham potential.

Parameters:
  • structure – pymatgen.core.structure.Structure
  • gulp_cmd – GULP command if not in standard place
  • keywords – GULP first line keywords
  • valence_dict – {El: valence}. Needed if the structure is not charge neutral.
get_energy_tersoff(structure, gulp_cmd='gulp')[source]

Compute the energy of a structure using Tersoff potential.

Parameters:
  • structure – pymatgen.core.structure.Structure
  • gulp_cmd – GULP command if not in standard place