-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinitialize_linear.py
29 lines (23 loc) · 1020 Bytes
/
initialize_linear.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import mdconf_oop as md
root_folder = "/home/michele/python_for_md/PureWater"
input_files = [root_folder+'/DeformEm1/init-conf.gro',
root_folder+'/DeformEm2/init-conf.gro',
root_folder+'/DeformEm3/init-conf.gro',
root_folder+'/DeformEm4/init-conf.gro',
root_folder+'/DeformEm5/init-conf.gro']
output_files = [root_folder+'/DeformEm1/shear-conf.gro',
root_folder+'/DeformEm2/shear-conf.gro',
root_folder+'/DeformEm3/shear-conf.gro',
root_folder+'/DeformEm4/shear-conf.gro',
root_folder+'/DeformEm5/shear-conf.gro']
initial_vel = [1e-1, 1e-2, 1e-3, 1e-4, 1e-5]
for i in range(len(initial_vel)) :
print("######################################")
print("Deformatio rate = "+str(initial_vel[i]))
conf = md.Configuration()
conf.input(input_files[i])
conf.assign_shear_velocity(initial_vel[i])
z, v = conf.bin_velocity_profile()
print(v)
conf.output(output_files[i])
print("######################################")