from lib.langevin_module import MD_module md_module = MD_module(CONFIGFILE, DEBUG) if(MD_PACKAGE == "gromacs"): print("Sorry, support for gromacs is not implemented yet.") sys.exit(-1) # Initiate the reweighter if REWEIGHTING_RANGE > 0: reweighter = reweighting.Reweighting( reweighting_range = REWEIGHTING_RANGE ) # Initiate iterations if APPEND == True: # load the last two iterations if existing for proper function of # cleanup module if logger.getLastIterationId() > 1: iterations = logger.loadLastIterations(N=2) else: logger.loadLastIterations(N=1) # Load the previous iterations to restore the rate matrices for the reweighter module if REWEIGHTING_RANGE > 0 and iterations[-1].getId() <= REWEIGHTING_MAX_ITERATION: print('Loading previous iterations to restore rate matrix for reweighting...') for iteration_counter_tmp in range(1,iterations[-1].getId() + 1): iteration_tmp = logger.loadIteration(iteration_counter_tmp) reweighter.storeRateMatrix(iteration_tmp) iteration_tmp = [] if APPEND_NEW_CONFIG: iterations[-1].boundaries = INITIAL_BOUNDARIES iterations[-1].sample_region = INITIAL_SAMPLE_REGION iterations[-1].target_number_of_segments = INITIAL_TARGET_NUMBER_OF_SEGMENTS for this_bin in iterations[-1].bins: