schrodinger.application.matsci.nano.tube module

Classes and functions for building single- and multi-walled nanotubes.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.matsci.nano.tube.CheckInput

Bases: schrodinger.application.matsci.nano.check.CheckInput

Check user input.

checkAll(element1, element2, bondlength, nindex, mindex, ncells, no_double_bonds, termfrag, min_term_frags, up_to_nindex, up_to_mindex, nwalls, wallsep, logger=None)

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
  • nindex (int) – first chiral index
  • mindex (int) – second chiral index
  • ncells (int) – number of unit cells
  • 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
  • up_to_nindex (bool) – enumerate nanotube structures on the n-index
  • up_to_mindex (bool) – enumerate nanotube structures on the m-index
  • nwalls (int) – number of walls in a multi-wall nanotube
  • wallsep (float) – wall separation in Angstrom for a multi-wall nanotube
  • logger (logging.getLogger) – output logger
DEFAULTMSG = '\n You have specified a value for flag %s that is not supported. Values\n must be %s. Proceeding with the default value of %s.'
MIDFIX = '-'
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.matsci.nano.tube', '__doc__': '\n Check user input.\n ', 'checkAll': <function CheckInput.checkAll>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.matsci.nano.tube'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

checkBilayerSep(bilayersep, logger=None)
checkBilayerShift(bilayershift, logger=None)
checkBilayerStackType(stacktype, logger=None)
checkBondlength(bondlength, logger=None)
checkCellDims(ncell1, ncell2, logger=None)
checkEdgetypes(edgetype1, edgetype2, logger=None)
checkElements(element1, element2, logger=None)
checkExistingFile(infile)

Check if the infile already exists and find a new name if it does.

Parameters:infile (str) – file name to check
Return type:str
Returns:outfile, if infile is bad return new file name
checkIndicies(nindex, mindex, logger=None)

Check n-index and m-index.

Parameters:
  • nindex (int) – the first chiral index
  • mindex (int) – the second chiral index
  • logger (logging.getLogger) – output logger
checkMaeExt(infile)

Check that the infile has a supported Maestro extension.

Parameters:infile (str) – file name to check
Return type:str
Returns:outfile, if infile is bad return its basename plus constants.DEFAULT_MAE_EXT
checkNumBilayers(nbilayers, logger=None)
checkNumCells(ncells, logger=None)

Check the number of unit cells.

Parameters:
  • ncells (int) – the number of unit cells
  • logger (logging.getLogger) – output logger
checkNumWalls(nwalls, logger=None)

Check the number of walls.

Parameters:
  • nwalls (int) – the number of walls
  • logger (logging.getLogger) – output logger
checkTermFrag(termfrag, logger=None)
checkUpToIndex(up_to_nindex, up_to_mindex, logger=None)

Check the enumeration options.

Parameters:
  • up_to_nindex (bool) – enumerate on the n-index
  • up_to_mindex (bool) – enumerate on the m-index
  • logger (logging.getLogger) – output logger
checkWallSep(wallsep, logger=None)

Check the desired wall separation.

Parameters:
  • wallsep (float) – wall separation in Angstrom
  • logger (logging.getLogger) – output logger
class schrodinger.application.matsci.nano.tube.Rectangle(origin, bottom, left, end)

Bases: object

Manage the properties of a rectangle.

INSIDETHRESH = 1e-05
__init__(origin, bottom, left, end)

Create an instance.

Parameters:
  • origin (numpy.array) – lower left point
  • bottom (numpy.array) – lower right point
  • left (numpy.array) – upper left point
  • end (numpy.array) – upper right point
linear_equation(ixy, fxy, x)

Return y = m*x + b for m and b from the line formed by initial point ixy and final point fxy.

Parameters:
  • ixy (numpy.array) – initial point on line
  • fxy (numpy.array) – final point on line
  • x (float) – domain argument
Return type:

float

Returns:

y, range value

insideRectangle(xy, logger=None)

Return boolean specifying if the provided plane coordinates lie within the boundary.

Parameters:
  • xy (numpy.array) – plane coordinates
  • logger (logging.getLogger) – output logger
Return type:

bool, bool

Returns:

insidex, insidey, inside the x-boundary or not, same for y-boundary

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.matsci.nano.tube', '__doc__': '\n Manage the properties of a rectangle.\n ', 'INSIDETHRESH': 1e-05, '__init__': <function Rectangle.__init__>, 'linear_equation': <function Rectangle.linear_equation>, 'insideRectangle': <function Rectangle.insideRectangle>, '__dict__': <attribute '__dict__' of 'Rectangle' objects>, '__weakref__': <attribute '__weakref__' of 'Rectangle' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.matsci.nano.tube'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

class schrodinger.application.matsci.nano.tube.NanoSheet(nanotube_sheet_obj)

Bases: object

Create a sheet.HoneycombLattice that is large enough so that the nanotube sheet can be cut out from it.

ANGLEMEDIUM = 1.0471975511965976
__init__(nanotube_sheet_obj)

Create an instance.

Parameters:nanotube_sheet_obj (NanoTubeSheet) – contains parameters of the nanotube sheet
defineVectors()

Define HoneycombLattice and NanoTubeSheet lattice, etc. vectors.

Return type:numpy.array, numpy.array
Returns:lattvec1, lattvec2, the HoneycombLattice lattice vectors
getGrowParams(lattvec1, lattvec2)

Get HoneycombLattice grow parameters.

Parameters:
  • lattvec1 (numpy.array) – lattice vector 1
  • lattvec2 (numpy.array) – lattice vector 2
Return type:

float, numpy.array, float, numpy.array

Returns:

grow1len, grow1unit, grow2len, grow2unit, the lengths and unit vectors of the grow vectors

changeBasis(grow1unit, grow2unit)

Change the basis of the NanoTubeSheet to that of the NanoSheet.

Parameters:
  • grow1unit (numpy.array) – unit vector of first grow vector
  • grow2unit (numpy.array) – unit vector of second grow vector
Return type:

float, float

Returns:

coef1, coef2, coefficients of the end vector in the grow basis

defineDimensions(coef1, grow1len, coef2, grow2len)

Define the dimensions of the NanoSheet.

Parameters:
  • coef1 (float) – coefficient of end vector on first grow vector
  • grow1len (float) – length of first grow vector
  • coef2 (float) – coefficient of end vector on second grow vector
  • grow2len (float) – length of second grow vector
rotateNanoSheet()

Rotate the nanosheet so that lattice edge 1 is along the x-axis.

getNanoSheet(logger=None)

Get the sheet.HoneycombLattice from which the nanotube sheet will be cut.

Parameters:logger (logging.getLogger) – output logger
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.matsci.nano.tube', '__doc__': '\n Create a sheet.HoneycombLattice that is large enough\n so that the nanotube sheet can be cut out from it.\n ', 'ANGLEMEDIUM': 1.0471975511965976, '__init__': <function NanoSheet.__init__>, 'defineVectors': <function NanoSheet.defineVectors>, 'getGrowParams': <function NanoSheet.getGrowParams>, 'changeBasis': <function NanoSheet.changeBasis>, 'defineDimensions': <function NanoSheet.defineDimensions>, 'rotateNanoSheet': <function NanoSheet.rotateNanoSheet>, 'getNanoSheet': <function NanoSheet.getNanoSheet>, '__dict__': <attribute '__dict__' of 'NanoSheet' objects>, '__weakref__': <attribute '__weakref__' of 'NanoSheet' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.matsci.nano.tube'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

class schrodinger.application.matsci.nano.tube.NanoTubeSheet(element1, element2, bondlength, nindex, mindex, ncells)

Bases: object

Preprocess a nanosheet into a nanotube sheet which will be rolled up into a nanotube.

ZEROVEC = array([0., 0.])
__init__(element1, element2, bondlength, nindex, mindex, ncells)

Create an instance.

redefineLatticeVecs(lattvec1, lattvec2)

Redefine lattice vectors according to Dresselhaus.

Parameters:
  • lattvec1 (numpy.array) – first lattice vector
  • lattvec2 (numpy.array) – second lattice vector
Return type:

numpy.array, numpy.array

Returns:

nlattvec1, nlattvec2, first and second lattice vectors redefined

getTubeVectors()

Return chiral and translation vectors for the nanotube sheet.

Return type:numpy.array, numpy.array
Returns:chiral, translat, tube vectors
renumberAtomLists(renumbermap)

Apply the given renumbering map to the terminating and matching atom lists.

Parameters:renumbermap (dict) – maps old indicies into new indicies
cutOutNanoSheet(logger=None)

Cut out the nanotube sheet from the nanosheet.

Parameters:logger (logging.getLogger) – output logger
delDanglingTermAtoms()

Remove dangling atoms from the top and bottom of the nanotube sheet.

delZigZagMatchAtoms(logger=None)

Remove overlapping match atoms for the zigzag case.

Parameters:logger (logging.getLogger) – output logger
delChiralMatchAtoms(logger=None)

Remove overlapping match atoms for the chiral case.

Parameters:logger (logging.getLogger) – output logger
buildNanoTubeSheet(termfrag, use_finite_bos=True, logger=None)

Build the nanotube sheet.

Parameters:
  • termfrag (str) – terminate the lattice with a given fragment
  • use_finite_bos (bool) – use a bond order protocol meant for finite molecules
  • logger (logging.getLogger) – output logger
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.matsci.nano.tube', '__doc__': '\n Preprocess a nanosheet into a nanotube sheet which will be rolled\n up into a nanotube.\n ', 'ZEROVEC': array([0., 0.]), '__init__': <function NanoTubeSheet.__init__>, 'redefineLatticeVecs': <function NanoTubeSheet.redefineLatticeVecs>, 'getTubeVectors': <function NanoTubeSheet.getTubeVectors>, 'renumberAtomLists': <function NanoTubeSheet.renumberAtomLists>, 'cutOutNanoSheet': <function NanoTubeSheet.cutOutNanoSheet>, 'delDanglingTermAtoms': <function NanoTubeSheet.delDanglingTermAtoms>, 'delZigZagMatchAtoms': <function NanoTubeSheet.delZigZagMatchAtoms>, 'delChiralMatchAtoms': <function NanoTubeSheet.delChiralMatchAtoms>, 'buildNanoTubeSheet': <function NanoTubeSheet.buildNanoTubeSheet>, '__dict__': <attribute '__dict__' of 'NanoTubeSheet' objects>, '__weakref__': <attribute '__weakref__' of 'NanoTubeSheet' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.matsci.nano.tube'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

class schrodinger.application.matsci.nano.tube.NanoTube(element1, element2, bondlength, no_double_bonds, nindex, mindex, ncells, termfrag, min_term_frags)

Bases: object

Create a nanotube by rolling up a nanotube sheet.

TITLEKEY = 's_m_title'
ENTRYKEY = 's_m_entry_name'
TITLENAME = 'nanotube'
NINDEX = 'i_matsci_N_Index'
MINDEX = 'i_matsci_M_Index'
NCELLS = 'i_matsci_N_Cells'
RADIUS = 'r_matsci_Radius/Ang.'
LENGTH = 'r_matsci_Length/Ang.'
TWOPI = 6.283185307179586
MSGWIDTH = 50
NUMDECIMAL = 3
A_VACUUM = 3.35
C_VACUUM = 3.35
__init__(element1, element2, bondlength, no_double_bonds, nindex, mindex, ncells, termfrag, min_term_frags)

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
  • no_double_bonds (bool) – disable the formation of double bonds
  • nindex (int) – first chiral index
  • mindex (int) – second chiral index
  • ncells (int) – number of unit cells
  • termfrag (str) – terminate the lattice with a given fragment
  • min_term_frags (bool) – minimize the geometry of terminating fragments
getChiralAngle(logger=None)

Determine the chiral angle of the tube in degrees where the chiral angle is angle(lattvec1, chiral) and is in [0.0, 30.0], 0.0 for zigzag and 30.0 for armchair and the rest are chiral.

Parameters:logger (logging.getLogger) – output logger
tubularizeNanoTubeSheet(logger=None)

Tubularize the nanotube sheet.

Parameters:logger (logging.getLogger) – output logger
rotateTube(logger=None)

Rotate the nanotube so that the tube axis is the translation vector.

preprocessMatchAtoms(inmatch)

Dangling match atoms require two bonding partners so make those atom indicies redundant in the list.

Parameters:inmatch (list of ints) – non-redundant list
Return type:list of ints
Returns:outmatch, redundant list
bondMatchingEdges(matchleft, matchright)

Properly bond the left and right edges which meet each other after rolling.

Parameters:
  • matchleft (list of ints) – indicies of atoms on the left
  • matchright (list of ints) – indicies of atoms on the right
doTermination(nanosheet_obj, fragment)

Terminate the nanotube. Do this by hijacking the HoneycombLattice instance and overwriting some attributes.

Parameters:
  • nanosheet_obj (sheet.HoneycombLattice) – contains information shared between this instance and the nanotube instance
  • fragment (str) – fragment name
Return type:

list of ints

Returns:

nanosheet_obj.frozenatoms, those fragment atoms bound to the nanotube

doBondOrders(logger=None)

Assign bond orders to the nanotube.

Parameters:logger (logging.getLogger) – output logger
removeHydrogens()

Remove all hydrogens from the structure.

minTerminatingFrags(nanosheet_obj)

Minimize terminating fragments. Do this by hijacking the HoneycombLattice instance and overwriting some attributes.

Parameters:nanosheet_obj (sheet.HoneycombLattice) – contains information shared between this instance and the nanotube instance
handleProps(chorus_properties)

Handle the structure properties of the tube.

Parameters:chorus_properties (list) – contains the nine chorus properties, i.e. ax, ay, az, bx, …, cz
printProps(logger=None)

Print the properties of this nanotube.

Parameters:logger (logging.getLogger) – output logger
getChorusPBC()

Return the chorus box PBC.

Return type:list
Returns:contains the nine chorus properties, i.e. ax, ay, az, bx, …, cz
translateTube()

Translate the tube so that it is inside the box.

buildTube(use_finite_bos=True, logger=None)

Build a tube.

Parameters:
  • use_finite_bos (bool) – use a bond order protocol meant for finite molecules
  • logger (logging.getLogger) – output logger
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.matsci.nano.tube', '__doc__': '\n Create a nanotube by rolling up a nanotube sheet.\n ', 'TITLEKEY': 's_m_title', 'ENTRYKEY': 's_m_entry_name', 'TITLENAME': 'nanotube', 'NINDEX': 'i_matsci_N_Index', 'MINDEX': 'i_matsci_M_Index', 'NCELLS': 'i_matsci_N_Cells', 'RADIUS': 'r_matsci_Radius/Ang.', 'LENGTH': 'r_matsci_Length/Ang.', 'TWOPI': 6.283185307179586, 'MSGWIDTH': 50, 'NUMDECIMAL': 3, 'A_VACUUM': 3.35, 'C_VACUUM': 3.35, '__init__': <function NanoTube.__init__>, 'getChiralAngle': <function NanoTube.getChiralAngle>, 'tubularizeNanoTubeSheet': <function NanoTube.tubularizeNanoTubeSheet>, 'rotateTube': <function NanoTube.rotateTube>, 'preprocessMatchAtoms': <function NanoTube.preprocessMatchAtoms>, 'bondMatchingEdges': <function NanoTube.bondMatchingEdges>, 'doTermination': <function NanoTube.doTermination>, 'doBondOrders': <function NanoTube.doBondOrders>, 'removeHydrogens': <function NanoTube.removeHydrogens>, 'minTerminatingFrags': <function NanoTube.minTerminatingFrags>, 'handleProps': <function NanoTube.handleProps>, 'printProps': <function NanoTube.printProps>, 'getChorusPBC': <function NanoTube.getChorusPBC>, 'translateTube': <function NanoTube.translateTube>, 'buildTube': <function NanoTube.buildTube>, '__dict__': <attribute '__dict__' of 'NanoTube' objects>, '__weakref__': <attribute '__weakref__' of 'NanoTube' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.matsci.nano.tube'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

class schrodinger.application.matsci.nano.tube.MultiWalledNanoTube(innertube, nwalls, wallsep)

Bases: object

Build a multi-walled nanotube by assembling specific NanoTubes.

NWALLS = 'i_matsci_N_Walls'
WALLSEP = 'r_matsci_Wall_Sep./Ang.'
MSGWIDTH = 50
__init__(innertube, nwalls, wallsep)

Create an instance.

Parameters:
  • innertube (NanoTube) – tube object of inner most tube
  • nwalls (int) – number of walls in the multi-walled tube
  • wallsep (float) – wall separation in Angstrom for the multi-walled tube.
getOuterChiralIndicies(wallindex, logger=None)

Get the chiral indicies for this outer tube.

Parameters:
  • wallindex (int) – index of this outer tube
  • logger (logging.getLogger) – output logger
Return type:

int, int

Return type:

nindex, mindex, chiral indicies for outer tube

getOuterTubeVectors(nindex, mindex)

Return the tube vectors for the given (n, m).

Parameters:
  • nindex (int) – first chiral index
  • mindex (int) – second chiral index
Return type:

numpy.array, numpy.array

Returns:

chiral, translat, the tube vectors

findLargestTranslat()

Return the length of the wall with the longest translation vector.

Return type:float
Returns:tmax, length of longest vector in Angstrom
getNumUnitCells(translat)

Return the number of unit cells to use for the given wall.

Parameters:translat (numpy.array) – translation vector of the given wall
Return type:int
Returns:ncells, the number of cells to use for the given wall
alignCenterCollect()

Align and center the tubes and collect tubes into a single structure.

getTubeSpacings()

Determine actual tube spacings in units of Ang.

handleProps()

Handle the structure properties of the multi-walled tube.

printProps(logger=None)

Print the properties of this multi-walled nanotube.

Parameters:logger (logging.getLogger) – output logger
buildMultiWallTube(use_finite_bos=True, logger=None)

Assemble the multi-walled tube.

Parameters:
  • use_finite_bos (bool) – use a bond order protocol meant for finite molecules
  • logger (logging.getLogger) – output logger
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.matsci.nano.tube', '__doc__': '\n Build a multi-walled nanotube by assembling specific NanoTubes.\n ', 'NWALLS': 'i_matsci_N_Walls', 'WALLSEP': 'r_matsci_Wall_Sep./Ang.', 'MSGWIDTH': 50, '__init__': <function MultiWalledNanoTube.__init__>, 'getOuterChiralIndicies': <function MultiWalledNanoTube.getOuterChiralIndicies>, 'getOuterTubeVectors': <function MultiWalledNanoTube.getOuterTubeVectors>, 'findLargestTranslat': <function MultiWalledNanoTube.findLargestTranslat>, 'getNumUnitCells': <function MultiWalledNanoTube.getNumUnitCells>, 'alignCenterCollect': <function MultiWalledNanoTube.alignCenterCollect>, 'getTubeSpacings': <function MultiWalledNanoTube.getTubeSpacings>, 'handleProps': <function MultiWalledNanoTube.handleProps>, 'printProps': <function MultiWalledNanoTube.printProps>, 'buildMultiWallTube': <function MultiWalledNanoTube.buildMultiWallTube>, '__dict__': <attribute '__dict__' of 'MultiWalledNanoTube' objects>, '__weakref__': <attribute '__weakref__' of 'MultiWalledNanoTube' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.matsci.nano.tube'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

class schrodinger.application.matsci.nano.tube.NanoTubes(element1='C', element2='C', bondlength=1.418, no_double_bonds=False, nindex=6, mindex=6, ncells=1, termfrag='hydrogen', min_term_frags=False, up_to_nindex=False, up_to_mindex=False, nwalls=1, wallsep=3.35, orient=False, logger=None)

Bases: object

Main class for making nanotubes.

MSGWIDTH = 50
__init__(element1='C', element2='C', bondlength=1.418, no_double_bonds=False, nindex=6, mindex=6, ncells=1, termfrag='hydrogen', min_term_frags=False, up_to_nindex=False, up_to_mindex=False, nwalls=1, wallsep=3.35, orient=False, logger=None)
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
  • no_double_bonds (bool) – disable the formation of double bonds
  • nindex (int) – first chiral index
  • mindex (int) – second chiral index
  • ncells (int) – number of unit cells
  • termfrag (str) – terminate the lattice with a given fragment
  • min_term_frags (bool) – minimize the geometry of terminating fragments
  • up_to_nindex (bool) – enumerate nanotube structures on the n-index
  • up_to_mindex (bool) – enumerate nanotube structures on the m-index
  • nwalls (int) – number of walls in a multi-wall nanotube
  • wallsep (float) – wall separation in Angstrom in a multi-wall nanotube
  • orient (bool) – whether to orient the sheets for Maestro
  • logger (logging.getLogger) – output logger
printJobParams(logger=None)

Print job parameters.

Parameters:logger (logging.getLogger) – output logger
makeSingleWalledTubes(use_finite_bos=True, logger=None)

Make single-walled nanotubes.

Parameters:
  • use_finite_bos (bool) – use a bond order protocol meant for finite molecules
  • logger (logging.getLogger) – output logger
Return type:

list of NanoTube

Returns:

singletubes, contains all created single-walled tubes

printSingleWalledTubes(logger=None)

Formatted print of single-walled tubes.

Parameters:logger (logging.getLogger) – output logger
makeMultiWalledTubes(use_finite_bos=True, logger=None)

Make multi-walled nanotubes.

Parameters:
  • use_finite_bos (bool) – use a bond order protocol meant for finite molecules
  • logger (logging.getLogger) – output logger
Return type:

list of MultiWalledNanoTube

Returns:

multitubes, contains all created multi-walled tubes

printMultiWalledTubes(logger=None)

Formatted print of multi-walled tubes.

Parameters:logger (logging.getLogger) – output logger
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.matsci.nano.tube', '__doc__': '\n Main class for making nanotubes.\n ', 'MSGWIDTH': 50, '__init__': <function NanoTubes.__init__>, 'printJobParams': <function NanoTubes.printJobParams>, 'makeSingleWalledTubes': <function NanoTubes.makeSingleWalledTubes>, 'printSingleWalledTubes': <function NanoTubes.printSingleWalledTubes>, 'makeMultiWalledTubes': <function NanoTubes.makeMultiWalledTubes>, 'printMultiWalledTubes': <function NanoTubes.printMultiWalledTubes>, '__dict__': <attribute '__dict__' of 'NanoTubes' objects>, '__weakref__': <attribute '__weakref__' of 'NanoTubes' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.matsci.nano.tube'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

schrodinger.application.matsci.nano.tube.remove_pbc(astructure)

Remove the PBC definitions from the given structure.

Parameters:astructure (schrodinger.structure.Structure) – the structure for which to remove the PBC