schrodinger.application.matsci.nano.sheet module¶
Classes and functions for making honeycomb nanosheets.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.matsci.nano.sheet.CheckInput¶
Bases:
schrodinger.application.matsci.nano.check.CheckInput
Check user input.
- checkAll(element1, element2, bondlength, ncell1, edgetype1, ncell2, edgetype2, no_double_bonds, termfrag, min_term_frags, bilayersep, nbilayers, stacktype, bilayershift, logger=None, is_coarse_grain=False)¶
Manage all checks.
- Parameters
element1 (str) – elemental symbol of the first atom
element2 (str) – elemental symbol of the second atom
bondlength (float) – bond length between the first and second atoms in Angstrom
ncell1 (int) – number of cells along lattice side 1
edgetype1 (str) – type of edge for lattice side 1
ncell2 (int) – number of cells along lattice side 2
edgetype2 (str) – type of edge for lattice side 2
no_double_bonds (bool) – disable the formation of double bonds
termfrag (str) – terminate the lattice with a given fragment
min_term_frags (bool) – minimize the geometry of terminating fragments
bilayersep (float) – bilayer separation
nbilayers (int) – number of bilayers
stacktype (str) – bilayer stacking type
bilayershift (float) – offset of bilayers in terms of the number of unit cells
logger (logging.getLogger) – output logger
is_coarse_grain (bool) – Whether a coarse grain structure is being created
- class schrodinger.application.matsci.nano.sheet.SymmetryEquiv(element, genvec, indicies, is_coarse_grain=False)¶
Bases:
object
Manage symmetry equivalent positions in the unit cell.
- __init__(element, genvec, indicies, is_coarse_grain=False)¶
Create an instance.
- Parameters
element (str) – atom for this symmetry type
genvec (numpy.array) – vector to generate symmetry equivalent positions
indicies (list of ints) – atom indicies to use for the symmetry equivalent atoms
is_coarse_grain (bool) – Whether a coarse grain structure is being created
- generateSymmetryEquiv()¶
Generate symmetry equivalent positions in the unit cell.
- class schrodinger.application.matsci.nano.sheet.HoneycombUnitCell(element1, element2, bondlength, is_coarse_grain=False)¶
Bases:
object
Create a unit cell of a honeycomb lattice. The unit cell will be a regular hexagon according to the following coordinate system:
----------------------------------------- | Y | | -------------------- | | / 6 5 \ | | / \ | | / \ | | / \ | | / \ | | / \ | | | 1 O 4 | X | | \ / | | \ / | | \ / | | \ / | | \ / | | \ 2 3 / | | -------------------- | -----------------------------------------
The hexagon will be centered on the origin O where vec(X, O) and vec(Y, O) are the X- and Y-axes and the Z-coordinate is zero. All edge lengths are equivalent and internal small triangles, i.e. triangle(1, O, 2) are equilateral. The following angles will be important: angle(1, 2, 3) = 120 degrees, angle(1, 2, O) = 60 degrees, and angle(1, 2, 6) = 30 degrees. In general the asymmetric unit will contain two atoms. The symmetry operation is C3 and thus symmetry equivalent positions fall into two sets, i.e. [1, 3, 5] and [2, 4, 6]. This unit cell will have single bonds assigned.
- ANGLELARGE = 2.0943951023931953¶
- ANGLEMEDIUM = 1.0471975511965976¶
- ANGLESMALL = 0.5235987755982988¶
- NUMATOMS = 6¶
- NUM_EQUIV_SETS = 2¶
- NUM_SYM_ATOMS = 3¶
- SYMATOMS = [[1, 3, 5], [2, 4, 6]]¶
- UNITCELLINDEX = 'i_matsci_Unit_Cell_Index'¶
- __init__(element1, element2, bondlength, is_coarse_grain=False)¶
Create an instance.
- Parameters
element1 (str) – elemental symbol of the first atom
element2 (str) – elemental symbol of the second atom
bondlength (float) – bond length between the first and second atoms in Angstrom
is_coarse_grain (bool) – Whether a coarse grain structure is being created
- getAsymmetricUnit()¶
Return two vectors to the atoms in the asymmetric unit.
- Return type
numpy.array, numpy.array
- Returns
asupos1, asupos2, positions of the two atoms in the asymmetric unit
- getStructure(symgroup1, symgroup2)¶
Create Structure for the unit cell.
- Parameters
symgroup1 (SymmetryEquiv) – first equivalent group
symgroup2 (SymmetryEquiv) – second equivalent group
- Return type
- Returns
unitcell, structure for the unit cell
- setAtomProps()¶
Create structure.atom properties for later use.
- buildUnitCell()¶
Build the unit cell.
- class schrodinger.application.matsci.nano.sheet.NeighborType(edgetype, bondingatoms)¶
Bases:
object
Manage the properties of a neighbor type.
- __init__(edgetype, bondingatoms)¶
Create an instance.
- Parameters
edgetype (str) – neighbor connection type
bondingatoms (list of ints) – bonding atom indices, in unit cell numbering, of the neighbor
- class schrodinger.application.matsci.nano.sheet.Grow(edgetype1, edgetype2, ncell1, ncell2)¶
Bases:
object
Manage the details of how to attach cells to the lattice of the desired shape. Most of this class is really just to manage grow parameters which are derived by applying the symmetry operations on a set of basic grow parameters given below.
- TERMINDICIES = [1, 2, 6]¶
- GROWINDICIES = [3, 4, 5]¶
- ALLINDICIES = [1, 2, 3, 4, 5, 6]¶
- ZIGZAG_BY_ONE_BASE = [2]¶
- ARMCHAIR_BY_ONE_BASE = [1, 2]¶
- ONE_BY_ZIGZAG_BASE = [6]¶
- ONE_BY_ARMCHAIR_BASE = [1, 6]¶
- TYPE1NEIGHBOR = (-1, 0)¶
- TYPE2NEIGHBOR = (0, -1)¶
- TYPEZZNEIGHBOR = (-1, 1)¶
- TYPEAANEIGHBOR = (-1, -1)¶
- __init__(edgetype1, edgetype2, ncell1, ncell2)¶
Create an instance.
- Parameters
edgetype1 (str) – type of edge for lattice side 1
edgetype2 (str) – type of edge for lattice side 2
ncell1 (int) – number of cells along lattice side 1
ncell2 (int) – number of cells along lattice side 2
- getGrowVectors(lattvec1, lattvec2)¶
Return the two vectors needed to grow the honeycomb lattice with the specified types of edges.
- Parameters
lattvec1 (numpy.array) – lattice vector 1
lattvec2 (numpy.array) – lattice vector 2
- Return type
numpy.array, numpy.array
- Returns
growvec1, growvec2, the two lattice grow vectors
- getNeighborTypes()¶
Return a dictionary of neighbor types.
- Return type
dict
- Returns
neighbortypes, as keys has tuples of deltas to neighboring positions and as values has NeighborTypes
- getRedundantAtoms(deltas, neighbortypes)¶
Return a list of atoms in the current cell that will be redundant with its neighboring cells when placed in the lattice. Unit cell numbering, rather than lattice numbering, is used.
- Parameters
deltas (list of tuples) – deltas to neighboring cells
neighbortypes (dict) – contains as keys the deltas for potential neighbors and as values NeighborTypes
- Return type
list of ints
- Returns
redundantatoms, list of redundant atoms
- getBondingInfo(deltas, neighbortypes)¶
Return the details for attaching cells to the lattice.
- Parameters
deltas (list of tuples) – deltas to neighboring cells
neighbortypes (dict) – contains as keys the deltas for potential neighbors and as values NeighborTypes
- Return type
dict
- Returns
bonds_to_neighbors, dictionary containing as keys the deltas to neighboring cells from cell (growindex1, growindex2) and as values a list of neighbor-cell atom pairs to bond. Pairs are given using the unit cell numbering rather than the lattice numbering.
- getAtomsToTerminate(growindex1, growindex2, logger=None)¶
Return a list of atoms in the current cell that are not shared with any other cell. Unit cell numbering, rather than lattice numbering, is used.
- Parameters
growindex1 (int) – grow index 1
growindex2 (int) – grow index 2
logger (logging.getLogger) – output logger
- Return type
list of ints
- Returns
atoms_to_terminate, list of unshared atoms
- class schrodinger.application.matsci.nano.sheet.HoneycombCell(unit_cell_structure, center, growindex1, growindex2)¶
Bases:
object
Manage cells in the honeycomb lattice.
- __init__(unit_cell_structure, center, growindex1, growindex2)¶
Create an instance.
- Parameters
unit_cell_structure (schrodinger.structure.Structure) – unit cell structure
center (numpy.array) – center of cell
growindex1 (int) – index along first grow vector
growindex2 (int) – index along second grow vector
- createCell()¶
Make a cell.
- findNeighboringCells(cells, deltas)¶
For the current cell find the neighboring cells.
- makeFragment(redundantatoms)¶
Create the cell fragment to be merged with the honeycomb lattice.
- Parameters
redundantatoms (list of ints) – indicies of redundant atoms present in the cell
- determineLatticeNumbering(latticelen)¶
Determine the map of cell fragment unit cell atom indicies to lattice atom indicies.
- Parameters
latticelen (int) – current number of atoms in lattice
- class schrodinger.application.matsci.nano.sheet.HoneycombLattice(element1, element2, bondlength, ncell1, edgetype1, ncell2, edgetype2, termfrag, min_term_frags, is_coarse_grain=False)¶
Bases:
object
Create the honeycomb lattice according to the following coordinate system:
---------------------------------------------------------------------- | Y | | -------------------- | | / \ | | / \ | | / \ | | / \ | | / \ | | / \ | | -------------------- P2 | | | / 6 5 \ / | | / \ / | | / \ / | | / \ / | | / \ / | | / \ / | | | 1 O 4 -------------------- X | | \ / \ | | \ / \ | | \ / \ | | \ / \ | | \ / \ | | \ 2 3 / \ | | -------------------- P1 | | | \ / | | \ / | | \ / | | \ / | | \ / | | \ / | | -------------------- | ----------------------------------------------------------------------
where in addition to the parameters specified in the HoneycombUnitCell class the two lattice vectors are given by vec(P1, O) and vec(P2, O) with angle(P1, O, P2) = 60 degrees.
- CAPPINGELEMENT = 'H'¶
- CG_CAPPING_ELEMENT = 'C'¶
- CAPPING_BOND_LENGTH = 1.103¶
- DIRECTION = 'forward'¶
- TITLEKEY = 's_m_title'¶
- ENTRYKEY = 's_m_entry_name'¶
- TITLENAME = 'nanosheet'¶
- NCELL1 = 'i_matsci_N_Cell_1'¶
- NCELL2 = 'i_matsci_N_Cell_2'¶
- C_VACUUM = 3.35¶
- __init__(element1, element2, bondlength, ncell1, edgetype1, ncell2, edgetype2, termfrag, min_term_frags, is_coarse_grain=False)¶
Create an instance.
- Parameters
element1 (str) – elemental symbol of the first atom
element2 (str) – elemental symbol of the second atom
bondlength (float) – bond length between the first and second atoms in Angstrom
ncell1 (int) – number of cells along lattice side 1
edgetype1 (str) – type of edge for lattice side 1
ncell2 (int) – number of cells along lattice side 2
edgetype2 (str) – type of edge for lattice side 2
termfrag (str) – terminate the lattice with a given fragment
min_term_frags (bool) – minimize the geometry of terminating fragments
is_coarse_grain (bool) – Whether a coarse grain structure is being created
- updateLatticeBonding(cell, bonds_to_neighbors)¶
Update the bonding between the lattice and the newly added fragment.
- Parameters
cell (HoneycombCell) – recently added cell
bonds_to_neighbors (dict) – keys are tuples to neighboring cells and values are lists of bonding atom pairs using the unit cell numbering
- terminateLattice(logger=None)¶
Terminate the lattice with the given fragments.
- Parameters
logger (logging.getLogger) – output logger
- minTerminatingFragments(logger=None)¶
Minimize the geometry of all atoms in the terminating fragments.
- Parameters
logger (logging.getLogger) – output logger
- setLatticeProperties(chorus_properties)¶
Set some structure properties of the lattice.
- Parameters
chorus_properties (list) – contains the nine chorus properties, i.e. ax, ay, az, bx, …, cz
- getChorusPBC(growvec1, growvec2)¶
Return the chorus box PBC.
- Parameters
growvec1 (numpy.array) – the first lattice grow vector
growvec2 (numpy.array) – the second lattice grow vector
- Return type
list
- Returns
contains the nine chorus properties, i.e. ax, ay, az, bx, …, cz
- buildLattice(logger=None)¶
Build a honeycomb lattice.
- Parameters
logger (logging.getLogger) – output logger
- schrodinger.application.matsci.nano.sheet.get_lattice_vectors(bondlength)¶
Return the two honeycomb lattice vectors for a nanosheet. We build the lattice in XY-plane, where Z = 0
- Parameters
bondlength (float) – The bond length between the atoms comprising the nanosheet (an Angstroms)
- Return (numpy.array, numpy.array)
A 2-tuple of the two lattice vectors
- class schrodinger.application.matsci.nano.sheet.HoneycombBilayers(lattice, separation, bondlength, stacktype, nbilayers, bilayershift)¶
Bases:
object
Create honeycomb bilayers.
- ZEROVEC = array([0., 0., 0.])¶
- STACK_DIRECTION = -1¶
- __init__(lattice, separation, bondlength, stacktype, nbilayers, bilayershift)¶
Create an instance.
- Parameters
lattice (schrodinger.structure.Structure) – lattice structure
separation (float) – bilayer separation
bondlength (float) – bond length between the first and second atoms in Angstrom
stacktype (str) – type of bilayer stacking to be used
nbilayers (int) – number of bilayers
bilayershift (float) – offset of bilayers in terms of the number of unit cells
- buildBilayer()¶
Build the bilayer.
- stackBilayers()¶
Stack the bilayers.
- updatePBC()¶
Update the PBC.
- translateLayers()¶
Translate the layers to be inside the box.
- getTerminatingAtoms(terminatingatoms)¶
Return the terminating atoms for all layers.
- Parameters
termiatingatoms – terminating atoms for the first layer
- Return type
list
- Returns
terminating atoms for all layers
- class schrodinger.application.matsci.nano.sheet.NanoSheets(element1='C', element2='C', bondlength=1.418, ncell1=10, edgetype1='armchair', ncell2=10, edgetype2='zigzag', no_double_bonds=False, termfrag='hydrogen', min_term_frags=False, bilayersep=3.35, nbilayers=0, stacktype='ABAB', bilayershift=0.5, orient=False, logger=None, is_coarse_grain=False)¶
Bases:
object
Main class for making nanosheets.
- MSGWIDTH = 50¶
- __init__(element1='C', element2='C', bondlength=1.418, ncell1=10, edgetype1='armchair', ncell2=10, edgetype2='zigzag', no_double_bonds=False, termfrag='hydrogen', min_term_frags=False, bilayersep=3.35, nbilayers=0, stacktype='ABAB', bilayershift=0.5, orient=False, logger=None, is_coarse_grain=False)¶
- Parameters
element1 (str) – elemental symbol of the first atom
element2 (str) – elemental symbol of the second atom
bondlength (float) – bond length between the first and second atoms in Angstrom
ncell1 (int) – number of cells along lattice side 1
edgetype1 (str) – type of edge for lattice side 1
ncell2 (int) – number of cells along lattice side 2
edgetype2 (str) – type of edge for lattice side 2
no_double_bonds (bool) – disable the formation of double bonds
termfrag (str) – terminate the lattice with a given fragment
min_term_frags (bool) – minimize the geometry of terminating fragments
bilayersep (float) – bilayer separation
nbilayers (int) – number of bilayers
stacktype (str) – bilayer stacking type
bilayershift (float) – offset of bilayer in terms of the number of unit cells
orient (bool) – whether to orient the sheets for Maestro
logger (logging.getLogger) – output logger
is_coarse_grain (bool) – Whether a coarse grain structure is being created
- printJobParams(logger=None)¶
Print job parameters.
- Parameters
logger (logging.getLogger) – output logger
- makeNanoSheets(logger=None)¶
Make nanosheets.
- Parameters
logger (logging.getLogger) – output logger
- schrodinger.application.matsci.nano.sheet.build_cell(astructure, terminatingatoms, atomic_number1, atomic_number2, bondlength, no_bonding_along=None)¶
Build the cell.
- Parameters
astructure (schrodinger.structure.Structure) – the structure for which to build the cell
terminatingatoms (list) – the terminating atoms for which PBC bonds will be needed
atomic_number1 (int) – the atomic number of the first element
atomic_number2 (int) – the atomic number of the second element
bondlength (float) – the bond length
no_bonding_along (list or None) – contains the indices of the lattice vectors along which to not form bonds, indices are 0 (a-vector), 1 (b-vector), and 2 (c-vector), if None then [2] will be used which is the default for sheets
- Return type
- Returns
the built cell