comparison NEQGamma.py @ 1:afcb925def69 draft default tip

"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit f1c3c88c7395f2e84cbc533199406aadb79c5c07"
author chemteam
date Fri, 13 Nov 2020 19:38:28 +0000
parents 4f3222cb5cf6
children
comparison
equal deleted inserted replaced
0:4f3222cb5cf6 1:afcb925def69
127 127
128 sys.stdout.write("writing output...\n") 128 sys.stdout.write("writing output...\n")
129 dist = open(output, "w") 129 dist = open(output, "w")
130 frict = open(output_frict, "w") 130 frict = open(output_frict, "w")
131 131
132 dist.write( 132 dist.write('\t'.join(('#x', 'force_integral', 'frict_coeff',
133 "#x force_integral frict_coeff wdiss corrected_force_integral\n") 133 'wdiss', 'corrected_force_integral\n')))
134 for i in range(length_data): 134 for i in range(length_data):
135 dist.write("{:15.8f} {:20.8f} {:20.8f} {:20.8f} {:20.8f}\n".format( 135 dist.write("{:.8f}\t{:.8f}\t{:.8f}\t{:.8f}\t{:.8f}\n".format(
136 x[i], av_forceintegral[i], av_intcorr[i], wdiss[i], 136 x[i], av_forceintegral[i], av_intcorr[i], wdiss[i],
137 av_forceintegral[i] - wdiss[i])) 137 av_forceintegral[i] - wdiss[i]))
138 138
139 frict.write("""#x ACF frict_coeff """ 139 frict.write('\t'.join(('#x', 'ACF', 'frict_coeff',
140 """gauss_filtered_frict_coeff av_window_frict_coeff\n""") 140 'gauss_filtered_frict_coeff',
141 for i in range(length_data): 141 'av_window_frict_coeff\n')))
142 frict.write("{:15.8f} {:20.8f} {:20.8f} {:20.8f} {:20.8f}\n".format( 142 for i in range(length_data):
143 frict.write("{:.8f}\t{:.8f}\t{:.8f}\t{:.8f}\t{:.8f}\n".format(
143 x[i], autocorr_set[i], av_intcorr[i], blurred[i], runn_av[i])) 144 x[i], autocorr_set[i], av_intcorr[i], blurred[i], runn_av[i]))
144 145
145 dist.close() 146 dist.close()
146 frict.close() 147 frict.close()
147 148
148 sys.stdout.write("Done!\n") 149 sys.stdout.write("Done!\n")
149 150
150 151
151 def main(): 152 def main():
152 parser = argparse.ArgumentParser(description="""dcTMD friciton correction 153 parser = argparse.ArgumentParser(description="""dcTMD friction correction
153 (please cite: Wolf, S., Stock, G. Targeted Molecular Dynamics 154 (please cite: Wolf, S., Stock, G. Targeted Molecular Dynamics
154 Calculations of Free Energy Profiles Using a Nonequilibrium 155 Calculations of Free Energy Profiles Using a Nonequilibrium
155 Friction Correction. J. Chem. Theory Comput. 2018, 14(12), 6175-6182, 156 Friction Correction. J. Chem. Theory Comput. 2018, 14(12), 6175-6182,
156 DOI: 10.1021/acs.jctc.8b00835). Integrates a constraint force file via 157 DOI: 10.1021/acs.jctc.8b00835). Integrates a constraint force file via
157 trapezoid rule, calculates the NEQ memory friction kernel and friction 158 trapezoid rule, calculates the NEQ memory friction kernel and friction