import build import rotate import analyze m=14 n=9 l=13 path_in='/data/liaot/toolbox/python/protein/patchdock_sample/pdb-for-link/after-model/' path_out='/data/liaot/toolbox/python/protein/patchdock_sample/rassf-bended-ready-for-solvate/' for k in range(1,2): pdb_filename='%d-%d-%d-%d.pdb' % (m, n, l, k+1) protein_obj=build.protein() protein_obj.read_residue_info(path_in+pdb_filename) ##### move protein to center of mass protein_obj.move_to_com(protein_obj.com) ##### rotate protein to fit insdie a smallest box ##### print vortex to check the box size print rotate.find_vortex(protein_obj) protein_obj=rotate.minbox(protein_obj) print rotate.find_vortex(protein_obj) for natom in range(len(protein_obj.resid)): protein_obj.resid[natom]-=204 pdb_out='rassf-%d-%d.crd' % (m, k+1) protein_obj.write_crd(path_out+pdb_out) del protein_obj
# pdb_filename='sarah.pdb' # protein_obj=build.protein() # protein_obj.read_residue_info(pdb_filename) ##### move protein to center of mass # protein_obj.move_to_com(protein_obj.com) ##### rotate protein to fit insdie a smallest box ##### print vortex to check the box size # print rotate.find_vortex(protein_obj) # protein_obj=rotate.minbox(protein_obj) # print rotate.find_vortex(protein_obj) # superimpose two proteins target_filename = "mra.pdb" protein_target = build.protein() protein_target.read_residue_info(target_filename) arrow_filename = "ra.pdb" protein_arrow = build.protein() protein_arrow.read_residue_info(arrow_filename) select_arrow = ["P", 205, 366] protein_arrow = rotate.superimpose(protein_arrow, select_arrow, protein_target) # protein_arrow=rotate.superimpose(protein_arrow, select_arrow, protein_target, select_target) # protein_obj.write_pdb('mra-chain.pdb') # protein_obj.write_crd('test.crd')