Pseudopotential Module#
- class nexus.pseudopotential.PseudoFile(filepath=None)[source]#
Bases:
DevBaseMethods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
read
select_random
serial
set
set_optional
set_path
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
- class nexus.pseudopotential.gamessPPFile(filepath=None)[source]#
Bases:
PseudoFileMethods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
read
select_random
serial
set
set_optional
set_path
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
- class nexus.pseudopotential.Pseudopotentials(*pseudopotentials)[source]#
Bases:
DevBaseMethods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
addpp
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
pseudos_by_atom
random_key
readpp
select_random
serial
set
set_optional
set_path
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
- class nexus.pseudopotential.PPset[source]#
Bases:
DevBaseMethods
__call__(label, **code_pps)Call self as a function.
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()get(label, code, system)keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
get_optional
get_path
get_required
has_set
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
select_random
serial
set
set_optional
set_path
shallow_copy
supports_code
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
- instance_counter = 1#
- known_codes = {'gamess', 'pwscf', 'qmcpack', 'vasp'}#
- default_extensions = gamess list pwscf list qmcpack list vasp list #
- class nexus.pseudopotential.Pseudopotential(filepath=None, format=None)[source]#
Bases:
DevBase- Attributes:
- formats
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
convert
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
plot
random_key
read
read_text
select_random
serial
set
set_optional
set_path
shallow_copy
to_dict
to_obj
transfer_core_from
transfer_from
transfer_to
tree
tuple
values
write
write_text
- requires_format = False#
- formats = None#
- class nexus.pseudopotential.SemilocalPP(filepath=None, format=None, name=None, src=None)[source]#
Bases:
PseudopotentialMethods
add_L2(v)add_local(l, v)add_nonlocal(l, v)append(value)change_local(local)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
evaluate_L2([r, rpow, rmin, rret])evaluate_channel([r, l, rpow, rmin, rret, ...])evaluate_comp(r, l, vcomp[, rpow, rmin, rret])evaluate_comp_rV(r, l, vcomp)evaluate_component([r, l, rpow, rmin, rret, ...])evaluate_local([r, rpow, rmin, rret])evaluate_nonlocal([r, l, rpow, rmin, rret])expand_L2(lmax)first()get_L2()keys()list(*keys)numeric_channel([l, rmin, rmax, npts, rpow, ...])open_log(filepath)remove_component(l[, guard])remove_nonlocal([l])save([fpath])set_channel(l, v)set_component(l, v[, guard])sorted_keys()transfer_core_from(other)warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
assert_numeric
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
convert
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
find_r_rng
find_rcut
get
get_component
get_local
get_nonlocal
get_optional
get_path
get_required
has_L2
has_component
has_local
has_nonlocal
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
plot
plot_L2
plot_channels
plot_components
plot_nonlocal_polar
plot_positive_definite
random_key
read
read_text
select_random
serial
set
set_optional
set_path
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
update_rcut
values
write
write_casino
write_qmcpack
write_text
- l_channels = ('s', 'p', 'd', 'f', 'g', 'h', 'i', 'k', 'l', 'm', 'n', 'o', 'q', 'r', 't', 'u', 'v', 'w', 'x', 'y', 'z')#
- channel_colors = L2 str d str f str g str h str i str p str s str #
- numeric = False#
- interpolatable = True#
- formats = ['qmcpack', 'casino']#
- channel_indices = L2 int d int f int g int h int i int k int l int m int n int o int p int q int r int s int t int u int v int w int x int y int z int #
- evaluate_channel(r=None, l=None, rpow=0, rmin=0, rret=False, with_local=True, with_L2=True)[source]#
- numeric_channel(l=None, rmin=0.0, rmax=10.0, npts=10001, rpow=0, with_local=True, with_L2=True)[source]#
- plot(r=None, show=True, fig=True, linestyle='-', channels=None, with_local=False, rmin=0.01, rmax=5.0, title=None, metric=None, color=None)[source]#
- plot_components(r=None, show=True, fig=True, linestyle='-', rmin=0.01, rmax=5.0, title=None, metric=None, color=None, rpow=0)[source]#
- plot_channels(r=None, channels=None, show=True, fig=True, linestyle='-', rmin=0.01, rmax=5.0, title=None, metric=None, color=None, rpow=0, with_local=True, with_L2=True)[source]#
- plot_positive_definite(r=None, show=True, fig=True, linestyle='-', rmin=0.01, rmax=5.0, title=None, color='k')[source]#
- plot_L2(show=True, fig=True, r=None, rmin=0.01, rmax=5.0, linestyle='-', title=None, color=None)[source]#
- plot_nonlocal_polar(show=True, lmax=10, rmin=0.01, rmax=2.0, nr=100, nt=100, levels=100, label='')[source]#
- c = 'z'#
- i = 20#
- class nexus.pseudopotential.GaussianPP(filepath=None, format=None, name=None, src=None)[source]#
Bases:
SemilocalPPMethods
add_L2(v)add_local(l, v)add_nonlocal(l, v)angular_channels()append(value)append_to_component(l, coeff, expon, rpow)This function is used to append a term to a Gaussian ECP component.
change_local(local)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
evaluate_L2([r, rpow, rmin, rret])evaluate_channel([r, l, rpow, rmin, rret, ...])evaluate_comp(r, l, vcomp[, rpow, rmin, rret])evaluate_component([r, l, rpow, rmin, rret, ...])evaluate_local([r, rpow, rmin, rret])evaluate_nonlocal([r, l, rpow, rmin, rret])expand_L2(lmax)first()get_L2()get_unboundedness(db, dbs)This function quantifies how unbounded a truncated L2 potential is.
Determine if the Gaussian ECP's channels follow an L2 relationship.
keys()list(*keys)make_L2_bounded(db, dbs[, exps0, plot])For a truncated L2 potential, this function constructs a correction to VL2 in the unbounded region.
numeric_channel([l, rmin, rmax, npts, rpow, ...])open_log(filepath)ppconvert(outfile, ref[, extra])promote_local()read_text(text[, format, filepath])remove_L2()remove_component(l[, guard])remove_local()remove_nonlocal([l])save([fpath])scale_component(l, scale)This function is used to scale a Gaussian ECP component by a factor.
set_channel(l, v)set_component(l, v[, guard])simplify()This function simplifies the Gaussian ECP.
sorted_keys()transfer_core_from(other)transform_to_truncated_L2([keep, lmax, ...])This function transforms a Gaussian ECP into a truncated L2 form, i.e., a form for which all channels follow an L2 relationship.
warn(msg[, indent])Warning from inside a Nexus class.
write_basis([filepath, format])write_text([format, occ])add
add_optional
assert_numeric
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
convert
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
evaluate_comp_rV
extract
extract_optional
find_r_rng
find_rcut
get
get_component
get_local
get_nonlocal
get_optional
get_path
get_required
has_L2
has_component
has_local
has_nonlocal
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
plot
plot_L2
plot_channels
plot_components
plot_nonlocal_polar
plot_positive_definite
process_float
random_key
read
select_random
serial
set
set_basis
set_optional
set_path
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
update_rcut
values
write
write_casino
write_qmcpack
- requires_format = True#
- formats = ['qmcpack', 'casino', 'gaussian', 'gamess', 'crystal', 'numhf']#
- append_to_component(l, coeff, expon, rpow)[source]#
This function is used to append a term to a Gaussian ECP component. l: the angular ccomponent that the Gaussian term will be appended to coeff, expon, rpow: the coefficient, exponent, and r-power of the Gaussian term
- scale_component(l, scale)[source]#
This function is used to scale a Gaussian ECP component by a factor. l: the angular component that is scaled. scale: the scaling factor
- simplify()[source]#
This function simplifies the Gaussian ECP.
The simplificactions are as follows:
Remove all terms with coefficients that are equal to zero – unless only one term exists.
Within each component, look for terms that have matching exponents and r-powers, if any are present, then sum their coefficicents to make a single term. If the coefficients sum to zero, then remove the terms (unless that leaves the component empty)
- get_unboundedness(db, dbs)[source]#
This function quantifies how unbounded a truncated L2 potential is. This is done by constructing a function that corrects VL2 in the unbounded region. Then integrating the difference between VL2 and the correcting function.
- make_L2_bounded(db, dbs, exps0=None, plot=False)[source]#
For a truncated L2 potential, this function constructs a correction to VL2 in the unbounded region. Then the correction is fit to a set of Gaussian primitives that are provided in the array ‘exps0’. The fitted Gaussian primitives are then appended to the ECP, resulting in a bounded truncated L2 potential.
- transform_to_truncated_L2(keep=None, lmax=None, outfile=None, inplace=True)[source]#
This function transforms a Gaussian ECP into a truncated L2 form, i.e., a form for which all channels follow an L2 relationship. For a semi-local ECP, this transformation can have a significant negative impact on transferability. For an ECP that is already in a trucnated L2 form, the transformation has no affect.
- class nexus.pseudopotential.QmcpackPP(filepath=None, format=None, name=None, src=None)[source]#
Bases:
SemilocalPPMethods
add_L2(v)add_local(l, v)add_nonlocal(l, v)angular_channels()append(value)change_local(local)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
evaluate_L2([r, rpow, rmin, rret])evaluate_channel([r, l, rpow, rmin, rret, ...])evaluate_comp(r, l, vcomp[, rpow, rmin, rret])evaluate_component([r, l, rpow, rmin, rret, ...])evaluate_local([r, rpow, rmin, rret])evaluate_nonlocal([r, l, rpow, rmin, rret])expand_L2(lmax)first()get_L2()keys()list(*keys)numeric_channel([l, rmin, rmax, npts, rpow, ...])open_log(filepath)promote_local()remove_L2()remove_component(l[, guard])remove_local()remove_nonlocal([l])save([fpath])set_channel(l, v)set_component(l, v[, guard])sorted_keys()transfer_core_from(other)warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
assert_numeric
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
convert
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
evaluate_comp_rV
extract
extract_optional
find_r_rng
find_rcut
get
get_component
get_local
get_nonlocal
get_optional
get_path
get_required
has_L2
has_component
has_local
has_nonlocal
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
plot
plot_L2
plot_channels
plot_components
plot_nonlocal_polar
plot_positive_definite
random_key
read
read_text
select_random
serial
set
set_optional
set_path
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
update_rcut
v_at_zero
values
write
write_casino
write_qmcpack
write_text
- requires_format = False#
- numeric = True#
- interpolatable = False#
- class nexus.pseudopotential.CasinoPP(filepath=None, format=None, name=None, src=None)[source]#
Bases:
SemilocalPPMethods
add_L2(v)add_local(l, v)add_nonlocal(l, v)angular_channels()append(value)change_local(local)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
evaluate_L2([r, rpow, rmin, rret])evaluate_channel([r, l, rpow, rmin, rret, ...])evaluate_comp(r, l, vcomp[, rpow, rmin, rret])evaluate_component([r, l, rpow, rmin, rret, ...])evaluate_local([r, rpow, rmin, rret])evaluate_nonlocal([r, l, rpow, rmin, rret])expand_L2(lmax)first()get_L2()keys()list(*keys)numeric_channel([l, rmin, rmax, npts, rpow, ...])open_log(filepath)promote_local()remove_L2()remove_component(l[, guard])remove_local()remove_nonlocal([l])save([fpath])set_channel(l, v)set_component(l, v[, guard])sorted_keys()transfer_core_from(other)warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
assert_numeric
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
convert
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
evaluate_comp_rV
extract
extract_optional
find_r_rng
find_rcut
get
get_component
get_local
get_nonlocal
get_optional
get_path
get_required
has_L2
has_component
has_local
has_nonlocal
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
plot
plot_L2
plot_channels
plot_components
plot_nonlocal_polar
plot_positive_definite
random_key
read
read_text
select_random
serial
set
set_optional
set_path
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
update_rcut
values
write
write_casino
write_qmcpack
write_text
- requires_format = False#
- numeric = True#
- interpolatable = False#
- unitmap = {'ev': 'eV', 'hartree': 'Ha', 'rydberg': 'Ry'}#