3. Refinement

Refine the top-scoring models from previous modelling modes/runs

  1. Enter your main project directory (where your X_config.json is)

  2. Prepare a template JSON file for refinement

    gen_refinement_template.py --out_json refine_template.json --params params.py X_config.json
    
  3. Modify the template according to your needs, e.g.:

    1. Add restraints specific for the refinement

    2. Change weights of restraints

    3. Re-define the rigid bodies

    4. Add extra subunits and their PDB files

    See JSON setup in the Elongator tutorial for an example.

  4. Create a params_refine.py file as in Parameter file but now with the refine protocol and adjusting the scoring function and other settings, as appropriate for your case.

Refine a single model

  1. Set up a refinement directory

    model_id=0014032model
    setup_refine.py \
        --model $model_id \
        --previous_json X_config.json \
        --refine_json_template refine_template.json \
        --refine_json_outname refine.json \
        --previous_outdir <output directory of the denovo run>/\
        --refine_outdir <desired output directory for the refinement, e.g. out/refinement>
    

    The script will create a new refinement directory and copy all input files there.

  2. Perform test run

    mkdir -p <desired output directory for the refinement>/$model_id/testout
    assembline.py \
        --traj \
        --models \
        -o <desired output directory for the refinement>/$model_id/testout \
        --prefix refine_"$model_id"_000000 \
        <desired output directory for the refinement>/$model_id/refine.json \
        params_refine.py
    
  3. Run

    assembline.py \
        --traj \
        --models \
        -o <desired output directory for the refinement>/$model_id/out \
        --multi \
        --start_idx 0 \
        --njobs 3 \
        --prefix refine_"$model_id" \
        <desired output directory for the refinement>/$model_id/refine.json \
        params_refine.py
    

Refine multiple models

  1. Set up a refinement directory

    setup_refine.py \
        --top 10 \
        --scores <output directory of the denovo run>/all_scores_uniq.csv \
        --previous_json X_config.json \
        --refine_json_template refine_template.json \
        --refine_json_outname refine.json \
        --previous_outdir <output directory of the denovo run>/\
        --refine_outdir <desired output directory for the refinement, e.g. out/refinement>
    
  2. Run recursively:

    If the output directory for the refinement was defined above as out/refinement:

    for model_id in `ls --color=never out/refinement`;
        do
            echo $model_id
            assembline.py \
                --models \
                -o out/refinement/"$model_id"/out \
                --multi \
                --start_idx 0 \
                --njobs 3 \
                --prefix refine_"$model_id" out/refinement/"$model_id"/refine.json \
                params_refine.py
        done