def main_user_coordinates(filename,delta_t,arguments): #arguments will be a nested list with the desired coordinates. workfile = tools.readfile(filename) geoms = tools.trajectory_extractor(filename) internals = [ check_internal(geoms,argument) for argument in arguments ] coordinates = zip(*internals) times_all = tools.times(workfile ,delta_t)[0] times_hop = tools.times(workfile ,delta_t)[1] time_internals = zip(times_all,coordinates) inds = [times_all.index(i) for i in times_hop] time_internals_hop = [time_internals[j] for j in inds] return (time_internals , time_internals_hop)
def Enepop_data(filename,time_step): workfile = tools.readfile(filename) ener_states = tools.just_energies(workfile)[0] ener_hops = tools.just_energies(workfile)[1] current_eners = tools.just_energies(workfile)[2] populations = tools.populations(workfile) first2pops = [[0,1.0],[0,1.0]] allpops = [ map(str,i) for i in first2pops + populations] times = tools.times(workfile ,time_step)[0] timeshop = tools.times(workfile ,time_step)[1] # Same name as the molcas .out but different extension. fileout = os.path.splitext(filename)[0] + '.EnePop' with open(fileout,'w') as fo: for i ,j, k, l in zip(map(str,times),allpops,ener_states,current_eners): fo.write("{tim} {pop} {eners} {currE} \n".format(tim=i,pop=' '.join(j) ,eners=' '.join(k), currE= l)) return