schrodinger.application.matsci.nano.check module

Classes and functions for checking nanostructure input.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.matsci.nano.check.CheckInput[source]

Bases: object

Check user input.

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 = '-'
checkElements(element1, element2, logger=None)[source]
checkBondlength(bondlength, logger=None)[source]
checkEdgetypes(edgetype1, edgetype2, logger=None)[source]
checkCellDims(ncell1, ncell2, logger=None)[source]
checkTermFrag(termfrag, logger=None)[source]
checkBilayerSep(bilayersep, logger=None)[source]
checkNumBilayers(nbilayers, logger=None)[source]
checkBilayerStackType(stacktype, logger=None)[source]
checkBilayerShift(bilayershift, logger=None)[source]
checkIndicies(nindex, mindex, logger=None)[source]

Check n-index and m-index.

Parameters
  • nindex (int) – the first chiral index

  • mindex (int) – the second chiral index

  • logger (logging.getLogger) – output logger

checkNumCells(ncells, logger=None)[source]

Check the number of unit cells.

Parameters
  • ncells (int) – the number of unit cells

  • logger (logging.getLogger) – output logger

checkUpToIndex(up_to_nindex, up_to_mindex, logger=None)[source]

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

checkNumWalls(nwalls, logger=None)[source]

Check the number of walls.

Parameters
  • nwalls (int) – the number of walls

  • logger (logging.getLogger) – output logger

checkWallSep(wallsep, logger=None)[source]

Check the desired wall separation.

Parameters
  • wallsep (float) – wall separation in Angstrom

  • logger (logging.getLogger) – output logger

checkMaeExt(infile)[source]

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

checkExistingFile(infile)[source]

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