Re: [AMBER] bug when running QM/MM with orca as external program

From: Clorice Reinhardt via AMBER <amber.ambermd.org>
Date: Mon, 25 May 2026 21:54:21 +0000

Hi Anders,

I have not any problems with Amber/ORCA interface. I'm not sure why you are calling ORCA in this way... Amber calls ORCA when it needs the forces on the atoms at each time step, or to perform the minimization.

Therefore, you only write the command to call AMBER not ORCA in your job submission file. The original QM/MM interface paper has a nice flow chart if your confused on the flow of information. Amber writes the input files for orca at each minimization or time step, you do not need to do this for it.

For example, my slurm file looks like the following for QM/M I do (with some information redacted 🙂 )


module load amber/24
echo $AMBERHOME

module load gcc/13.3.0
module load openmpi/5.0.5
module load orca/6.0.1

## amber can't find orca unless you explicitly tell it where the paths are. Probably could remedy this by passing the path while compiling, but I didn't compile the version on the cluster and it works fine

ORCA_PATH=YOURPATH
ORCARUN=YOURPATHTOEXECUTEABLE
export PATH="/gpfs1/sw/x86_64/rh7/pkgs/orca/6.0.0/orca:$PATH"

top=my_parmtop

$sander -O -i qmmm_md.in -o qmmm_md.out -p ${top}.prmtop -c YOUR_RESTART.rst -r qmmm_md.rst -x qmmm_md.netcdf

I read in an orca template file with into amber (contain these among others):
%pal nprocs 24 end
%maxcore 3600

Confirming it worked (looking at orc_job.dat which gets produced each time orca is called and is the default name of the output file):
" ************************************************************
           * Program running with 24 parallel MPI-processes *
           * working on a common directory *
           ************************************************************
------------------------------------------------------------------------------
                             ORCA STARTUP CALCULATIONS
                           -- RI-GTO INTEGRALS CHOSEN --
------------------------------------------------------------------------------
"

Your happy to reach out to me if you have questions. I run a ton of QM/MM and have dug into the source code and used the interface with Qchem, Gaussian and ORCA without a hitch, but Andreas Goetz is who'd I reach out if you have questions. He wrote the original paper on the interface, and he's super nice.

https://scholar.google.com/citations?user=PJusscIAAAAJ&hl=en

Clorice
________________________________
From: Anders Frederiksen via AMBER <amber.ambermd.org>
Sent: Monday, May 25, 2026 9:52 AM
To: amber.ambermd.org <amber.ambermd.org>
Subject: [AMBER] bug when running QM/MM with orca as external program

Dear amber forum,

I have in the last week been working with the QM/MM interface of the
amber programme and especially focussing with performing a QM/MM
simulation with orca as the external program.

I have had great success running with orca as external program on small
test systems for short simulations with sander running on multiple
processors through MPI and orca running on single core through num
threads = 1.

However, if I want to run any kind of multi processing the QM part of
the simulation crashes with the error

ORCA finished by error termination in orca_util
Calling Command: mpirun -np 2
/pdc/software/24.11/other/orca/6.1.0/orca_util_mpi orc_job orca_hostfile
orc_job
[file orca_tools/qcmsg.cpp, line 394]:
   .... aborting the run

This in principle is not surprising if we take a quick look at the orca
documentation where it states:

Do not start the ORCA driver with mpirun!

I have tested and if I use ORCA the intended way, that is calling ORCA
with its full path followed by the input file it runs just fine on
multiple processors and therefore the fix for the amber call should be
quite simple: Remove the "mpirun -np #MPIprocessors" call when orca is
initiated.

I should not that this should not be a version dependent thing for orca
as I have found documentation all the way back in ORCA 3 (i.e.
documentation from 2015), stating that starting ORCA with mpirun will
make it crash.

I have tried to work around the issue by using a template file
(use_template =1) however sadly AMBER seems to read the nprocs flag and
will make ORCA run through mpirun, leading to the same error as if
initiated with AMBER input.


If anyone have found another workaround I am all ears, though I hope
this mail reaches a developer as the fix on paper should be rather
simple, though given my inexperience in development it could not be as
simple as I want it to be.

Best,

Anders Frederiksen
Postdoctoral researcher
KTH, department of Chemistry, Stockholm, Sweden.


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon May 25 2026 - 15:00:03 PDT
Custom Search