text stringlengths 81 112k |
|---|
Generate a summary dict.
Args:
print_subelectrodes: Also print data on all the possible
subelectrodes.
Returns:
A summary of this electrode"s properties in dict format.
def as_dict_summary(self, print_subelectrodes=True):
"""
Generate a summary ... |
Creates zval_dictionary for calculating the ionic polarization from
Potcar object
potcar: Potcar object
def zval_dict_from_potcar(potcar):
"""
Creates zval_dictionary for calculating the ionic polarization from
Potcar object
potcar: Potcar object
"""
zval_dict = {}
for p in potcar... |
Calculate the ionic dipole moment using ZVAL from pseudopotential
site: PeriodicSite
structure: Structure
zval: Charge value for ion (ZVAL for VASP pseudopotential)
Returns polarization in electron Angstroms.
def calc_ionic(site, structure, zval):
"""
Calculate the ionic dipole moment using Z... |
Get the total ionic dipole moment for a structure.
structure: pymatgen Structure
zval_dict: specie, zval dictionary pairs
center (np.array with shape [3,1]) : dipole center used by VASP
tiny (float) : tolerance for determining boundary of calculation.
def get_total_ionic_dipole(structure, zval_dict):
... |
Given coords and a site, find closet site to coords.
Args:
coords (3x1 array): cartesian coords of center of sphere
site: site to find closest to coords
r: radius of sphere. Defaults to diagonal of unit cell
Returns:
Closest site and distance.
def get_ne... |
Create Polarization object from list of Outcars and Structures in order
of nonpolar to polar.
Note, we recommend calculating the ionic dipole moment using calc_ionic
than using the values in Outcar (see module comments). To do this set
calc_ionic_from_zval = True
def from_outcars_and_s... |
Get the electronic and ionic dipole moments / polarizations.
convert_to_muC_per_cm2: Convert from electron * Angstroms to microCoulomb
per centimeter**2
def get_pelecs_and_pions(self, convert_to_muC_per_cm2=False):
"""
Get the electronic and ionic dipole moments / polarizations.
... |
Get same branch dipole moment (convert_to_muC_per_cm2=False)
or polarization for given polarization data (convert_to_muC_per_cm2=True).
Polarization is a lattice vector, meaning it is only defined modulo the
quantum of polarization:
P = P_0 + \\sum_i \\frac{n_i e R_i}{\\Omega}
... |
Returns the dipole / polarization quanta along a, b, and c for
all structures.
def get_lattice_quanta(self, convert_to_muC_per_cm2=True, all_in_polar=True):
"""
Returns the dipole / polarization quanta along a, b, and c for
all structures.
"""
lattices = [s.lattice for s... |
Get difference between nonpolar and polar same branch polarization.
def get_polarization_change(self, convert_to_muC_per_cm2=True, all_in_polar=True):
"""
Get difference between nonpolar and polar same branch polarization.
"""
tot = self.get_same_branch_polarization_data(
co... |
Get magnitude of difference between nonpolar and polar same branch
polarization.
def get_polarization_change_norm(self, convert_to_muC_per_cm2=True, all_in_polar=True):
"""
Get magnitude of difference between nonpolar and polar same branch
polarization.
"""
polar = self.... |
Fit splines to same branch polarization. This is used to assess any jumps
in the same branch polarizaiton.
def same_branch_splines(self, convert_to_muC_per_cm2=True, all_in_polar=True):
"""
Fit splines to same branch polarization. This is used to assess any jumps
in the same branch pola... |
Get maximum difference between spline and same branch polarization data.
def max_spline_jumps(self, convert_to_muC_per_cm2=True, all_in_polar=True):
"""
Get maximum difference between spline and same branch polarization data.
"""
tot = self.get_same_branch_polarization_data(
... |
Get rms average difference between spline and same branch polarization data.
def smoothness(self, convert_to_muC_per_cm2=True, all_in_polar=True):
"""
Get rms average difference between spline and same branch polarization data.
"""
tot = self.get_same_branch_polarization_data(
... |
Fit spline to energy trend data.
def spline(self):
"""
Fit spline to energy trend data.
"""
from scipy.interpolate import UnivariateSpline
sp = UnivariateSpline(range(len(self.energies)), self.energies, k=4)
return sp |
Get rms average difference between spline and energy trend.
def smoothness(self):
"""
Get rms average difference between spline and energy trend.
"""
energies = self.energies
try:
sp = self.spline()
except:
print("Energy spline failed.")
... |
Get maximum difference between spline and energy trend.
def max_spline_jump(self):
"""
Get maximum difference between spline and energy trend.
"""
sp = self.spline()
return max(self.energies - sp(range(len(self.energies)))) |
Test if spline endpoints are at minima for a given slope cutoff.
def endpoints_minima(self, slope_cutoff=5e-3):
"""
Test if spline endpoints are at minima for a given slope cutoff.
"""
energies = self.energies
try:
sp = self.spline()
except:
print... |
Process a single entry with the chosen Corrections.
Args:
entry: A ComputedEntry object.
Returns:
An adjusted entry if entry is compatible, otherwise None is
returned.
def process_entry(self, entry):
"""
Process a single entry with the chosen Correc... |
Returns the corrections applied to a particular entry.
Args:
entry: A ComputedEntry object.
Returns:
({correction_name: value})
def get_corrections_dict(self, entry):
"""
Returns the corrections applied to a particular entry.
Args:
entry: A... |
Provides an explanation dict of the corrections that are being applied
for a given compatibility scheme. Inspired by the "explain" methods
in many database methodologies.
Args:
entry: A ComputedEntry.
Returns:
(dict) of the form
{"Compatibility": "st... |
Prints an explanation of the corrections that are being applied for a
given compatibility scheme. Inspired by the "explain" methods in many
database methodologies.
Args:
entry: A ComputedEntry.
def explain(self, entry):
"""
Prints an explanation of the corrections t... |
Reads a string representation to a Cssr object.
Args:
string (str): A string representation of a CSSR.
Returns:
Cssr object.
def from_string(string):
"""
Reads a string representation to a Cssr object.
Args:
string (str): A string represent... |
Returns conversion factor from THz to the requred units and the label in the form of a namedtuple
Accepted values: thz, ev, mev, ha, cm-1, cm^-1
def freq_units(units):
"""
Returns conversion factor from THz to the requred units and the label in the form of a namedtuple
Accepted values: thz, ev, mev, ha... |
Adds a dos for plotting.
Args:
label:
label for the DOS. Must be unique.
dos:
PhononDos object
def add_dos(self, label, dos):
"""
Adds a dos for plotting.
Args:
label:
label for the DOS. Must be unique... |
Add a dictionary of doses, with an optional sorting function for the
keys.
Args:
dos_dict: dict of {label: Dos}
key_sort_func: function used to sort the dos_dict keys.
def add_dos_dict(self, dos_dict, key_sort_func=None):
"""
Add a dictionary of doses, with an o... |
Get a matplotlib plot showing the DOS.
Args:
xlim: Specifies the x-axis limits. Set to None for automatic
determination.
ylim: Specifies the y-axis limits.
units: units for the frequencies. Accepted values thz, ev, mev, ha, cm-1, cm^-1.
def get_plot(self, xl... |
Show the plot using matplotlib.
Args:
xlim: Specifies the x-axis limits. Set to None for automatic
determination.
ylim: Specifies the y-axis limits.
units: units for the frequencies. Accepted values thz, ev, mev, ha, cm-1, cm^-1.
def show(self, xlim=None, yl... |
utility private method to add ticks to a band structure
def _maketicks(self, plt):
"""
utility private method to add ticks to a band structure
"""
ticks = self.get_ticks()
# Sanitize only plot the uniq values
uniq_d = []
uniq_l = []
temp_ticks = list(zip(... |
Get the data nicely formatted for a plot
Returns:
A dict of the following format:
ticks: A dict with the 'distances' at which there is a qpoint (the
x axis) and the labels (None if no label)
frequencies: A list (one element for each branch) of frequencies for
... |
Get a matplotlib object for the bandstructure plot.
Args:
ylim: Specify the y-axis (frequency) limits; by default None let
the code choose.
units: units for the frequencies. Accepted values thz, ev, mev, ha, cm-1, cm^-1.
def get_plot(self, ylim=None, units="thz"):
... |
Save matplotlib plot to a file.
Args:
filename: Filename to write to.
img_format: Image format to use. Defaults to EPS.
ylim: Specifies the y-axis limits.
units: units for the frequencies. Accepted values thz, ev, mev, ha, cm-1, cm^-1.
def save_plot(self, filena... |
Get all ticks and labels for a band structure plot.
Returns:
A dict with 'distance': a list of distance at which ticks should
be set and 'label': a list of label for each of those ticks.
def get_ticks(self):
"""
Get all ticks and labels for a band structure plot.
... |
plot two band structure for comparison. One is in red the other in blue.
The two band structures need to be defined on the same symmetry lines!
and the distance between symmetry lines is
the one of the band structure used to build the PhononBSPlotter
Args:
another PhononBSPl... |
plot the Brillouin zone
def plot_brillouin(self):
"""
plot the Brillouin zone
"""
# get labels and lines
labels = {}
for q in self._bs.qpoints:
if q.label:
labels[q.label] = q.frac_coords
lines = []
for b in self._bs.branches... |
Plots a thermodynamic property for a generic function from a PhononDos instance.
Args:
func: the thermodynamic function to be used to calculate the property
temperatures: a list of temperatures
factor: a multiplicative factor applied to the thermodynamic property calculated.... |
Plots the constant volume specific heat C_v in a temperature range.
Args:
tmin: minimum temperature
tmax: maximum temperature
ntemp: number of steps
ylim: tuple specifying the y-axis limits.
kwargs: kwargs passed to the matplotlib function 'plot'.
... |
Plots the vibrational entrpy in a temperature range.
Args:
tmin: minimum temperature
tmax: maximum temperature
ntemp: number of steps
ylim: tuple specifying the y-axis limits.
kwargs: kwargs passed to the matplotlib function 'plot'.
Returns:
... |
Plots the vibrational internal energy in a temperature range.
Args:
tmin: minimum temperature
tmax: maximum temperature
ntemp: number of steps
ylim: tuple specifying the y-axis limits.
kwargs: kwargs passed to the matplotlib function 'plot'.
R... |
Plots the vibrational contribution to the Helmoltz free energy in a temperature range.
Args:
tmin: minimum temperature
tmax: maximum temperature
ntemp: number of steps
ylim: tuple specifying the y-axis limits.
kwargs: kwargs passed to the matplotlib f... |
Plots all the thermodynamic properties in a temperature range.
Args:
tmin: minimum temperature
tmax: maximum temperature
ntemp: number of steps
ylim: tuple specifying the y-axis limits.
kwargs: kwargs passed to the matplotlib function 'plot'.
... |
Create a dictionary representation of a PWInput object
Returns:
dict
def as_dict(self):
"""
Create a dictionary representation of a PWInput object
Returns:
dict
"""
pwinput_dict = {'structure': self.structure.as_dict(),
... |
Load a PWInput object from a dictionary.
Args:
pwinput_dict (dict): dictionary with PWInput data
Returns:
PWInput object
def from_dict(cls, pwinput_dict):
"""
Load a PWInput object from a dictionary.
Args:
pwinpu... |
Write the PWSCF input file.
Args:
filename (str): The string filename to output to.
def write_file(self, filename):
"""
Write the PWSCF input file.
Args:
filename (str): The string filename to output to.
"""
with open(filename, "w") as f:
... |
Reads an PWInput object from a string.
Args:
string (str): PWInput string
Returns:
PWInput object
def from_string(string):
"""
Reads an PWInput object from a string.
Args:
string (str): PWInput string
Returns:
PWInput o... |
Static helper method to convert PWINPUT parameters to proper type, e.g.,
integers, floats, etc.
Args:
key: PWINPUT parameter key
val: Actual value of PWINPUT parameter.
def proc_val(key, val):
"""
Static helper method to convert PWINPUT parameters to proper type... |
General pattern reading. Uses monty's regrep method. Takes the same
arguments.
Args:
patterns (dict): A dict of patterns, e.g.,
{"energy": r"energy\\(sigma->0\\)\\s+=\\s+([\\d\\-.]+)"}.
reverse (bool): Read files in reverse. Defaults to false. Useful for
... |
Print to the given stream the template of the :class:`QueueAdapter` of type `qtype`.
def show_qparams(qtype, stream=sys.stdout):
"""Print to the given stream the template of the :class:`QueueAdapter` of type `qtype`."""
for cls in all_subclasses(QueueAdapter):
if cls.QTYPE == qtype: return stream.write... |
Return the concrete :class:`QueueAdapter` class from a string.
Note that one can register a customized version with:
.. example::
from qadapters import SlurmAdapter
class MyAdapter(SlurmAdapter):
QTYPE = "myslurm"
# Add your customized code here
# Register you... |
Build and return a string with the command required to launch `executable` with the qadapter `qad`.
Args
qad: Qadapter instance.
executable (str): Executable name or path
stdin (str): Name of the file to be used as standard input. None means no redirection.
stdou... |
Convert an object into a OmpEnv
def as_ompenv(cls, obj):
"""Convert an object into a OmpEnv"""
if isinstance(obj, cls): return obj
if obj is None: return cls()
return cls(**obj) |
Provides a simple though not complete dict serialization of the object (OMP missing, not all limits are
kept in the dictionary, ... other things to be checked)
Raise:
`ValueError` if errors.
def as_dict(self):
"""
Provides a simple though not complete dict serialization of ... |
Check if the keys specified by the user in qparams are supported.
Raise:
`ValueError` if errors.
def validate_qparams(self):
"""
Check if the keys specified by the user in qparams are supported.
Raise:
`ValueError` if errors.
"""
# No validation... |
Save submission
def record_launch(self, queue_id): # retcode):
"""Save submission"""
self.launches.append(
AttrDict(queue_id=queue_id, mpi_procs=self.mpi_procs, omp_threads=self.omp_threads,
mem_per_proc=self.mem_per_proc, timelimit=self.timelimit))
return len(s... |
Validate the parameters of the run. Raises self.Error if invalid parameters.
def validate(self):
"""Validate the parameters of the run. Raises self.Error if invalid parameters."""
errors = []
app = errors.append
if not self.hint_cores >= self.mpi_procs * self.omp_threads >= self.min_co... |
True if the qadapter in principle is able to run the :class:`ParalConf` pconf
def can_run_pconf(self, pconf):
"""True if the qadapter in principle is able to run the :class:`ParalConf` pconf"""
if not self.hint_cores >= pconf.num_cores >= self.min_cores: return False
if not self.hw.can_use_omp_... |
Returns (num_nodes, mpi_per_node)
Aggressive: When Open MPI thinks that it is in an exactly- or under-subscribed mode
(i.e., the number of running processes is equal to or less than the number of available processors),
MPI processes will automatically run in aggressive mode, meaning that they w... |
Return substitution dict for replacements into the template
Subclasses may want to customize this method.
def get_subs_dict(self, qnodes=None):
"""
Return substitution dict for replacements into the template
Subclasses may want to customize this method.
"""
#d = self.qpa... |
Return a string with the options that are passed to the resource manager.
def _make_qheader(self, job_name, qout_path, qerr_path):
"""Return a string with the options that are passed to the resource manager."""
# get substitution dict for replacements into the template
subs_dict = self.get_subs... |
Returns a (multi-line) String representing the queue script, e.g. PBS script.
Uses the template_file along with internal parameters to create the script.
Args:
job_name: Name of the job.
launch_dir: (str) The directory the job will be launched in.
executable: String ... |
Public API: wraps the concrete implementation _submit_to_queue
Raises:
`self.MaxNumLaunchesError` if we have already tried to submit the job max_num_launches
`self.Error` if generic error
def submit_to_queue(self, script_file):
"""
Public API: wraps the concrete impleme... |
returns the number of jobs in the queue, probably using subprocess or shutil to
call a command like 'qstat'. returns None when the number of jobs cannot be determined.
Args:
username: (str) the username of the jobs to count (default is to autodetect)
def get_njobs_in_queue(self, username=N... |
Method to increase the amount of memory asked for, by factor.
Return: new memory if success, 0 if memory cannot be increased.
def more_mem_per_proc(self, factor=1):
"""
Method to increase the amount of memory asked for, by factor.
Return: new memory if success, 0 if memory cannot be inc... |
Method to increase the amount of memory overheaded asked for the master node.
Return: new master memory overhead if success, 0 if it cannot be increased.
def more_master_mem_overhead(self, mem_increase_mb=1000):
"""
Method to increase the amount of memory overheaded asked for the master node.
... |
Method to increase the number of MPI procs.
Return: new number of processors if success, 0 if processors cannot be increased.
def more_cores(self, factor=1):
"""
Method to increase the number of MPI procs.
Return: new number of processors if success, 0 if processors cannot be increased.... |
Method to increase the wall time
def more_time(self, factor=1):
"""
Method to increase the wall time
"""
base_increase = int(self.timelimit_hard / 10)
new_time = self.timelimit + base_increase*factor
print('qadapter: trying to increase time')
if new_time < self.... |
Set the memory per process in megabytes
def set_mem_per_proc(self, mem_mb):
"""Set the memory per process in megabytes"""
super().set_mem_per_proc(mem_mb)
self.qparams["mem_per_cpu"] = self.mem_per_proc |
Select is not the most intuitive command. For more info see:
* http://www.cardiff.ac.uk/arcca/services/equipment/User-Guide/pbs.html
* https://portal.ivec.org/docs/Supercomputers/PBS_Pro
def get_select(self, ret_dict=False, qnodes=None, memory_policy=None):
"""
Select is not th... |
Submit a job script to the queue.
def _submit_to_queue(self, script_file):
"""Submit a job script to the queue."""
if sys.version_info[0] < 3:
process = Popen(['qsub', script_file], stdout=PIPE, stderr=PIPE)
else:
# need string not bytes so must use universal_newlines
... |
Set the number of CPUs used for MPI.
def set_mpi_procs(self, mpi_procs):
"""Set the number of CPUs used for MPI."""
QueueAdapter.set_mpi_procs(self, mpi_procs)
num_nodes, rest_cores = self.hw.divmod_node(mpi_procs, omp_threads=1)
if num_nodes == 0:
self.qparams["nodes"] = 1... |
Set the memory per process in megabytes
def set_mem_per_proc(self, mem_mb):
"""Set the memory per process in megabytes"""
super().set_mem_per_proc(mem_mb)
self.qparams["mem_per_slot"] = str(int(self.mem_per_proc)) + "M" |
Limits are specified with the format hh:mm:ss (hours:minutes:seconds)
def set_timelimit(self, timelimit):
"""Limits are specified with the format hh:mm:ss (hours:minutes:seconds)"""
super().set_timelimit(timelimit)
self.qparams["wall_clock_limit"] = qu.time2loadlever(timelimit) |
Return (bg_size, ranks_per_node) from mpi_procs and omp_threads.
def bgsize_rankspernode(self):
"""Return (bg_size, ranks_per_node) from mpi_procs and omp_threads."""
bg_size = int(math.ceil((self.mpi_procs * self.omp_threads)/ self.hw.cores_per_node))
bg_size = max(bg_size, 32) # TODO hardcoded
ra... |
[a[0], b[0], ... , a[1], b[1], ..., a[n], b[n] ...]
>>> alternate([1,4], [2,5], [3,6])
[1, 2, 3, 4, 5, 6]
def alternate(*iterables):
"""
[a[0], b[0], ... , a[1], b[1], ..., a[n], b[n] ...]
>>> alternate([1,4], [2,5], [3,6])
[1, 2, 3, 4, 5, 6]
"""
items = []
for tup in zip(*iterables... |
Scan directory tree starting from top, look for files with extension `ext` and
parse timing data.
Return: (parser, paths, okfiles)
where `parser` is the new object, `paths` is the list of files found and `okfiles`
is the list of files that have been parsed successfully.
... |
Read and parse a filename or a list of filenames.
Files that cannot be opened are ignored. A single filename may also be given.
Return: list of successfully read files.
def parse(self, filenames):
"""
Read and parse a filename or a list of filenames.
Files that cannot be opened... |
Parse the TIMER section
def _read(self, fh, fname):
"""Parse the TIMER section"""
if fname in self._timers:
raise self.Error("Cannot overwrite timer associated to: %s " % fname)
def parse_line(line):
"""Parse single line."""
name, vals = line[:25], line[25:]... |
Return the list of timers associated to the given `filename` and MPI rank mpi_rank.
def timers(self, filename=None, mpi_rank="0"):
"""
Return the list of timers associated to the given `filename` and MPI rank mpi_rank.
"""
if filename is not None:
return [self._timers[filena... |
Return the names of sections ordered by ordkey.
For the time being, the values are taken from the first timer.
def section_names(self, ordkey="wall_time"):
"""
Return the names of sections ordered by ordkey.
For the time being, the values are taken from the first timer.
"""
... |
Return the list of sections stored in self.timers() given `section_name`
A fake section is returned if the timer does not have section_name.
def get_sections(self, section_name):
"""
Return the list of sections stored in self.timers() given `section_name`
A fake section is returned if t... |
Analyze the parallel efficiency.
Return:
:class:`ParallelEfficiency` object.
def pefficiency(self):
"""
Analyze the parallel efficiency.
Return:
:class:`ParallelEfficiency` object.
"""
timers = self.timers()
# Number of CPUs employed in... |
Return pandas DataFrame with the most important results stored in the timers.
def summarize(self, **kwargs):
"""
Return pandas DataFrame with the most important results stored in the timers.
"""
import pandas as pd
colnames = ["fname", "wall_time", "cpu_time", "mpi_nprocs", "omp... |
Plot the parallel efficiency
Args:
key: Parallel efficiency is computed using the wall_time.
what: Specifies what to plot: `good` for sections with good parallel efficiency.
`bad` for sections with bad efficiency. Options can be concatenated with `+`.
nmax: M... |
Plot pie charts of the different timers.
Args:
key: Keyword used to extract data from timers.
minfract: Don't show sections whose relative weight is less that minfract.
Returns:
`matplotlib` figure
def plot_pie(self, key="wall_time", minfract=0.05, **kwargs):
... |
Plot stacked histogram of the different timers.
Args:
key: Keyword used to extract data from the timers. Only the first `nmax`
sections with largest value are show.
mmax: Maximum nuber of sections to show. Other entries are grouped together
in the `others... |
Call all plot methods provided by the parser.
def plot_all(self, show=True, **kwargs):
"""
Call all plot methods provided by the parser.
"""
figs = []; app = figs.append
app(self.plot_stacked_hist(show=show))
app(self.plot_efficiency(show=show))
app(self.plot_pie... |
Return a string with data in CSV format
def to_csvline(self, with_header=False):
"""Return a string with data in CSV format"""
string = ""
if with_header:
string += "# " + " ".join(at for at in AbinitTimerSection.FIELDS) + "\n"
string += ", ".join(str(v) for v in self.to_t... |
Write data on file fileobj using CSV format.
def to_csv(self, fileobj=sys.stdout):
"""Write data on file fileobj using CSV format."""
openclose = is_string(fileobj)
if openclose:
fileobj = open(fileobj, "w")
for idx, section in enumerate(self.sections):
fileobj... |
Return a table (list of lists) with timer data
def to_table(self, sort_key="wall_time", stop=None):
"""Return a table (list of lists) with timer data"""
table = [list(AbinitTimerSection.FIELDS), ]
ord_sections = self.order_sections(sort_key)
if stop is not None:
ord_section... |
Return a pandas DataFrame with entries sorted according to `sort_key`.
def get_dataframe(self, sort_key="wall_time", **kwargs):
"""
Return a pandas DataFrame with entries sorted according to `sort_key`.
"""
import pandas as pd
frame = pd.DataFrame(columns=AbinitTimerSection.FIEL... |
Return a list of values associated to a particular list of keys.
def get_values(self, keys):
"""
Return a list of values associated to a particular list of keys.
"""
if is_string(keys):
return [s.__dict__[keys] for s in self.sections]
else:
values = []
... |
Select the entries whose value[key] is >= minval or whose fraction[key] is >= minfract
Return the names of the sections and the corresponding values.
def names_and_values(self, key, minval=None, minfract=None, sorted=True):
"""
Select the entries whose value[key] is >= minval or whose fraction[... |
Sort sections according to the value of key.
def order_sections(self, key, reverse=True):
"""Sort sections according to the value of key."""
fsort = lambda s: s.__dict__[key]
return sorted(self.sections, key=fsort, reverse=reverse) |
Plot pie chart for this timer.
Args:
key: Keyword used to extract data from the timer.
minfract: Don't show sections whose relative weight is less that minfract.
ax: matplotlib :class:`Axes` or None if a new figure should be created.
Returns:
`matplotlib... |
Returns ASE Atoms object from pymatgen structure.
Args:
structure: pymatgen.core.structure.Structure
**kwargs: other keyword args to pass into the ASE Atoms constructor
Returns:
ASE Atoms object
def get_atoms(structure, **kwargs):
"""
Returns ASE At... |
Returns pymatgen structure from ASE Atoms.
Args:
atoms: ASE Atoms object
cls: The Structure class to instantiate (defaults to pymatgen structure)
Returns:
Equivalent pymatgen.core.structure.Structure
def get_structure(atoms, cls=None):
"""
Returns p... |
Returns the densities, but with a Gaussian smearing of
std dev sigma applied.
Args:
sigma: Std dev of Gaussian smearing function.
Returns:
Gaussian-smeared densities.
def get_smeared_densities(self, sigma):
"""
Returns the densities, but with a Gaussian... |
Json-serializable dict representation of PhononDos.
def as_dict(self):
"""
Json-serializable dict representation of PhononDos.
"""
return {"@module": self.__class__.__module__,
"@class": self.__class__.__name__,
"frequencies": list(self.frequencies),
... |
Index of the first point for which the freqencies are equal or greater than zero.
def ind_zero_freq(self):
"""
Index of the first point for which the freqencies are equal or greater than zero.
"""
ind = np.searchsorted(self.frequencies, 0)
if ind >= len(self.frequencies):
... |
Constant volume specific heat C_v at temperature T obtained from the integration of the DOS.
Only positive frequencies will be used.
Result in J/(K*mol-c). A mol-c is the abbreviation of a mole-cell, that is, the number
of Avogadro times the atoms in a unit cell. To compare with experimental dat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.