Average MM/GBSA results

Averaging the MM/GBSA results from several simulations is done with the Python script av_mmgbsa.py that is located in /temp4/bio/Bin/

This script can be execute in two different ways:

  • Free-mode, the user specify what energies to print out and exactly what files to process
  • Script-mode, the user run a "script" with some arguments and uses pre-defined filenames

    Process only last snapshot
    For both types of execution, there is an optional first argument that can be appended before any other arguments:
    -last
    if this argument is used, the energies in each output-file will not be accumulated and averages will not be computed. In effect, only the last snapshot will be processed.

    Samuel Genheden, 2012


    Free-mode

  • The first argument is a string in quotation marks (") that tells the script was energies should be printed. The alternatives are:
          int
        ele
        vdw
        gb
        pb
        np
        ent

    that will print out internal, electrostatics, or van der Waals energies, generalized Born solvation, Poisson-Boltzmann solvation, non-polar solvation, and total entropy (-TS), respectively.

  • The rest of the arguments are interpreted as filenames to process. The filenames are given as groups.

    An internal mask sign, the tilde sign (~), are used to group the filenames. This sign is replaced with a star (*), internally, and the glob is expanded.
    The number of groups can be 1, 2, 3, or 6, and how the expanded globs are processed is given by the table

    # groups Effect
    1 Each of the files are process sequentially
    2 Each of the files are process sequentially.
    The entropy values are taken from the second group.
    3 Delta values (RL - R - L) are calculated.
    The groups should be complex, receptor, ligand, respectively.
    6 Delta values (RL - R - L) are calculated.
    The groups should be complex, receptor, ligand, respectively, 2 times.
    The second set of groups should contain entropy values.

    Note: if only a single file name is given (without any ~), the script will write out standard deviations for that file as well. Note that this will be the standard error of a single simulation, compared to an ensemble average that we usually compute. If two files are given (without any ~), the script will take the entropy values from the second file.


    Script-mode

  • The first argument needs to be -s in order to turn on the script-mode

  • The second argument should be the ligand name (typically in lowecase)

  • The third argument should be "script". The alternatives are:
         com
        prot
        rec
        lig
        del
    where prot and rec is equivalent. These scripts will process complex, receptor, ligand, or delta values (RL - R - L), respectively.

  • The fourth argument should be the number of independent simulations

  • The fifth argument should be a string in quotation marks (") that tells the script was energies should be printed. It is the same string as in free-mode.

  • Optionally: a sixth argument can be appended, -ent, that tell the script to not process separate entropy files.

    The script will assume filenames such as R1_mmpbsa/l01_com.all.out, where R1 is the folder of the independent run, and will change from 1 to the number of independent runs specified above. l01 is the ligand name as given to the script.


    Examples

    In all examples, l01 is the name of the ligand.

  • Print out average electrostatic, van der Waals, GB, non-polar and entropy for each complex output-file (there is 40 of them):
    av_mmgbsa.py -s l01 com 40 "ele vdw gb np ent"

  • Same as above, but do not process the entropy files:
    av_mmgbsa.py -s l01 com 40 "ele vdw gb np" -ent

  • Same again, but only process the first snapshot:
    av_mmgbsa.py -last -s l01 com 40 "ele vdw gb np ent"

  • The first example can be achieved with the free-mode, but the individual files will generally not be sorted:
    av_mmgbsa.py "ele vdw gb np ent" R~/l01_com.all.out R~/l01_tr_com.all.out

  • Print out GB solvation for the receptor (also works for simulations of free ligand):
    av_mmgbsa.py -s l01 rec 40 "gb" -ent

  • Print out delta electrostatics and GB solvation
    av_mmgbsa.py -s l01 del 40 "ele gb" -ent

    Note that in the last two examples that the -ent is unecessary if the entropy files exist (they will just be ignored), but if they do not exists, one has to give this flag.