schrodinger.application.matsci.nano.slab module¶
Classes and functions to create surface models.
Copyright Schrodinger, LLC. All rights reserved.
-
class
schrodinger.application.matsci.nano.slab.
ParserWrapper
(scriptname, description)[source]¶ Bases:
object
Manages the argparse module to parse user command line arguments.
-
class
schrodinger.application.matsci.nano.slab.
Surface
(cell, h_index=1, k_index=1, l_index=0, normal_c=False, bottom=0.0, slab_thickness=1.0, vacuum_thickness=2.0, terminal_fragment='none', overlap_threshold=0.1, do_bonding=None, logger=None)[source]¶ Bases:
object
Manage the building of a surface model.
-
NUMDIGITS
= 3¶
-
MSGWIDTH
= 100¶
-
__init__
(cell, h_index=1, k_index=1, l_index=0, normal_c=False, bottom=0.0, slab_thickness=1.0, vacuum_thickness=2.0, terminal_fragment='none', overlap_threshold=0.1, do_bonding=None, logger=None)[source]¶ Create an instance.
- Parameters
cell (
schrodinger.structure.Structure
) – the crystalline cell used to define the surface modelh_index (int) – the Miller h-index of the crystal plane to expose
k_index (int) – the Miller k-index of the crystal plane to expose
l_index (int) – the Miller l-index of the crystal plane to expose
bottom (float or None) – the distance along the plane normal in fractional coordinates to serve as the bottom of the surface model
slab_thickness (float or None) – thickness of the crystalline slab along the plane normal in fractional coordinates
vacuum_thickness (float or None) – thickness of the vacuum layer along the plane normal in fractional coordinates
terminal_fragment (str) – the fragment by which to terminate the surface
overlap_threshold (float) – (Ang) distance used to define overlapping atoms
do_bonding (bool or None) – whether to do the bonding, i.e. both connecting atoms and assigning bond orders, if None it is determined from the other input
logger (logging.Logger) – output logger
-
pruneIt
()[source]¶ Prune the slab cell.
- Raise
ValueError if the slab model has zero atoms
- Return type
dict
- Returns
contains bonding pairs that need termination, keys are outside atom indices, values are inside atom indices
-
-
schrodinger.application.matsci.nano.slab.
get_hkl
(astructure)[source]¶ Return an hkl Miller index triple for the given structure. If any of the structure properties are missing then by convention return (0, 0, 1).
- Parameters
astructure (
schrodinger.structure.Structure
) – the structure for which you want the Miller indices- Return type
tuple
- Returns
hkl Miller index triple
-
schrodinger.application.matsci.nano.slab.
set_hkl
(astructure, hkl)[source]¶ Set hkl Miller indices to a given structure.
- Parameters
astructure (
schrodinger.structure.Structure
) – the structure for which you want the Miller indiceshkl (list) – hkl Miller indices
-
schrodinger.application.matsci.nano.slab.
maestro_rotate_cell
(astructure, origin, a_vec, b_vec, c_vec)[source]¶ Rotate the cell for proper Maestro view.
- Parameters
astructure (
schrodinger.structure.Structure
) – the structure that you want rotatedorigin (numpy.array) – the origin
a_vec (numpy.array) – the a lattice vector
b_vec (numpy.array) – the b lattice vector
c_vec (numpy.array) – the c lattice vector
- Return type
schrodinger.structure.Structure
and four numpy.array- Returns
rotated structure and vectors