global_properties:
  working_dir_path: biobb_wf_pmx_tutorial
  can_write_console_log: False
  mutations:
    stateA: 10Ala
    stateB: 10Ile
  input_trajs:
    stateA:
      input_tpr_path: pmx_tutorial/stateA.tpr
      input_traj_path: pmx_tutorial/stateA_1ns.xtc
    stateB:
      input_tpr_path: pmx_tutorial/stateB.tpr
      input_traj_path: pmx_tutorial/stateB_1ns.xtc

step0_trjconv:
  paths:
    output_str_ens_path: state_frames.zip
  properties:
    selection : System
    start: 1
    end: 1000
    skip: 2
    output_name: frame
    output_type: pdb

step1_pmx_mutate:
  paths:
    output_structure_path: mut.pdb
  properties:
    force_field: amber99sb-star-ildn-mut
    gmx_lib: /opt/conda/envs/biobb_wf_pmx_tutorial/lib/python3.10/site-packages/pmx/data/mutff

step2_gmx_pdb2gmx:
  paths:
    input_pdb_path: dependency/step1_pmx_mutate/output_structure_path
    output_gro_path: mut_gmx.gro
    output_top_zip_path: mut_gmx.top.zip
  properties:
    force_field : amber99sb-star-ildn-mut
    gmx_lib: /opt/conda/envs/biobb_wf_pmx_tutorial/lib/python3.10/site-packages/pmx/data/mutff

step3_pmx_gentop:
  paths:
    input_top_zip_path: dependency/step2_gmx_pdb2gmx/output_top_zip_path
    output_top_zip_path: mut_gmx_hybrid_top.zip
    output_log_path: mut_gmx_hybrid.log
  properties:
    force_field : amber99sb-star-ildn-mut
    gmx_lib: /opt/conda/envs/biobb_wf_pmx_tutorial/lib/python3.10/site-packages/pmx/data/mutff

step4_gmx_makendx:
  paths:
    input_structure_path: dependency/step2_gmx_pdb2gmx/output_gro_path
    output_ndx_path: index_pmx.ndx
  properties:
    selection : "a D*\n0 & ! 19\nname 20 FREEZE"

step5_gmx_grompp:
  paths:
    input_gro_path: dependency/step2_gmx_pdb2gmx/output_gro_path
    input_top_zip_path: dependency/step3_pmx_gentop/output_top_zip_path
    input_ndx_path: dependency/step4_gmx_makendx/output_ndx_path
    output_tpr_path: em.tpr
  properties:
    gmx_lib: /opt/conda/envs/biobb_wf_pmx_tutorial/lib/python3.10/site-packages/pmx/data/mutff
    simulation_type: minimization
    mdp:
      integrator : steep
      emtol: 100
      dt: 0.001
      nsteps: 10000
      nstcomm: 1
      nstcalcenergy: 1
      freezegrps: FREEZE
      freezedim: Y Y Y

step6_gmx_mdrun:
  paths:
    input_tpr_path: dependency/step5_gmx_grompp/output_tpr_path
    output_trr_path: emout.trr
    output_gro_path: emout.gro
    output_edr_path: emout.edr
    output_log_path: emout.log

step7_gmx_grompp:
  paths:
    input_gro_path: dependency/step6_gmx_mdrun/output_gro_path
    input_top_zip_path: dependency/step3_pmx_gentop/output_top_zip_path
    input_ndx_path: dependency/step4_gmx_makendx/output_ndx_path
    output_tpr_path: eq.tpr
  properties:
    gmx_lib: /opt/conda/envs/biobb_wf_pmx_tutorial/lib/python3.10/site-packages/pmx/data/mutff
    simulation_type: free
    mdp:
      nsteps: 10000
      nstcomm: 1
      nstcalcenergy: 1
      dt: 0.001

step8_gmx_mdrun:
  paths:
    input_tpr_path: dependency/step7_gmx_grompp/output_tpr_path
    output_trr_path: eqout.trr
    output_gro_path: eqout.gro
    output_edr_path: eqout.edr
    output_log_path: eqout.log

step9_gmx_grompp:
  paths:
    input_gro_path: dependency/step8_gmx_mdrun/output_gro_path
    input_top_zip_path: dependency/step3_pmx_gentop/output_top_zip_path
    input_ndx_path: dependency/step4_gmx_makendx/output_ndx_path
    output_tpr_path: ti.tpr
  properties:
    gmx_lib: /opt/conda/envs/biobb_wf_pmx_tutorial/lib/python3.10/site-packages/pmx/data/mutff
    simulation_type: free
    maxwarn: 1
    mdp:
      nsteps: 5000
      free_energy: "yes"
      init-lambda: 0
      delta-lambda: 2e-4
      sc-alpha: 0.3
      sc-coul: "yes"
      sc-sigma: 0.25

step10_gmx_mdrun:
  paths:
    input_tpr_path: dependency/step9_gmx_grompp/output_tpr_path
    output_trr_path: ti.trr
    output_gro_path: ti.gro
    output_edr_path: ti.edr
    output_log_path: ti.log
    output_dhdl_path: ti_dhdl.xvg

step11_pmx_analyse:
  paths:
    input_a_xvg_zip_path: dhdlA.zip
    input_b_xvg_zip_path: dhdlB.zip
    output_result_path: pmx.txt
    output_work_plot_path: pmx.plots.png
  properties:
    reverseB : True
