Orca_ComQum
Comqum is a method to do combined QM/MM calculations.
In principle, it is a general procedure for any QM and MM programs. Originally, it was implemented for Amber and Turbomole, but this page describes the implementation with Orca instead of Turbomole

The proper references of ComQum are:

The interface programs are located in:

The code is in /temp4/bio/Comqum.

ComQum is a free interface program that you can get from Ryde by request.
However, note that to run ComQum, you also need the softwares Orca and Amber but both of them are for free.

The documentation is this file, the ComQum page and a detailed specification of the ComQum file formats: comqum01.pdf.

The program employs two orca input files.

The file otool_external performs the actual QM/MM calculations, including the call of "orca orca.inp". It is run once in each geometry-optimisation cycle. It should not be modified.



How to start a Orca_ComQum calculation

  1. Follow the instructions on the ComQum page, points 1-13,
    except that you in point 6 run (instead of comqumtoturbo)
    comqumtoorca

    Note also that checkcoord in cqprep will crash (no control file), which is OK.

  2. Modify the orca.inp file to get the proper QM calculations, in particular the charge and multiplicity
    Uncomment the %chelpg lines if you do not intend to relax the surroundings

  3. Remove unneccesary files (an make a backup) by command
    gzip *; gunzip comqum.dat cqo.inp orca.inp orca.xyz otool_external pointcharges prm* sander.*3.gz q*; mkdir Gz; mv *.gz Gz; cp * Gz; gzip Gz/*

    The following 13 files should be left:
    comqum.dat cqo.* orca.inp otool_external pointcharges prmcrd1 prmcrd3 prmtop1  prmtop2 prmtop3 sander.in3 sander.out3

  4. Typically you first run a protein-fixed calculation (default input; i.e.
    $protein fixed
    in the file comqum.dat file.
    It is started by
    orca cqo.inp >cqo.out

    The final results are in the prmcrd3 and in the cqo.xyz files.

    You can build pdb files from those (pdb and pdb3) using the command
    cqtopdb

    The file comqum.ene contains the QM/MM, QM and MM energies of the various steps.


  5. Then, you run protein-free (i.e. you relax system 2 with MM). Set (in a new directory)
    $protein free
    in file comqum.dat
    and uncomment the %chelpg lines in orca.inp.

    If you have a residue with net charged groups outside the QM system, you need to insert into comqum.dat (change the residue number and the desired charge).
    $residue_charge_corr
     1
     652 -1

    Then, you can start the program with
    orca cqo.inp >cqo_free.out

    Sometimes, the calculation crashes, saying that the charge of the system has changed. Check the comqum.html page to see how to solve it (point 17).


orca-comqum consists of two files, both generated by comqumtoorca

The first is
cqo.inp
which is a simple orca input file to drive the whole optimisation:

# This is a Orca-ComQum driver, also using Orca, generated by comqumtoorca

# Do not change this file

# Plastocyanin, reduced, Ser-11=Wat, 7/3-22
# Pcred/Cu1, ComQum on ImPc42CM, 16/24 A, DZpdf/6-31G*, 3/12-99

! COpt ExtOpt

* xyzfile 0 1 cqo_EXT.xyz

%Output
 PrintLevel Debug
end

The second is
otool_external
which is the actual comqum script, which is run in every geometry optimisation step to generate the QM and MM energies and gradients.

# This is the Orca-ComQum script that calculates the energies and gradients
# UR 11/3-22

# Initialise the output file
date  >comqum.out
pwd  >>comqum.out
echo "This is Orca-ComQum, 11/3-22" >>comqum.out
echo >>comqum.out

# Decide if the surroundings are fixed or not
grep '$protein free' comqum.dat >temp.ulf
if [ -s temp.ulf ]
then
   protfix="n"
   echo "The surroundings are relaxed" >>comqum.out
else
   protfix="y"
   echo "The surroundings are fixed"   >>comqum.out
fi

# Insert updated coordinates into MM
echo >>comqum.out
echo "Running Fix Coord 1" >>comqum.out
fixcoord1_orcain   >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
fixcoord1_amberin  >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
fixcoord1          >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
fixcoord1_amberout >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi

# Calculate QM energy and gradients
echo >>comqum.out
echo "Running Orca" >>comqum.out
orca orca.inp >>comqum.out
if [ $? -ne 0 ] ; then exit 1 ; fi

# Calculate the two MM energies and gradients
echo >>comqum.out
echo "Running CalcForce MM1" >>comqum.out
calcforce <<EOF >>comqum.out
prmtop1
m
prmcrd1
1000
mden1
force1
EOF
if [ $? -ne 0 ] ; then exit 1 ; fi
echo >>comqum.out
echo "Running CalcForce MM12" >>comqum.out
calcforce <<EOF >>comqum.out
prmtop2
m
prmcrd3
1000
mden2
force2
EOF
if [ $? -ne 0 ] ; then exit 1 ; fi

# Add the energies
echo >>comqum.out
echo "Running FixEnergy" >>comqum.out
fixenergy_orcain  >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
fixenergy_amberin >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
fixenergy         >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
fixenergy_orcaout >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi

# Add the forces
echo >>comqum.out
echo "Running FixForce" >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
fixforce_orcain  >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
fixforce_amberin >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
fixforce         >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
fixforce_orcaout >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi

# Calculate and insert QM charges
if [ "$protfix" = "n" ]
   then
   echo >>comqum.out
   echo "Running Fix Coord 1"
   fixcharge_orcain   >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
   fixcharge_amberin  >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
   fixcharge          >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
   fixcharge_amberout >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi

# Relax surroundings
   echo >>comqum.out
   echo "Running sander.in3"  >>comqum.out
   sander -O -i sander.in3 -o sander.out3 -r mdrest3 -c prmcrd3 -p prmtop3
if [ $? -ne 0 ] ; then exit 1 ; fi

# Insert updated coordinates in pointcharges
   echo >>comqum.out
   echo "Running Fix Coord 2"  >>comqum.out
   fixcoord2_orcain  >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
   fixcoord2_amberin >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
   fixcoord2         >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
   fixcoord2_orcaout >>comqum.out; if [ $? -ne 0 ] ; then exit 1 ; fi
fi

# Finished
echo >>comqum.out
echo "Orca-ComQum Energy & Gradient done" >>comqum.out
date >>comqum.out