Esempio n. 1
0
    )
    exit()
elif len(argv) == 3:
    if argv[1] not in ['-rs', '-kdb', '-both', '-all']:
        print('Invalid method')
        print(
            'Use flag \n \t \t -rs    :  random searching \n \t \t -kdb   :  only kdb \n \t \t -both  :  kdb + random searching'
        )
        exit()
    else:
        num_state = int(argv[2])

    if argv[1] != '-all':
        method = argv[1]

        path = export.Method()
        pathway = path.get_method(method)

        for i in range(num_state):

            state = i
            thepath = '/home/maiihn/code/eon/calculation/pt-system/newtest/one_trimer/' + str(
                state) + '/' + str(pathway) + '/states/'
            thenewpath = '/home/maiihn/code/eon/calculation/pt-system/newtest/one_trimer/OUTPUT/' + str(
                pathway) + '/result'

            path = thepath + str(0)
            newpath = thenewpath + str(state)
            num_saddle = export.Number(path).get_num_saddle()

            doc = export.Doc(path)
Esempio n. 2
0
import numpy as np
import export
from sys import argv

if len(argv) != 2 or '-h' in argv:
    print('Use flag \n \t \t -rs    :  random searching \n \t \t -kdb   :  only kdb \n \t \t -both  :  kdb + random searching')
    exit()
elif len(argv) == 2:
    if argv[1] not in ['-rs','-kdb','-both']:
        print('Invalid method')
        print('Use flag \n \t \t -rs    :  random searching \n \t \t -kdb   :  only kdb \n \t \t -both  :  kdb + random searching')
        exit()
    else:
        method = argv[1]

path = export.Method('akmc-pt-')
pathway = path.get_method(method)

thepath = '/home/maiihn/code/eon/calculation/pt-system/' + pathway + '/states/'
thenewpath = '/home/maiihn/code/eon/calculation/pt-system/OUTPUT/' + pathway + '/force_call' + '/result_state'
num_state = export.Number(thepath).get_num_state() - 1

for i in range(num_state):
    state = i
    
    path = thepath + str(state) 
    newpath = thenewpath + str(state) 
    num_saddle = export.Number(path).get_num_saddle()
    
    doc = export.Doc(path)
    doc.export_forcecall(newpath,num_saddle)