예제 #1
0
if args.plot:
    import matplotlib.pyplot as plt

# failproofing for segment plotting
if args.first_iteration == args.last_iteration and \
   args.plot_segments:
    raise Exception("Need more than 1 iteration for --segments\n")

#get the actual Iteration from logger module
logger = Logger(args.logdir)
iterations = logger.loadIterations(begin=args.first_iteration,
                                   end=args.last_iteration)

# load md module
if not args.input_md_conf:
    args.input_md_conf = logger.loadConfigFile(iterations[0].getId())
md_module = MD_module(args.input_md_conf, debug=False)

# Load cpptraj input file as one string with linebreaks and delete the last line break
try:
    cpptraj_lines_file = open(args.cpptraj_lines_file_path, 'r')
except:
    print('Error: could not open ' + args.cpptraj_lines_file_path)
cpptraj_lines = ''
for line in cpptraj_lines_file:
    cpptraj_lines = cpptraj_lines + line
cpptraj_lines = cpptraj_lines[0:-1]
cpptraj_lines_file.close()

#Calculate the coordinate values and store them together with
#the trajectory probability into coordinates
예제 #2
0
if first_it_id == last_it_id and \
   args.plot_segments:
    raise Exception("Need more than 1 iteration for --segments\n")

#get the actual Iteration from logger module
logger = Logger(args.logdir)
keep_coords_frequency = int(
    logger.loadConfigParameter('keep-coords-frequency',
                               iteration_id=first_it_id))
first_iteration = logger.loadIteration(first_it_id)
if last_it_id == -1:
    last_it_id = logger.getLastIterationId()

# load md module
if not args.input_md_conf:
    args.input_md_conf = logger.loadConfigFile(first_iteration.getId())
md_module = MD_module(args.input_md_conf, debug=False)

# Load cpptraj input file as one string with linebreaks and delete the last line break
try:
    cpptraj_lines_file = open(args.cpptraj_lines_file_path, 'r')
except:
    print('Error: could not open ' + args.cpptraj_lines_file_path)
cpptraj_lines = ''
for line in cpptraj_lines_file:
    cpptraj_lines = cpptraj_lines + line
cpptraj_lines = cpptraj_lines[0:-1]
cpptraj_lines_file.close()

#Calculate the coordinate values and store them together with
#the trajectory probability into coordinates