pymatgen.io.xr module¶
-
class
Xr(structure)[source]¶ Bases:
objectBasic object for working with xr files.
Parameters: structure (Structure/IStructure) – Structure object to create the Xr object. -
static
from_file(filename, use_cores=True, thresh=0.0001)[source]¶ Reads an xr-formatted file to create an Xr object.
Parameters: - filename (str) – name of file to read from.
- use_cores (bool) – use core positions and discard shell positions if set to True (default). Otherwise, use shell positions and discard core positions.
- thresh (float) – relative threshold for consistency check between cell parameters (lengths and angles) from header information and cell vectors, respectively.
Returns: - Xr object corresponding to the input
file.
Return type:
-
static
from_string(string, use_cores=True, thresh=0.0001)[source]¶ Creates an Xr object from a string representation.
Parameters: - string (str) – string representation of an Xr object.
- use_cores (bool) – use core positions and discard shell positions if set to True (default). Otherwise, use shell positions and discard core positions.
- thresh (float) – relative threshold for consistency check between cell parameters (lengths and angles) from header information and cell vectors, respectively.
Returns: - Xr object corresponding to the input
string representation.
Return type:
-
static