Beispiel #1
0
def molprobity_validation_multiple_targets(targetids=None, modeling_stage=None, loglevel=None):
    """
Calculate model quality using MolProbity ``oneline-analysis`` command.

For each target, this function outputs a text file named
``models/[targetid]/validation_scores_sorted-[method]-[ensembler_stage]`` which contains a list of
targetids sorted by validation score. This can be used by the subsequent ``package_models`` command
to filter out models below a specified quality threshold.

Typically, this should be run after models have been refined to the desired extent (e.g. after
implicit or explicit MD refinement)

More detailed validation results are written to the individual model directories.

MPI-enabled.

    Parameters
    ----------
    targetids: list of str or str
    modeling_stage: str
        {None|build_models|refine_implicit_md|refine_explicit_md}
        Default: None (automatically selects most advanced stage)
    """
    set_loglevel(loglevel)
    if targetids is None:
        targetids = [target.id for target in get_targets()]
    elif type(targetids) is str:
        targetids = [targetids]
    for targetid in targetids:
        logger.info("Working on target {}".format(targetid))
        molprobity_validation(targetid=targetid, ensembler_stage=modeling_stage, loglevel=loglevel)
Beispiel #2
0
def molprobity_validation_multiple_targets(targetids=None,
                                           modeling_stage=None,
                                           loglevel=None):
    """
Calculate model quality using MolProbity ``oneline-analysis`` command.

For each target, this function outputs a text file named
``models/[targetid]/validation_scores_sorted-[method]-[ensembler_stage]`` which contains a list of
targetids sorted by validation score. This can be used by the subsequent ``package_models`` command
to filter out models below a specified quality threshold.

Typically, this should be run after models have been refined to the desired extent (e.g. after
implicit or explicit MD refinement)

More detailed validation results are written to the individual model directories.

MPI-enabled.

    Parameters
    ----------
    targetids: list of str or str
    modeling_stage: str
        {None|build_models|refine_implicit_md|refine_explicit_md}
        Default: None (automatically selects most advanced stage)
    """
    set_loglevel(loglevel)
    if targetids is None:
        targetids = [target.id for target in get_targets()]
    elif type(targetids) is str:
        targetids = [targetids]
    for targetid in targetids:
        logger.info('Working on target {}'.format(targetid))
        molprobity_validation(targetid=targetid,
                              ensembler_stage=modeling_stage,
                              loglevel=loglevel)
Beispiel #3
0
def dispatch(args):
    if args['--targetsfile']:
        with open(args['--targetsfile'], 'r') as targetsfile:
            targets = [line.strip() for line in targetsfile.readlines() if line[0] != '#']
    elif args['--targets']:
        targets = args['--targets'].split(',')
    else:
        targets = [target.id for target in get_targets()]

    if args['--modeling_stage'] == 'auto':
        modeling_stage = None
    elif args['--modeling_stage']:
        modeling_stage = args['--modeling_stage']
    else:
        modeling_stage = None

    for target in targets:
        MkTraj(targetid=target, ensembler_stage=modeling_stage)