The external force is not applied successfully in geometry optimation

I find that the external force is not applied successfully with using the “efei” keyword.
This is my input file:
$rem
jobtype = opt
BASIS = 6-31G*
METHOD = BLYP
dft_d = d3
SCF_ALGORITHM = GDM

MAX_SCF_CYCLES = 200
GEOM_OPT_MAX_CYCLES = 200

$end

$molecule
0 1
C 9.61249449 1.30638708 -1.96737405
H 9.93903767 0.30080032 -1.72254122
H 9.57592047 1.41702672 -3.04622466
C 5.56104915 1.17322588 -0.97196198
H 5.33965078 2.20212033 -1.26600505
H 5.74873288 1.17725299 0.10329017
C 2.27309403 -0.30655069 0.4675998
H 2.87217785 0.05298028 1.27545784
H 2.56064696 -1.31335274 0.25958195
C -1.14230183 -2.2101482 1.88541779
H -1.68990136 -1.27683887 1.92855083
H -1.09826194 -2.56928854 2.92004809
C -3.71657661 -3.1779211 -1.19825632
H -4.61099246 -3.36912815 -0.59718876
H -3.70991342 -3.941651 -1.98264007
C -3.4016232 0.4448103 -3.13046103
H -4.08231288 0.78542174 -2.34961238
H -3.86461829 0.76217086 -4.06707467
C -0.40583051 2.45543008 -1.45789161
H 0.31437374 2.67989304 -2.24874237
H -0.18014404 1.46103217 -1.08390031
C 1.54225664 2.68770081 1.50808417
H 1.06762718 1.74147227 1.30484588
H 1.03366477 3.13180749 2.36782248
C 4.40178845 0.34717733 3.04167067
H 4.35889411 -0.12817041 4.02651862
H 5.28739849 0.99006979 3.04306915
C 4.02876701 -2.88555049 0.60081357
H 4.64964639 -3.76085163 0.8041422
H 4.60311326 -2.28927616 -0.10624858
C 0.59037717 -2.59867707 -1.59215029
H 0.12155856 -3.32999757 -0.93944053
H 0.38525127 -2.96152658 -2.60320229
C -2.43832022 -0.03908007 -0.09094972
H -2.84704454 0.57256942 -0.87244561
H -1.84784842 0.62131029 0.54511515
C -6.29484452 -0.76840843 1.30294026
H -6.05675708 -0.90361109 2.36077047
H -6.26998958 -1.75629908 0.83561653
C -10.41167565 -0.81538817 1.91241114
H -10.79630631 -0.75446324 0.89909296
H -10.5807164 0.1312344 2.41636141
C -1.82769067 2.42207279 -2.09224602
H -2.56962643 2.43799687 -1.29376858
H -1.9783138 3.33821528 -2.66831154
C 1.25452727 3.57780671 0.27245294
H 1.95856623 3.35789597 -0.53102261
H 1.42024182 4.62160979 0.54924113
C 3.16941313 1.31450924 3.01669209
H 2.25580534 0.72678841 3.08146561
H 3.23500236 1.83710504 3.97646465
C 3.92477778 -2.11086145 1.96677376
H 2.89016431 -1.9244663 2.22900581
H 4.31735518 -2.76790853 2.74694766
C 2.15121621 -2.74876878 -1.41489943
H 2.62242104 -1.79152314 -1.60050326
H 2.46658779 -3.37927842 -2.24997828
C -8.85500995 -1.16135874 1.8962552
H -8.76673417 -2.14861757 1.43465934
H -8.55724315 -1.27165982 2.94232164
C -5.1395601 0.09379421 0.6614801
H -5.39477024 0.26311509 -0.38659826
H -5.1393089 1.07406947 1.14435577
C -1.51171867 -1.17030765 -0.74520341
H -2.14759507 -1.67650552 -1.43001165
H -1.32163783 -1.83097433 0.05400387
C -2.50053472 -3.68071832 -0.29353376
H -2.81641259 -4.72287977 -0.15460646
H -1.62968636 -3.73398399 -0.93693727
C -3.37218962 -1.13295898 -3.14804741
H -3.89112166 -1.44757535 -4.05607067
H -2.34586195 -1.47006415 -3.27841908
C 0.34426793 -1.91824207 1.45500656
H 0.96801888 -2.27549147 2.27733347
H 0.55990321 -2.53062961 0.6041535
C 2.80642096 0.53516575 -0.77419803
H 2.70751846 1.5951432 -0.58062604
H 2.19106946 0.33851558 -1.65299791
C 6.90502598 0.73895526 -1.68659372
H 7.10284532 -0.30449947 -1.42865083
H 6.74523446 0.78775696 -2.76625224
C -4.10542298 -1.8313174 -1.94575853
H -5.10210556 -2.08253793 -2.3242237
H -4.26038508 -1.07589431 -1.1999648
C -2.02888019 -3.35570802 1.20346316
H -1.48363588 -4.27337457 1.44775901
H -2.93464095 -3.36975095 1.81513799
C 0.81810648 -0.45237055 1.13942739
H 0.04022779 0.07047253 0.60436015
H 0.86314153 0.01601924 2.12432688
C 8.1785941 1.5924508 -1.33162368
H 7.94011221 2.63198631 -1.57019526
H 8.30862889 1.53508778 -0.24785389
C -0.11778119 -1.18043552 -1.50574484
H -0.25273886 -0.90154982 -2.55148471
H 0.58854817 -0.48352533 -1.09886521
C -3.68304407 -0.52679087 0.81300865
H -3.78521606 -1.60218695 0.72257513
H -3.42283254 -0.32856559 1.85548301
C 2.75389591 -3.45297238 -0.13138353
H 3.04992615 -4.44765779 -0.47432423
H 1.99373065 -3.63371744 0.62256536
C 4.74220072 -0.78556093 2.01575473
H 4.78544946 -0.35603802 1.02369153
H 5.7702896 -1.06815427 2.26588618
C 3.01976291 2.41622897 1.91699059
H 3.4508 3.34461001 2.29968277
H 3.6103278 2.14472506 1.0465797
C -0.19600467 3.46102787 -0.30014169
H -0.48608964 4.44977318 -0.66513407
H -0.87681269 3.20806861 0.51630488
C -2.02472045 1.18279238 -3.02457706
H -1.73631616 1.48509503 -4.03324046
H -1.29543493 0.45607418 -2.70588127
C 4.3045149 0.27893996 -1.31231397
H 4.21185375 0.34666352 -2.4005082
H 4.5838062 -0.75247928 -1.10372248
C -7.77871329 -0.23848862 1.21124777
H -7.82155642 0.75073315 1.67219187
H -8.03865868 -0.12509053 0.15670206
H 10.3037296 2.0270906 -1.54882124
H -10.9151258 -1.61001864 2.44916773
$end

$efei
1 40 2
$end

Can you elaborate on how external force is not applied in geometry optimization?

It looks like your input is not correct for using EFEI, if you follow Ex. 9.13 in the Q-Chem manual this will help you with your job.

To summarize the DISTORT = TRUE will trigger the external force calculation and the $efei section that you have should be:

$distort
   model       efei
   force       [1 40 2]
$end

for defining the force.

Thank you for your reply! I follow [Ex. 9.13 ] in the Q-Chem manual and get the same result as the old input.
My structure is a knot. It will be tightened by adding an external force between two ends. However, I find it is untied by using EFEI of Q-Chem.
In addition, it is tied using the ASE to add the force and optimize it by calling Q-Chem. The result of ASE is different from that using Q-chem directly

So I have had a chance to look at this job in Q-Chem and I think it is working as intended. The geometry optimizer minimized the energy of the structure for your system. For your system a linear alkane is the true energy minimized structure since this first reduces the EFEI force by moving the 1st and 40th atom as far as possible from each other. Also the knot being “loosen” is the correct behavior since all the steric energy would be eliminated with a linear alkane. Therefore the geometry optimizer found the lowest energy structure which is a linear alkane with atoms 1 and 40 as far as possible from each other.

The structure with the knot being “tightened” is in fact a high energy local minima not the global minima.

I think if you wish to find the higher energy local minima with the knot being “tightened” you would have better luck using EFEI with a AIMD calculation to allow the EFEI forces to “tighten” the knot.

Thanks for your reply. I will try the AIMD. In addition, I also test the C3H8 molecule by adding a force at two ends. I find the external force does not affect the optimization results.
This is the input file:
jobtype = opt
BASIS = 6-31G*
METHOD = BLYP
dft_d = d3
SCF_ALGORITHM = DIIS_GDM
$end

$molecule
0 1
C -3.31545072 -0.40769038 -0.00533696
H -2.95879629 -1.41650038 -0.00533696
H -2.95877788 0.09670781 -0.87898846
H -4.38545072 -0.40767719 -0.00533696
C -2.80210850 0.31826590 1.25206801
H -3.15860355 1.32713222 1.25197043
H -3.15894076 -0.18601991 2.12571929
C -1.26210853 0.31800313 1.25220829
H -0.90527655 0.82225632 0.37853806
H -0.90543568 0.82243377 2.12584105
H -0.90561382 -0.69086332 1.25234321
$end

$distort
model efei
force [1 8 60]
$end