schrodinger.application.matsci.nano.surfaces_interfaces_mod module¶
Classes and functions to enumerate surfaces and interfaces.
Copyright Schrodinger, LLC. All rights reserved.
-
schrodinger.application.matsci.nano.surfaces_interfaces_mod.get_base_names(ref_xtal_asu, ref_base_name_in=None, ads_xtal_asu=None, ads_base_name_in=None)¶ Return the reference, adsorption, and final combined base names.
Parameters: - ref_xtal_asu (str) – reference xtal input file
- ref_base_name_in (str or None) – reference base name or None if none has been given
- ads_xtal_asu (str or None) – adsorption xtal input file or None if none has been given
- ads_base_name_in (str or None) – adsorption base name or None if none has been given
Return type: str, str or None, str
Returns: reference, adsorption, and final combined base names, the adsorption base name will be None if no adsorption xtal asu is provided
-
class
schrodinger.application.matsci.nano.surfaces_interfaces_mod.ParserWrapper(scriptname, description)¶ Bases:
objectManages the argparse module to parse user command line arguments.
-
__init__(scriptname, description)¶ Create a ParserWrapper instance and process it.
Parameters: - scriptname (str) – name of this script
- description (str) – description of this script
-
loadIt()¶ Load ParserWrapper with options.
-
parseArgs(args)¶ Parse the command line arguments.
Parameters: args (tuple) – command line arguments
-
-
schrodinger.application.matsci.nano.surfaces_interfaces_mod.get_word_list_from_file(afile)¶ Return a list of words from the given file.
Parameters: afile (str) – file name Return type: list Returns: contains words from the given file
-
schrodinger.application.matsci.nano.surfaces_interfaces_mod.get_surface_kwargs(options_file)¶ Return a dictionary of surface options from the given options file.
Parameters: options_file (str or None) – contains options for the surface build or None if there are none in which case the defaults are used Return type: dict Returns: contains options for the surface build
-
schrodinger.application.matsci.nano.surfaces_interfaces_mod.get_interface_kwargs(options_file)¶ Return a dictionary of interface options from the given options file.
Parameters: options_file (str or None) – contains options for the interface build or None if there are none in which case the defaults are used Return type: dict Returns: contains options for the interface build
-
class
schrodinger.application.matsci.nano.surfaces_interfaces_mod.Surfaces(xtal_asu, surface_kwargs=None, logger=None)¶ Bases:
objectManage the enumeration of surfaces.
-
__init__(xtal_asu, surface_kwargs=None, logger=None)¶ Create an instance.
Parameters: - xtal_asu (
schrodinger.structure.Structure) – the crystalline ASU from which to create surfaces - surface_kwargs (None or dict) – kwargs for the surface build or None if there are none in which case the defaults will be used
- logger (logging.Logger or None) – output logger or None if there isn’t one
- xtal_asu (
-
getHKLIndices()¶ Collect and return all hkl Miller index triples for this surface enumeration and sort them according to increasing l then k then h.
Raises: ValueError – if there are zero valid hkl triples Return type: list Returns: contains sorted tuples of hkl triples
-
getSurface(cell, hkl, logger=None)¶ Build and return a slab.Surface.
Parameters: - cell (
schrodinger.structure.Structure) – a cell - hkl (tuple) – a triple of Miller indices
- logger (logging.Logger or None) – output logger or None if there isn’t one
Return type: Returns: the surface object
- cell (
-
logParams()¶ Log the parameters.
-
getXtalCell()¶ Build and return the crystal cell from which surfaces will be created.
Return type: schrodinger.structure.StructureReturns: the crystal cell
-
getSurfaces()¶ Build and return the slab.Surface objects for all surfaces.
Return type: list of slab.Surface Returns: contains surface objects
-
writeSurfaces(file_name)¶ Write surfaces to a Maestro file with the given file name.
Parameters: file_name (str) – file name of the Maestro file
-
runIt()¶ Create the surfaces.
-
-
class
schrodinger.application.matsci.nano.surfaces_interfaces_mod.Interfaces(ref_surfaces, ads_surfaces, interface_kwargs=None, logger=None)¶ Bases:
objectManage the enumeration of interfaces.
-
__init__(ref_surfaces, ads_surfaces, interface_kwargs=None, logger=None)¶ Create an instance.
Parameters: - ref_surfaces (list of
schrodinger.structure.Structure) – reference surface ASUs from which interfaces will be created - ads_surfaces (list of
schrodinger.structure.Structure) – adsorption surface ASUs from which interfaces will be created - interface_kwargs (None or dict) – kwargs for the interface builds or None if there are none in which case the defaults will be used
- logger (logging.Logger or None) – output logger or None if there isn’t one
- ref_surfaces (list of
-
logParams()¶ Log the parameters.
-
getInterface(ref_surface, ads_surface)¶ Build and return a interface_mod.Interface.
Parameters: - ref_surface (
schrodinger.structure.Structure) – reference surface ASU - ads_surface (
schrodinger.structure.Structure) – adsorption surface ASU
Return type: Returns: the interface object
- ref_surface (
-
getInterfaces()¶ Build and return the interface_mod.Interface objects for all interfaces.
Return type: list of interface_mod.Interface Returns: contains interface objects
-
writeInterfaces(file_name)¶ Write interfaces to a Maestro file with the given file name.
Parameters: file_name (str) – file name of the Maestro file
-
runIt()¶ Create the interfaces.
-
-
class
schrodinger.application.matsci.nano.surfaces_interfaces_mod.SurfacesInterfaces(ref_xtal_asu, ref_surface_kwargs=None, ads_xtal_asu=None, ads_surface_kwargs=None, interface_kwargs=None, logger=None)¶ Bases:
objectManage the enumeration of surfaces and interfaces.
-
__init__(ref_xtal_asu, ref_surface_kwargs=None, ads_xtal_asu=None, ads_surface_kwargs=None, interface_kwargs=None, logger=None)¶ Create an instance.
Parameters: - ref_xtal_asu (
schrodinger.structure.Structure) – the crystalline ASU from which to create reference surfaces - ref_surface_kwargs (None or dict) – kwargs for the reference surface build or None if there are none in which case the defaults will be used
- ads_xtal_asu (None or
schrodinger.structure.Structure) – the crystalline ASU from which to create adsorption surfaces or None if interfaces are not needed - ads_surface_kwargs (None or dict) – kwargs for the adsorption surface build or None if there are none in which case the defaults will be used
- interface_kwargs (None or dict) – kwargs for the interface build or None if there are none in which case the defaults will be used
- logger (logging.Logger or None) – output logger or None if there isn’t one
- ref_xtal_asu (
-
checkInput()¶ Check input.
Raises: ValueError – if any input crystal ASU is missing any lattice parameter structure properties
-
createSurfaces()¶ Create the surfaces.
Raises: ValueError – if something goes wrong with either surface build
-
createInterfaces()¶ Create the interfaces.
-
runIt()¶ Create the surfaces and interfaces.
-