pablo-arantes / making-it-rain

Cloud-based molecular simulations for everyone
MIT License
377 stars 97 forks source link

Protein_ligand.ipynb #113

Open raphaelolipitz opened 1 month ago

raphaelolipitz commented 1 month ago

Hallo There :)

I want to run the colab script Protein_ligand.ipynb but it do not run. Besides its the same code as in the amber.ipynb this line got me the Error: vol not defined.

with open("temp.txt", 'r') as f: for line in f: vol = float(line.split()[1])

vol_lit = vol pow(10, -27) atom_lit = 9.03 pow(10, 22) conc = float(Concentration) num_ion = int(vol_lit (conc/0.15) atom_lit)

if I change the code so that vol gets a global float, the error do not occur anymore, how ever I got the Problem that I got the Error massage that the file: ligand_gff.pdb can not be found.

Maybe the Error is here? lig_new = os.path.join(workDir, "ligand_gaff.pdb") . . . f = open(tleap, "w") f.write("""source """ + str(ff) + "\n" """source leaprc.gaff2 LIG = loadmol2 """ + str(ligand_mol2) + "\n" """loadamberparams """ + str(ligand_frcmod) + "\n" """saveoff LIG """ + str(lib) + "\n" """savepdb LIG """ + str(lig_new) + "\n" """quit""") f.close()

tleap_command = "tleap -f " + str(tleap) cat_command = "cat " + str(starting_end) + " " + str(lig_new) + str(" > ") + str(protein_ligand)

Thanks for your help in advance! Raphael