-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail-safe for not available routines.
Signed-off-by: MtoLStoN <70513124+MtoLStoN@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,6 +68,8 @@ subroutine setup_cpcmx(self, env, solvent) | |
!> TODO: SETUP solute directly from TCosmo instead of reading COSMO file | ||
Call read_cosmo('xtb.cosmo',self%solute,'NONE',error) | ||
if (allocated(error)) Call env%error(error%message, source) | ||
#else | ||
Call no_cpcmx_here(env) | ||
#endif | ||
end subroutine setup_cpcmx | ||
|
||
|
@@ -103,6 +105,8 @@ subroutine calculate_cpcmx(self,env,solvent,energy_gas,probe,T,max_cycle,conv_cr | |
call self%state_correction(density(solvent),atomicmass(self%solvent%element),T) | ||
call self%cds(probe,solvent) | ||
total_energy= self%dG()+energy_gas | ||
#else | ||
Call no_cpcmx_here(env) | ||
#endif | ||
end subroutine calculate_cpcmx | ||
|
||
|
@@ -147,4 +151,13 @@ subroutine print_cpcmx(self,verbose) | |
#endif | ||
end subroutine print_cpcmx | ||
|
||
|
||
#if ! WITH_CPCMX | ||
subroutine no_cpcmx_here(env) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
MtoLStoN
Author
Member
|
||
type(TEnvironment), intent(inout) :: env | ||
|
||
call env%error('CPCM-X is not available in this version of xtb.', source) | ||
end subroutine no_cpcmx_here | ||
#endif | ||
|
||
end module xtb_solv_cpx |
This subroutine appears to be redundant. As an alternative, you could simply use the following lines:
This way, you could directly fall back to the the main from your module.