Skip to content

Commit

Permalink
Fixed AddData.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Anne Kiirikki committed Oct 26, 2021
1 parent 7570743 commit 590777c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Scripts/BuildDatabank/AddData.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,17 @@
u = Universe(top, traj)
u.atoms.write(dir_tmp+'/frame0.gro', frames=u.trajectory[[0]]) #write first frame into gro file

try:
u = Universe(top, traj)
u.atoms.write(dir_tmp+'/frame0.gro', frames=u.trajectory[[0]]) #write first frame into gro file
except:
conf = str(dir_tmp) + '/conf.gro'
print("Generating conf.gro because MDAnalysis cannot read tpr version")
os.system('echo System | gmx trjconv -s '+ top + ' -f '+ traj + ' -dump 0 -o ' + conf)
u = Universe(conf, traj)
u.atoms.write(dir_tmp+'/frame0.gro', frames=u.trajectory[[0]]) #write first frame into gro file


gro = str(dir_tmp) + '/frame0.gro'

u0 = Universe(gro)
Expand Down Expand Up @@ -606,6 +617,10 @@

print("Date of adding to the databank: " + sim['DATEOFRUNNING'])

# Type of system is currently hard coded because only lipid bilayers are currently added.
# When we go for other systems, this will be given by user.
sim['TYPEOFSYSTEM'] = 'lipid bilayer'

# BATUHAN: add openmm parser #
# # Save to databank

Expand Down

0 comments on commit 590777c

Please sign in to comment.