Skip to content

-nots crashes with "file not found ... ts/nmode" in mcsimu.f90:349, regardless of rate-constant method #26

Description

@sreekanth221998

Version

v1.2.0 (binary release)

Steps to reproduce

qcxms2 in.xyz -T 4 -nots

or, to rule out the rate-constant method:
qcxms2 in.xyz -T 4 -nots -rrkm

Actual behavior

Crashes immediately:
forrtl: severe (29): file not found, unit -129, file /p1/ts/nmode
Image PC Routine Line Source
qcxms2 00000000004186A5 Unknown Unknown Unknown
qcxms2 000000000049B2E5 iomod_mp_rdshort_ 434 iomod.f90
qcxms2 000000000046FB90 mcsimu_mp_monteca 349 mcsimu.f90
qcxms2 00000000004A5941 fragmentation_mp_ 249 fragmentation.f90
qcxms2 0000000000403FE2 MAIN__ 181 main.f90

Confirmed via strace that ORCA is never invoked (0 calls) before this — it fails before any transition-state work would happen, on both a plain neutral test molecule and with -rrkm.

Root cause

In src/mcsimu.f90, the barrier-reading loop correctly branches on env%nots:

if (env%nots) then
   barriers(i) = de(i)      ! correctly skips barrier_/ircmode_ files
else
   call rdshort_real(...'/barrier_'//trim(env%tslevel), barriers(i))
   call rdshort_real(...'/ircmode_'//trim(env%geolevel), irc(i))
   ...
end if
but the thermal-correction loop right after it does not:


call rdshort_int(trim(env%path)//"/"//trim(fragdirs(j, 1))//"/ts/nmode", nmode)   ! line 349, unconditional
ts/nmode is only ever written when a real TS search runs. -nots skips that entirely, so this read always fails, regardless of which rate-constant method (-rrkm/-eyring) is selected downstream.

<Suggested fix>
Guard this block (and the xtbthermo call it feeds into dgeas) with if (.not. env%nots). For the env%nots case, skip the TS-derived thermal correction entirely, e.g. dgeas(:) = barriers(j) — consistent with -nots already meaning `use the raw reaction energy, no TS-derived correction`.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions