コード例 #1
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def JOBKIND(x):
    return Constraint(1, 'jobkind', s(x), '=')
コード例 #2
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def LAUNCHDIR(x):
    return Constraint(1, 'launchdir', s(x), '=')
コード例 #3
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def LAUNCHDIRS(x):
    return Constraint(1, 'launchdir', [s(y) for y in x], 'in')
コード例 #4
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def ADSORBATES(x):
    return Constraint(
        1, 'stradsorbates', s(x), '='
    )  #  https://stackoverflow.com/questions/603572/how-to-properly-escape-a-single-quote-for-a-sqlite-database
コード例 #5
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def EXISTS(filename):
    return Constraint(1, filename.replace('.', '_'), s(True), '=')
コード例 #6
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def INITPOS(x):
    return Constraint(1, 'strinitpos', s(x), '=')
コード例 #7
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def SYMMETRIC(x):
    return Constraint(1, 'symmetric', s(str(x)), '=')
コード例 #8
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def STATUS(x):
    return Constraint(1, 'status', s(x), '=')
コード例 #9
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def KIND(x):
    return Constraint(1, 'kind', s(x), '=')
コード例 #10
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def XC(x):
    return Constraint(1, 'xc', s(x), '=')
コード例 #11
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def PSP(x):
    return Constraint(1, 'psp', s(x), '=')
コード例 #12
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def DFTCODE(x):
    return Constraint(1, 'dftcode', s(x), '=')
コード例 #13
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def MAGMOMINIT(x):
    return Constraint(1, 'strmagmominit', s(x), '=')
コード例 #14
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def INITCELL(x):
    return Constraint(1, 'strinitcell', s(x), '=')
コード例 #15
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def SYMBOLS(x):
    return Constraint(1, 'strsymbols', s(x), '=')
コード例 #16
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def STRUCTURE(x):
    return Constraint(1, 'structure', s(x), '=')
コード例 #17
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts
def NUMBERS(x):
    return Constraint(1, 'strnumbers', s(x), '=')
コード例 #18
0
ファイル: constraint2.py プロジェクト: statt8900/ksb_scripts

def STATUS(x):
    return Constraint(1, 'status', s(x), '=')


READY = STATUS('ready')
QUEUED = STATUS('queued')
FIZZLED = STATUS('fizzled')
TIMEOUT = STATUS('timeout')
CANCELLED = STATUS('cancelled')
FAILED = STATUS('failed')
COMPLETED = STATUS('completed')
RUNNING = STATUS('running')

NOTCOMPLETED = Constraint(1, 'status', s('completed'), '!=')

# 'unlocked' means that we presently INTEND to eventually update the row
# a job that has not finished should be unlocked
# if a job is finished, then it should be unlocked

##########
# ELEMENTS
##########
AG = Constraint(1, 'name', s('%Ag-fcc%'), 'like')
AL = Constraint(1, 'name', s('%Al-fcc%'), 'like')
AU = Constraint(1, 'name', s('%Au-fcc%'), 'like')
BA = Constraint(1, 'name', s('%Ba-bcc%'), 'like')
BE = Constraint(1, 'name', s('%Be-hcp%'), 'like')
C = Constraint(1, 'name', s('%C-diamond%'), 'like')
CA = Constraint(1, 'name', s('%Ca-fcc%'), 'like')