pymatgen.command_line.gulp_caller module
Interface with command line GULP. http://projects.ivec.org WARNING: you need to have GULP installed on your system.
- 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)
- Parameters:
bush_lewis_flag (str) – Flag for using Bush or Lewis potential.
- 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.
- 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
- Parameters:
msg (str) – Message
- exception GulpError(msg)[source]
Bases:
Exception
Exception class for GULP. Raised when the GULP gives an error
- Parameters:
msg (str) – Message
- class GulpIO[source]
Bases:
object
To generate GULP input and process output
- buckingham_input(structure: 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}
- static buckingham_potential(structure, val_dict=None)[source]
Generate species, buckingham, and spring options for an oxide structure using the parameters in default libraries.
- Ref:
G.V. Lewis and C.R.A. Catlow, J. Phys. C: Solid State Phys., 18, 1149-1161 (1985)
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.
- static get_relaxed_structure(gout)[source]
- Parameters:
() (gout) –
- Returns:
(Structure) relaxed structure.
- static 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
- static 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
- static 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.
- static structure_lines(structure: Structure, cell_flg: bool = True, frac_flg: bool = True, anion_shell_flg: bool = True, cation_shell_flg: bool = False, symm_flg: bool = 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 coordinates 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: 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.
- class TersoffPotential[source]
Bases:
object
Generate Tersoff Potential Table from “OxideTersoffPotentialentials” file
Init TersoffPotential
- 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.