parm_dock.c
来自「最经典的分子对结软件」· C语言 代码 · 共 1,659 行 · 第 1/3 页
C
1,659 行
/* *//* Copyright UCSF, 1997 *//* *//*Written by Todd Ewing10/95*/#include "define.h"#include "utility.h"#include "mol.h"#include "global.h"#include "dock.h"#include "search.h"#include "label.h"#include "io.h"#include "score.h"#include "score_dock.h"#include "match.h"#include "orient.h"#include "parm.h"#include "parm_dock.h"void get_parameters( DOCK *dock, ORIENT *orient, SCORE *score, LABEL *label){ int i, j; PARM parm = {0}; STRING40 parameter_name; STRING100 parameter_value; enum FILE_FORMAT format;/** Read parameters into buffer* 8/96 te*/ read_parameters (&parm);/** Begin reading in individual parameters* 8/96 te*/ fprintf (global.outfile, "\n________________General_Parameters________________\n"); get_parameter ( (void *) &label->flex.flag, &parm, Boolean, "flexible_ligand", "no", TRUE ); get_parameter ( (void *) &orient->flag, &parm, Boolean, "orient_ligand", "no", TRUE ); dock->multiple_orients = dock->multiple_orients || orient->flag; get_parameter ( (void *) &score->flag, &parm, Boolean, "score_ligand", "no", TRUE ); get_parameter ( (void *) &score->minimize.flag, &parm, Boolean, "minimize_ligand", "no", score->flag ); get_parameter ( (void *) &dock->multiple_ligands, &parm, Boolean, "multiple_ligands", "no", TRUE ); get_parameter ( (void *) &label->chemical.screen.flag, &parm, Boolean, "chemical_screen", "no", !orient->flag && !score->flag && dock->multiple_ligands ); label->chemical.flag = label->chemical.screen.flag; label->vdw.flag = orient->flag || label->flex.flag || score->flag || dock->multiple_ligands || label->chemical.screen.flag; get_parameter ( (void *) &dock->parallel.flag, &parm, Boolean, "parallel_jobs", "no", dock->multiple_ligands ); get_parameter ( (void *) &i, &parm, Integer, "random_seed", "0", label->flex.flag || score->minimize.flag || orient->flag ); srand (i); if (label->flex.flag || (global.output_volume == 'v')) fprintf (global.outfile, "\n____________Flexible_Ligand_Parameters____________\n"); get_parameter ( (void *) &label->flex.anchor_flag, &parm, Boolean, "anchor_search", "no", label->flex.flag && score->flag ); get_parameter ( (void *) &label->flex.multiple_anchors, &parm, Boolean, "multiple_anchors", "no", label->flex.anchor_flag ); get_parameter ( (void *) &label->flex.anchor_size, &parm, Integer, "anchor_size", label->flex.multiple_anchors ? "10" : "0", label->flex.multiple_anchors ); get_parameter ( (void *) &label->flex.periph_flag, &parm, Boolean, "peripheral_search", label->flex.anchor_flag ? "yes" : "no", FALSE /* Control over this parameter has been disabled 3/98 te */ ); get_parameter ( (void *) &label->flex.write_flag, &parm, Boolean, "write_partial_structures", "no", !dock->multiple_ligands && label->flex.periph_flag ); get_parameter ( (void *) &label->flex.drive_flag, &parm, Boolean, "torsion_drive", "no", label->flex.flag && (!label->flex.anchor_flag || label->flex.periph_flag) ); dock->multiple_conforms = label->flex.drive_flag; get_parameter ( (void *) &label->flex.clash_overlap, &parm, Real, "clash_overlap", label->flex.drive_flag ? "0.5" : "0", label->flex.drive_flag ); get_parameter ( (void *) &label->flex.max_conforms, &parm, Integer, label->flex.anchor_flag ? "configurations_per_cycle|peripheral_seeds" : "conformation_cutoff_factor|maximum_conformations", label->flex.drive_flag ? (label->flex.anchor_flag ? "25" : "5") : "1", label->flex.drive_flag ); if ((label->flex.max_conforms <= 0) || (label->flex.max_conforms >= INT_MAX)) exit (fprintf (global.outfile, "ERROR get_parameters: " "Value for %s not acceptable.\n", label->flex.anchor_flag ? "configurations_per_cycle" : "conformation_cutoff_factor")); get_parameter ( (void *) &label->flex.minimize_flag, &parm, Boolean, "torsion_minimize", "no", label->flex.flag && score->minimize.flag && (!label->flex.anchor_flag || label->flex.periph_flag) ); if (label->flex.anchor_flag && !label->flex.drive_flag && !label->flex.minimize_flag) exit (fprintf (global.outfile, "ERROR get_parameters: torsion_drive or torsion_minimize must be \n" " selected with anchor_search.\n")); get_parameter ( (void *) &label->flex.reminimize_layers, &parm, Integer, "reminimize_layer_number", label->flex.minimize_flag && label->flex.periph_flag ? "2" : "0", label->flex.minimize_flag && label->flex.periph_flag ); get_parameter ( (void *) &label->flex.minimize_anchor_flag, &parm, Boolean, "minimize_anchor", score->minimize.flag ? "yes" : "no", score->minimize.flag && label->flex.periph_flag ); get_parameter ( (void *) &label->flex.reminimize_anchor_flag, &parm, Boolean, "reminimize_anchor", score->minimize.flag && label->flex.periph_flag ? "yes" : "no", score->minimize.flag && label->flex.periph_flag ); get_parameter ( (void *) &label->flex.reminimize_ligand_flag, &parm, Boolean, "reminimize_ligand", score->minimize.flag && label->flex.periph_flag ? "yes" : "no", score->minimize.flag && label->flex.periph_flag ); get_parameter ( (void *) &label->flex.max_torsions, &parm, Integer, "flexible_bond_maximum", label->flex.flag && dock->multiple_ligands ? "10" : "<infinity>", label->flex.flag && dock->multiple_ligands ); if (orient->flag || (global.output_volume == 'v')) fprintf (global.outfile, "\n_____________Orient_Ligand_Parameters_____________\n"); get_parameter ( (void *) &orient->match.flag, &parm, Boolean, "match_receptor_sites", label->chemical.screen.pharmaco_flag && label->chemical.screen.fold_flag ? "yes" : "no", orient->flag ); get_parameter ( (void *) &orient->random_flag, &parm, Boolean, "random_search", "no", orient->flag ); if (orient->flag && !orient->match.flag && !orient->random_flag) exit (fprintf (global.outfile, "ERROR get_parameters: No orient_ligand options selected\n")); get_parameter ( (void *) &orient->match.centers_flag, &parm, Boolean, "ligand_centers|match_ligand_centers", "no", orient->flag && !dock->multiple_ligands ); get_parameter ( (void *) &orient->match.auto_flag, &parm, Boolean, "automated_matching|uniform_sampling", orient->match.flag && !dock->multiple_ligands ? "yes" : "no", orient->match.flag ); if ((label->flex.periph_flag == TRUE) && (orient->flag == TRUE)) fprintf (global.outfile, "ATTENTION get_parameters: " "For this run, maximum_orientations value\n" " used to allocate memory for array. So don't set it too large.\n"); get_parameter ( (void *) &orient->max, &parm, Integer, "maximum_orientations|total_orientations", orient->flag ? (orient->match.auto_flag ? "500" : "5000") : "1", orient->flag ); if ((orient->max <= 0) || (orient->max >= INT_MAX)) exit (fprintf (global.outfile, "ERROR get_parameters: " "Value for maximum_orientations not acceptable.\n")); get_parameter ( (void *) &dock->write_orients, &parm, Boolean, label->flex.drive_flag ? (orient->flag ? "write_configurations|write_orientations" : "write_conformations|write_orientations") : "write_orientations", "no", orient->flag || label->flex.drive_flag ); get_parameter ( (void *) &dock->rank_orients, &parm, Boolean, label->flex.drive_flag ? (orient->flag ? "rank_configurations|rank_orientations" : "rank_conformations|rank_orientations") : "rank_orientations", score->flag && dock->write_orients ? "yes" : "no", score->flag && dock->write_orients && orient->flag && !label->flex.drive_flag ); get_parameter ( (void *) &dock->rank_orient_total, &parm, Integer, label->flex.drive_flag ? (orient->flag ? "write_configuration_total|rank_orientation_total" : "write_conformation_total|rank_orientation_total") : "rank_orientation_total", dock->rank_orients ? "100" : "1", dock->rank_orients ); if ((dock->rank_orient_total <= 0) || (dock->rank_orient_total >= INT_MAX)) exit (fprintf (global.outfile, "ERROR get_parameters: Value for %s not acceptable.\n", label->flex.drive_flag ? (orient->flag ? "write_configuration_total" : "write_conformation_total") : "rank_orientation_total")); if (label->flex.periph_flag == TRUE) { dock->rank_anchors = TRUE; dock->rank_anchor_total = orient->flag ? orient->max : 1; } else { dock->rank_anchors = dock->rank_orients; dock->rank_anchor_total = dock->rank_orient_total; } if ((orient->match.flag && !orient->match.auto_flag) || (global.output_volume == 'v')) fprintf (global.outfile, "\n_________________Match_Parameters_________________\n"); get_parameter ( (void *) &orient->match.clique_size_min, &parm, Integer, "nodes_minimum", orient->match.flag ? "3" : "0", orient->match.flag && !orient->match.auto_flag ); get_parameter ( (void *) &orient->match.clique_size_max, &parm, Integer, "nodes_maximum", orient->match.flag ? "10" : "0", orient->match.flag && !orient->match.auto_flag ); get_parameter ( (void *) &orient->match.distance_tolerance, &parm, Real, "distance_tolerance", orient->match.flag ? "0.25" : "0", orient->match.flag && !orient->match.auto_flag ); get_parameter ( (void *) &orient->match.distance_minimum, &parm, Real, "distance_minimum", orient->flag && orient->match.flag ? "2.0" : "0", orient->flag && orient->match.flag && !orient->match.auto_flag ); get_parameter ( (void *) &orient->match.degeneracy_flag, &parm, Boolean, "check_degeneracy", "no", orient->flag && orient->match.flag && !orient->match.auto_flag ); get_parameter ( (void *) &orient->match.reflect_flag, &parm, Boolean, "reflect_ligand", "no", orient->flag && orient->match.flag && !orient->match.auto_flag && (orient->match.clique_size_max > 3) ); get_parameter ( (void *) &orient->match.critical_flag, &parm, Boolean, "critical_points", "no", orient->flag && orient->match.flag && !orient->match.auto_flag ); get_parameter ( (void *) &orient->match.multiple_flag, &parm, Boolean, "multiple_points", "no", orient->match.critical_flag ); get_parameter ( (void *) &orient->match.chemical_flag, &parm, Boolean, "chemical_match", label->chemical.screen.pharmaco_flag ? "yes" : "no", orient->flag && orient->match.flag && !orient->match.auto_flag ); label->chemical.flag = label->chemical.flag || orient->match.chemical_flag; if (score->flag || (global.output_volume == 'v')) fprintf (global.outfile, "\n________________Scoring_Parameters________________\n"); get_parameter ( (void *) &score->intra_flag, &parm, Boolean, "intramolecular_score", label->flex.flag && score->flag ? "yes" : "no", label->flex.flag && score->flag ); get_parameter ( (void *) &score->inter_flag, &parm, Boolean, "intermolecular_score", score->flag ? "yes" : "no", score->flag ); if (score->flag && !score->intra_flag && !score->inter_flag) exit (fprintf (global.outfile, "ERROR get_parameters: No scoring options selected\n")); get_parameter ( (void *) &score->grid.flag, &parm, Boolean, "gridded_score", score->inter_flag ? "yes" : "no", score->inter_flag ); get_parameter ( (void *) &score->grid.version, &parm, Real, "grid_version", "4.0", score->grid.flag ); if ((score->grid.version < 3.0) || (score->grid.version > 4.0)) exit (fprintf (global.outfile, "ERROR get_parameters: grid_version selection not supported\n")); get_parameter ( (void *) &score->grid.size, &parm, Integer, "grid_points", (score->grid.version < 4) ? "1000000" : "0", score->grid.version < 4 ); get_parameter ( (void *) &score->grid.spacing, &parm, Real, "receptor_atom_grid_spacing", score->inter_flag && !score->grid.flag ? "2.0" : "0.0", FALSE ); if (score->inter_flag && !score->grid.flag && (score->grid.spacing <= 0.0)) exit (fprintf (global.outfile, "ERROR get_parameters: Innappropriate grid_spacing value.\n")); get_parameter ( (void *) &score->bump.flag, &parm, Boolean, "bump_filter", "no", orient->flag && score->grid.flag ); get_parameter ( (void *) &score->bump.maximum, &parm, Integer, "bump_maximum", "0", score->bump.flag ); score->type[NONE].flag = !score->flag; strcpy (score->type[NONE].name, "none"); strcpy (score->type[NONE].abbrev, "out");
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?