Skip to content

Commit

Permalink
Added functions to run molrep/phaser/refmac without mrbump
Browse files Browse the repository at this point in the history
  • Loading branch information
hlasimpk committed Apr 29, 2017
1 parent 0762c47 commit a1c4a4c
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions simbad/util/mr_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,68 @@ def matthews_coef(self, cell_parameters, space_group):
os.remove(logfile)

return solvent_content


def molrep(self, model, logfile):
"""Function to run molecular replacement using MOLREP"""

cmd = ["molrep"
"-f", self.mtz,
"-m", model]
command_line = os.linesep.join(map(str, cmd))

simbad_util.run_job(command_line, logfile, key='')
return

def phaser(self):
"""Function to run molecular replacement using PHASER"""

cmd = "phaser"

if self.enam:
sgalternative = "ALL"
else:
sgalternative = "HAND"

key = """#---PHASER COMMAND SCRIPT GENERATED BY SIMBAD---
MODE MR_AUTO
ROOT "{0}_mr_output"'
#---DEFINE DATA---
HKLIN {1}
LABIN F={2} SIGF={3}
SGALTERNATIVE SELECT {4}
#---DEFINE ENSEMBLES---
ENSEMBLE ensemble1 &
PDB "{5}" RMS 0.6
#---DEFINE COMPOSITION---
COMPOSITION BY SOLVENT
COMPOSITION PERCENTAGE {6}
#---SEARCH PARAMETERS---
SEARCH ENSEMBLE ensemble1 NUMBER 1""".format(model.pdb_code,
self.mtz,
self.f, self.sigf,
sgalternative,
os.path.join(self.model_dir, '{0}.pdb'.format(model.pdb_code)),
self.solvent)

simbad_util.run_job(command_line, logfile, key)

return

def refmac(self, xyzin, xyzout, hklout, ncyc, logfile):
"""Function to run refinement using REFMAC"""

cmd = ['refmac5',
'hklin', self.mtz,
'hklout', hklout,
'xyzin', xyzin,
'xyzout', xyzout]
command_line = os.linesep.join(map(str, cmd))

key = "ncyc = {0}".format(ncyc)

simbad_util.run_job(command_line, logfile, key)
return

def summarize(self, csv_file="mr_results.csv"):
"""Summarize the search results
Expand Down

0 comments on commit a1c4a4c

Please sign in to comment.