"""
Constants for building nanostructures.
Copyright Schrodinger, LLC. All rights reserved."""
# Contributor: Thomas F. Hughes
from collections import OrderedDict
from schrodinger.application.matsci import coarsegrain
_version = '$Revision 0.0 $'
[docs]class Constants(object):
    """
    Collect constants.
    """
    # general parameters follow
    ELEMENT1 = 'C'
    ELEMENT2 = 'C'
    BONDLENGTH = 1.418
    ATOMIC_SYMBOL = 'ATOMIC_SYMBOL'
    NO_DOUBLE_BONDS = False
    # Coarse grain element constants
    CG_ELEMENT1 = 'A'
    CG_ELEMENT2 = 'B'
    CG_AA_ELEMENT_SYMBOL = coarsegrain.CG_ELEMENT_SYMBOL
    # build a dictionary map for fragment groups and names to help
    # the user avoid certain confusion
    TERMFRAG = 'hydrogen'
    TERMNONE = 'none'
    TERMMAP = [(TERMNONE, ['', '']), (TERMFRAG, ['', '']),
               ('oxide', ['organic', 'Hydroxide']),
               ('hydroxyl', ['organic', 'Hydroxyl']),
               ('fluoro', ['diverse_fragments', 'fluoro']),
               ('chloro', ['diverse_fragments', 'chloro']),
               ('bromo', ['diverse_fragments', 'bromo']),
               ('carbonyl', ['organic', 'Carbonyl']),
               ('methyl', ['organic', 'Methyl']),
               ('carboxyl', ['organic', 'Acid(C->O)']),
               ('amine', ['organic', 'Amine']),
               ('planar amine', ['organic', 'Planar_Amine']),
               ('silyl', ['organic', 'Silyl']), ('thiol', ['organic', 'Thiol']),
               ('phosphyl', ['organic', 'Phosphyl'])]
    TERMDICT = OrderedDict(TERMMAP)
    TERMFRAGS = list(TERMDICT)
    FRAGMENT_NAME = 'FRAGMENT_NAME'
    MIN_TERM_FRAGS = False
    DEFAULT_MAE_EXT = '.mae'
    # sheet parameters follow
    # this script supports these two types of edge shapes because those
    # are the ones that can be properly periodically replicated.  We offer
    # more than a single choice because shape can be important for both
    # cluster models as well as in calculations using PBCs.  In general
    # the lattice will be a parallelogram with the zigzag-by-armchair
    # case, or vice-versa, a rectangle.
    ZIGZAG = 'zigzag'
    ARMCHAIR = 'armchair'
    EDGETYPES = [ZIGZAG, ARMCHAIR]
    EDGETYPE1 = ARMCHAIR
    EDGETYPE2 = ZIGZAG
    NCELL1 = 10
    NCELL2 = 10
    BILAYERSEP = 3.35
    # by default make a single sheet
    NBILAYERS = 0
    # this script support two types of bilayer stacking, i.e.
    # multi-layer functionality (1) normal stacking (ABAB),
    # where AB bilayers are just stacked on top of one another,
    # and (2) offset stacking (ABCD), where the next AB bilayer
    # is shifted to a new position CD relative to the previous
    # AB bilayer
    ABAB = 'ABAB'
    ABCD = 'ABCD'
    STACKTYPES = [ABAB, ABCD]
    # by default offset bilayers by half of a unit cell
    BILAYERSHIFT = 0.5
    SHEET_OUT_MAE_NAME = 'sheet' + DEFAULT_MAE_EXT
    # tube parameters follow
    NINDEX = 6
    MINDEX = 6
    NCELLS = 1
    UP_TO_NINDEX = False
    UP_TO_MINDEX = False
    NWALLS = 1
    WALLSEP = BILAYERSEP
    TUBE_OUT_MAE_NAME = 'tube' + DEFAULT_MAE_EXT