Skip to content

Commit

Permalink
Correctly avoid stopping the program when Z-mat crossing has not enou…
Browse files Browse the repository at this point in the history
…gh structures
  • Loading branch information
pprcht committed Jan 25, 2025
1 parent 22b9694 commit bb8e07a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/algos/crossing.f90
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ subroutine crest_crossing(env,maxgen,fname,maxpairs)
implicit none
!> INPUT
type(systemdata),intent(inout) :: env
integer,intent(in) :: maxgen
integer,intent(inout) :: maxgen
character(len=*),intent(in),optional :: fname
real(wp),intent(in),optional :: maxpairs
!> LOCAL
Expand Down Expand Up @@ -69,6 +69,7 @@ subroutine crest_crossing(env,maxgen,fname,maxpairs)
call rdensemble(ensnam,nat,nall,at,xyz,eread)
if (nall .lt. 2) then
write (stdout,*) 'Not enough structures to perform GC!'
maxgen=0
return
end if

Expand Down
1 change: 1 addition & 0 deletions src/algos/search_conformers.f90
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ subroutine crest_newcross3(env)
call touch(trim(tmppath))
call crest_crossing(env,imax,trim(refnam),env%gcmaxparent)
if (imax .lt. 1) then
call remove(trim(tmppath))
return
exit
end if
Expand Down

0 comments on commit bb8e07a

Please sign in to comment.