Qm/mm calculation

Hi
I want to do a qm/mm calculation, but I am getting an error. Here is the input that I have made according to the q-chem manual description:
$force_field_params
NumAtomTypes
AtomType -1
AtomType -2
. . .
AtomType -n
Bond
. . .
Angle

. . .
Torsion

. . .
$end

input:
$molecule
0 1
N 3.20180000 0.27960000 4.62960000 -1 2 37 56 0
C 2.43660000 -0.82800000 5.09840000 -2 3 1 4 0
C 1.23330000 -0.60970000 5.68810000 -3 2 26 15 0
C 3.08560000 -2.14500000 4.88490000 -4 2 5 13 0
C 4.47050000 -2.26340000 4.97070000 -4 4 7 6 0
H 4.99380000 -1.50480000 5.19970000 -5 5 0 0 0
C 5.09100000 -3.47260000 4.72560000 -4 5 8 9 0
H 6.03520000 -3.54780000 4.80960000 -5 7 0 0 0
C 4.33970000 -4.57740000 4.35650000 -4 7 10 11 0
H 4.76870000 -5.40700000 4.18170000 -5 9 0 0 0
C 2.97330000 -4.47320000 4.24280000 -4 9 13 12 0
H 2.45800000 -5.22990000 3.98670000 -5 11 0 0 0
C 2.34480000 -3.26050000 4.50310000 -4 11 4 14 0
H 1.40070000 -3.19230000 4.41950000 -5 13 0 0 0
C 0.57590000 -1.63380000 6.56610000 -4 3 24 16 0
C 1.32420000 -2.34160000 7.51290000 -4 15 17 18 0
H 2.26260000 -2.20150000 7.57250000 -5 16 0 0 0
C 0.70920000 -3.24250000 8.36080000 -4 16 19 20 0
H 1.22330000 -3.70790000 9.00960000 -5 18 0 0 0
C -0.64630000 -3.46780000 8.26760000 -4 18 22 21 0
H -1.06450000 -4.09340000 8.84650000 -5 20 0 0 0
C -1.39300000 -2.78720000 7.33580000 -4 20 24 23 0
H -2.32630000 -2.94750000 7.26620000 -5 22 0 0 0
C -0.78410000 -1.86440000 6.49540000 -4 22 15 25 0
H -1.30910000 -1.38560000 5.86420000 -5 24 0 0 0
C 0.52980000 0.69150000 5.54720000 -4 3 35 27 0
C -0.06630000 1.30670000 6.65450000 -4 26 29 28 0
H -0.00660000 0.89930000 7.51150000 -5 27 0 0 0
C -0.74770000 2.51670000 6.50410000 -4 27 31 30 0
H -1.14470000 2.93310000 7.26010000 -5 29 0 0 0
C -0.84750000 3.10600000 5.27260000 -4 29 32 33 0
H -1.30970000 3.93040000 5.17690000 -5 31 0 0 0
C -0.27730000 2.50400000 4.17120000 -4 31 35 34 0
H -0.34700000 2.91430000 3.31760000 -5 33 0 0 0
C 0.39620000 1.30210000 4.30730000 -4 33 26 36 0
H 0.77260000 0.88810000 3.54010000 -5 35 0 0 0
C 3.69540000 1.32380000 5.44020000 -4 1 38 46 0
C 3.48870000 1.55180000 6.79610000 -4 37 40 39 0
H 2.93020000 0.98690000 7.31800000 -5 38 0 0 0
C 4.14120000 2.65110000 7.35280000 -4 38 42 41 0
H 4.02590000 2.83820000 8.27660000 -5 40 0 0 0
C 4.95100000 3.47460000 6.59490000 -4 40 44 43 0
H 5.38010000 4.21390000 7.00860000 -5 42 0 0 0
C 5.14850000 3.24530000 5.25210000 -4 42 46 45 0
H 5.69820000 3.82510000 4.73640000 -5 44 0 0 0
C 4.52520000 2.14420000 4.66270000 -6 44 37 47 0
C 4.54380000 1.59550000 3.32400000 -6 46 48 56 0
C 5.15840000 1.97460000 2.14050000 -4 47 50 49 0
H 5.69930000 2.75450000 2.10610000 -5 48 0 0 0
C 4.97060000 1.19740000 1.00760000 -4 48 52 51 0
H 5.39910000 1.44210000 0.19510000 -5 50 0 0 0
C 4.16020000 0.06080000 1.04530000 -4 50 53 54 0
H 4.03740000 -0.44940000 0.25300000 -5 52 0 0 0
C 3.53160000 -0.33900000 2.21600000 -4 52 55 56 0
H 2.98370000 -1.11420000 2.24170000 -5 54 0 0 0
C 3.73560000 0.43860000 3.34770000 -4 54 47 1 0
$end

$rem
basis = sto-3g
exchange = wb97xd
qm_mm_interface = janus
force_field = amber99
user_connect = true
jobtype = opt
user_connect = true
symmetry false
$end

$force_field_params
NumAtomTypes 6
AtomType -1 -0.02950000 3.2058099 0.2042
AtomType -2 0.05170000 3.3152123 0.0988
AtomType -3 0.00260000 3.3152123 0.0988
AtomType -4 -0.07780000 3.3152123 0.0988
AtomType -5 0.13950000 2.6254785 0.0161
AtomType -6 -0.07550000 3.3152123 0.0988
Bond -1 -2 610.60 1.4210
Bond -2 -3 904.32 1.3510
Bond -2 -4 573.02 1.4760
Bond -4 -5 791.44 1.0860
Bond -4 -6 736.88 1.4060
Angle -2 -1 -4 129.38 126.610
Angle -4 -1 -4 134.52 120.050
Angle -3 -2 -1 174.43 119.190
Angle -3 -2 -4 131.47 127.520
Angle -4 -2 -1 174.43 119.190
Angle -4 -3 -4 131.47 127.520
Angle -4 -3 -2 131.48 127.520
Angle -2 -4 -4 133.16 120.820
Angle -4 -4 -4 137.53 120.020
Angle -4 -4 -5 97.36 119.880
Angle -4 -6 -6 132.24 121.110
Angle -4 -6 -4 137.75 118.380
Angle -6 -6 -4 132.24 121.110
Torsion -1 -4 -6 -6 3.625 180.0 2
Torsion -1 -2 -3 -4 6.650 180.0 2
Torsion -1 -2 -4 -4 0.700 180.0 2
Torsion -1 -4 -6 -4 3.625 180.0 2
Torsion -1 -4 -4 -4 3.625 180.0 2
Torsion -2 -1 -4 -6 0.300 180.0 2
Torsion -2 -1 -4 -4 0.300 180.0 2
Torsion -2 -3 -4 -4 0.505 180.0 2
Torsion -2 -4 -4 -4 3.625 180.0 2
Torsion -4 -1 -2 -3 0.728 180.0 2
Torsion -3 -2 -4 -4 0.505 180.0 2
Torsion -4 -2 -3 -4 8.510 180.0 2
Torsion -4 -4 -4 -4 3.625 180.0 2
Torsion -4 -3 -4 -4 0.505 180.0 2
Torsion -3 -4 -4 -4 3.625 180.0 2
Torsion -4 -1 -2 -4 0.728 180.0 2
Torsion -4 -4 -3 -4 0.505 180.0 2
Torsion -4 -1 -4 -6 0.300 180.0 2
Torsion -4 -6 -4 -4 3.625 180.0 2
Torsion -4 -6 -6 -4 0.795 180.0 2
Torsion -4 -1 -4 -4 0.300 180.0 2
Torsion -4 -4 -6 -4 3.625 180.0 2
Torsion -4 -4 -6 -6 3.625 180.0 2
Torsion -4 -4 -4 -6 3.625 180.0 2
Torsion -6 -6 -4 -4 3.625 180.0 2
Torsion -2 -1 -4 -4 1.100 180.0 2
Torsion -1 -2 -3 -4 1.100 180.0 2
Torsion -4 -4 -3 -2 1.100 180.0 2
Torsion -4 -4 -4 -2 1.100 180.0 2
Torsion -4 -4 -4 -3 1.100 180.0 2
Torsion -1 -4 -6 -4 1.100 180.0 2
Torsion -4 -4 -6 -6 1.100 180.0 2
Torsion -1 -4 -4 -5 3.625 180.0 2
Torsion -2 -4 -4 -5 3.625 180.0 2
Torsion -3 -4 -4 -5 3.625 180.0 2
Torsion -4 -4 -4 -5 3.625 180.0 2
Torsion -5 -4 -4 -4 3.625 180.0 2
Torsion -5 -4 -4 -5 3.625 180.0 2
Torsion -4 -6 -4 -5 3.625 180.0 2
Torsion -4 -4 -4 -5 1.100 180.0 2
Torsion -4 -6 -4 -5 1.100 180.0 2
Torsion -1 -4 -4 -6 1.100 180.0 2
$end

$qm_atoms
18 19 20 21 22 23 24 25 26 27 28 29 30 31
$end

output:
Time req’d to calc MM energy: 1.9 s (CPU) 0.1 s (wall)
AMBER99 force field loaded.
Reading user-defined FF parameters…
Reading user defined atom types.
Found 6 user defined AtomTypes
finished.
Time req’d to get MM system information: 0.0 s (CPU) 0.0 s (wall)
Including QM-MM and MM-MM van der Waals interactions.
Computing Extra Coulomb Energy Term Gradient for YinYang atom bonds with Q = 0.550000
Time req’d to calc MM gradient: 1.8 s (CPU) 0.1 s (wall)
**** Step 2: QM calculation on the model system ****
AMBER99 force field loaded.
Reading user-defined FF parameters…
Reading user defined atom types.
Found 6 user defined AtomTypes
finished.
UDef: 1 -0.029500 0.051700
Atom with negative atomc type, i: 1 type: -1 charges: -0.029500
Atom with negative atomc type, i: 2 type: -2 charges: 0.051700
Atom with negative atomc type, i: 3 type: -3 charges: 0.002600
Atom with negative atomc type, i: 4 type: -4 charges: -0.077800
Atom with negative atomc type, i: 5 type: -4 charges: -0.077800
Atom with negative atomc type, i: 6 type: -5 charges: 0.139500
Atom with negative atomc type, i: 7 type: -4 charges: -0.077800
Atom with negative atomc type, i: 8 type: -5 charges: 0.139500
Atom with negative atomc type, i: 9 type: -4 charges: -0.077800
Atom with negative atomc type, i: 10 type: -5 charges: 0.139500
Atom with negative atomc type, i: 11 type: -4 charges: -0.077800
Atom with negative atomc type, i: 12 type: -5 charges: 0.139500
Atom with negative atomc type, i: 13 type: -4 charges: -0.077800
Atom with negative atomc type, i: 14 type: -5 charges: 0.139500
Atom with negative atomc type, i: 15 type: -4 charges: -0.077800
Atom with negative atomc type, i: 16 type: -4 charges: -0.077800
Atom with negative atomc type, i: 17 type: -5 charges: 0.139500
Atom with negative atomc type, i: 32 type: -5 charges: 0.139500
Atom with negative atomc type, i: 33 type: -4 charges: -0.077800
Atom with negative atomc type, i: 34 type: -5 charges: 0.139500
Atom with negative atomc type, i: 35 type: -4 charges: -0.077800
Atom with negative atomc type, i: 36 type: -5 charges: 0.139500
Atom with negative atomc type, i: 37 type: -4 charges: -0.077800
Atom with negative atomc type, i: 38 type: -4 charges: -0.077800
Atom with negative atomc type, i: 39 type: -5 charges: 0.139500
Atom with negative atomc type, i: 40 type: -4 charges: -0.077800
Atom with negative atomc type, i: 41 type: -5 charges: 0.139500
Atom with negative atomc type, i: 42 type: -4 charges: -0.077800
Atom with negative atomc type, i: 43 type: -5 charges: 0.139500
Atom with negative atomc type, i: 44 type: -4 charges: -0.077800
Atom with negative atomc type, i: 45 type: -5 charges: 0.139500
Atom with negative atomc type, i: 46 type: -6 charges: -0.075500
Atom with negative atomc type, i: 47 type: -6 charges: -0.075500
Atom with negative atomc type, i: 48 type: -4 charges: -0.077800
Atom with negative atomc type, i: 49 type: -5 charges: 0.139500
Atom with negative atomc type, i: 50 type: -4 charges: -0.077800
Atom with negative atomc type, i: 51 type: -5 charges: 0.139500
Atom with negative atomc type, i: 52 type: -4 charges: -0.077800
Atom with negative atomc type, i: 53 type: -5 charges: 0.139500
Atom with negative atomc type, i: 54 type: -4 charges: -0.077800
Atom with negative atomc type, i: 55 type: -5 charges: 0.139500
Atom with negative atomc type, i: 56 type: -4 charges: -0.077800

Q-Chem fatal error occurred in module forceman/set_model_system_2.C, line 318:

unknown iKeep

Please submit a crash report at Q-Chem Crash Reporter

Can anyone please help me find where I am making mistakes?

If I had to guess, it’s probably an error with your connectivity but it’s to diagnose without the complete input file; I suggest you try to come up with a small example that exhibits the error, which you can post here.

Better yet, try Q-Chem QM/MM in conjunction with CHARMM or GROMACS…

You can also do QM/MM with Q-CHEM and AMBER.