def test_prepare_for_md(params): util.goto_dir(sim_dir) print os.getcwd() pdb = params['pdb'] fetch.get_pdbs_with_http(pdb) full_pdb = pdb + '.pdb' clean_pdb = os.path.abspath(pdb) + '.clean.pdb' pdbtext.clean_pdb(full_pdb, clean_pdb) print "> Generating topologies" simulate.pdb_to_top_and_crds(params['ff'], clean_pdb, 'sim') print "> Minimizing structure" util.goto_dir('min') simulate.minimize(params['ff'], '../sim', 'min')
from pdbremix import simulate from pdbremix import force from pdbremix import util from pdbremix import pdbtext from pdbremix import trajectory from pdbremix import fetch from pdbremix import asa from pdbremix import data from pdbremix import rmsd util.goto_dir('pdb') # load the structures from the website fetch.get_pdbs_with_http('1be9', '1rzx') soup = pdbatoms.Soup('1be9.pdb') soup2 = pdbatoms.Soup('1rzx.pdb') # the structures loaded 1be9 and 1rzx are both PDZ # domains. However, they don't quite map to each other # This shows how you might select homologous residues # and then extract the coordinates for RMSD calculation def split_pairs(indices): for i in range(0, len(indices), 2): yield indices[i:i+2] def get_crds(res_tags, soup):
from pdbremix import v3 from pdbremix import pdbatoms from pdbremix import simulate from pdbremix import force from pdbremix import util from pdbremix import pdbtext from pdbremix import trajectory from pdbremix import fetch from pdbremix import asa from pdbremix import data from pdbremix import rmsd util.goto_dir('pdb') # load the structures from the website fetch.get_pdbs_with_http('1be9', '1rzx') soup = pdbatoms.Soup('1be9.pdb') soup2 = pdbatoms.Soup('1rzx.pdb') # the structures loaded 1be9 and 1rzx are both PDZ # domains. However, they don't quite map to each other # This shows how you might select homologous residues # and then extract the coordinates for RMSD calculation def split_pairs(indices): for i in range(0, len(indices), 2): yield indices[i:i + 2] def get_crds(res_tags, soup):
a.bfactor = 1.0 soup.write_pdb(pdb) sim_dir = "equilibrate" pdb_code = '1cph' ff = 'GROMACS4.5' pdb_code = '2evq' ff = 'AMBER11-GBSA' ff = 'GROMACS4.5' i_residue = 2 util.goto_dir(sim_dir) # Get the PDB files from the website fetch.get_pdbs_with_http(pdb_code) # Format the PDB file to give one single conformation clean_pdb = '2evq.clean.pdb' pdbtext.clean_pdb(pdb_code+'.pdb', clean_pdb) # Generate restart files from PDB simulate.pdb_to_top_and_crds(ff, clean_pdb, 'sim') # Make a protein positional restrain_protein.pdb file make_protein_restraint_pdb('sim', 'restrain_protein.pdb') # minimize system (mostly water) with protein positions fixed simulate.minimize( ff, 'sim', 'minwater', restraint_pdb='restrain_protein.pdb')