Created
December 5, 2016 21:31
-
-
Save juanjosecas/af22dcbdbd253bfefc1c7eaee034642a to your computer and use it in GitHub Desktop.
usage: python combineGro_prot_lig.py protein_processed.gro BNZ.gro > complex.gro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| pro_gro = sys.argv[1] | |
| lig_gro = sys.argv[2] | |
| pro = open(pro_gro,'r').readlines() | |
| lig = open(lig_gro,'r').readlines() | |
| pro_dat = [line.rstrip() for line in pro] | |
| lig_dat = [line.rstrip() for line in lig] | |
| tot_num = int(pro_dat[1])+int(lig_dat[1]) | |
| com_dat = [pro_dat[0],'%5d'%tot_num]+pro_dat[2:-1] + lig_dat[2:-1] + [pro_dat[-1]] | |
| for line in com_dat: print line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment