Skip to content

Commit

Permalink
Remove imports without "only"
Browse files Browse the repository at this point in the history
  • Loading branch information
jubich authored and bhourahine committed Dec 18, 2024
1 parent 4bf03e5 commit ac1a8b2
Show file tree
Hide file tree
Showing 44 changed files with 277 additions and 217 deletions.
25 changes: 13 additions & 12 deletions app/misc/skderivs/skderivs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,23 @@

!> Calculates the first and second derivatives of matrix elements
program skderivs
use dftbp_common_accuracy
use dftbp_common_constants
use dftbp_common_accuracy, only : dp, lc
use dftbp_common_constants, only : maxL, shellNames
use dftbp_common_file, only : closeFile, openFile, TFileDescr
use dftbp_common_globalenv, only : stdOut
use dftbp_common_file, only : TFileDescr, openFile, closeFile
use dftbp_dftb_slakoeqgrid
use dftbp_io_charmanip
use dftbp_io_hsdparser, only : parseHSD, dumpHSD, getNodeHSDName
use dftbp_io_hsdutils
use dftbp_io_hsdutils2
use dftbp_io_message
use dftbp_type_linkedlist
use dftbp_type_oldskdata
use dftbp_dftb_slakoeqgrid, only : getNIntegrals, getSKIntegrals, init, skEqGridNew, skEqGridOld,&
& TSlakoEqGrid
use dftbp_io_charmanip, only : i2c, unquote
use dftbp_io_hsdparser, only : dumpHSD, getNodeHSDName, parseHSD
use dftbp_io_hsdutils, only : detailedError, getChild, getChildValue
use dftbp_io_hsdutils2, only : warnUnprocessedNodes
use dftbp_type_linkedlist, only : append, asArray, init, intoArray, len, TListInt, TListIntR1
use dftbp_type_oldskdata, only : readFromFile, TOldSKData
#:if WITH_MPI
use dftbp_common_mpienv
#:endif
use xmlf90_flib_dom
use dftbp_extlibs_xmlf90, only : append_to_string, assignment(=), char, fNode, resize_string,&
& string
implicit none


Expand Down
8 changes: 4 additions & 4 deletions app/misc/slakovalue/integvalue.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
!> Reads a spline repulsive from an SK-table and returns its value and its first
!! and second derivatives.
program integvalue
use dftbp_common_accuracy
use dftbp_common_accuracy, only : dp, lc
use dftbp_common_globalenv, only : stdOut
use dftbp_dftb_slakoeqgrid
use dftbp_io_message
use dftbp_type_oldskdata
use dftbp_dftb_slakoeqgrid, only : getCutoff, getSKIntegrals, init, skEqGridNew, TSlakoEqGrid
use dftbp_io_message, only : error
use dftbp_type_oldskdata, only : readFromFile, TOldSKData
implicit none

integer, parameter :: nSKInter = 20
Expand Down
47 changes: 25 additions & 22 deletions app/phonons/initphonons.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,32 @@
#:include 'common.fypp'

module phonons_initphonons
use dftbp_common_accuracy
use dftbp_common_atomicmass
use dftbp_common_constants
use dftbp_common_environment
use dftbp_common_file, only : TFileDescr, closeFile, openFile
use dftbp_common_globalenv
use dftbp_common_accuracy, only : dp, lc, mc
use dftbp_common_atomicmass, only : getAtomicMass
use dftbp_common_constants, only : amu__au
use dftbp_common_environment, only : TEnvironment
use dftbp_common_file, only : closeFile, openFile, TFileDescr
use dftbp_common_globalenv, only : stdOut, tIoProc
use dftbp_common_status, only : TStatus
use dftbp_common_unitconversion
use dftbp_dftb_periodic
use dftbp_io_charmanip
use dftbp_io_hsdparser, only : parseHSD, dumpHSD
use dftbp_io_hsdutils
use dftbp_io_hsdutils2
use dftbp_io_message
use dftbp_io_tokenreader
use dftbp_io_xmlutils
use dftbp_math_simplealgebra
use dftbp_transport_negfvars
use dftbp_type_linkedlist
use dftbp_type_oldskdata
use dftbp_type_typegeometryhsd
use dftbp_type_wrappedintr
use xmlf90_flib_dom
use dftbp_common_unitconversion, only : energyUnits, lengthUnits
use dftbp_dftb_periodic, only : getCellTranslations, getNrOfNeighboursForAll, getSuperSampling,&
& TNeighbourList, TNeighbourlist_init, updateNeighbourList
use dftbp_extlibs_xmlf90, only : assignment(=), char, destroyNodeList, fnode, fnodelist, getItem1,&
& getLength, getNodeName, string, textNodeName
use dftbp_io_charmanip, only : i2c, tolower, unquote
use dftbp_io_hsdparser, only : dumpHSD, parseHSD
use dftbp_io_hsdutils, only : detailedError, getChild, getChildren, getChildValue,&
& getFirstTextChild, getSelectedAtomIndices, getSelectedIndices, setChild, setChildValue
use dftbp_io_hsdutils2, only : convertUnitHsd, setUnprocessed, warnUnprocessedNodes
use dftbp_io_message, only : error
use dftbp_io_tokenreader, only : getNextToken
use dftbp_math_simplealgebra, only : determinant33
use dftbp_transport_negfvars, only : ContactInfo, TNEGFtundos, TTransPar
use dftbp_type_linkedlist, only : append, asArray, asVector, destruct, get, init, len,&
& TListCharLc, TListInt, TListIntR1, TListReal, TListRealR1, TListString
use dftbp_type_oldskdata, only : readFromFile, TOldSKData
use dftbp_type_typegeometryhsd, only : readTGeometryGen, readTGeometryHSD, TGeometry
use dftbp_type_wrappedintr, only : TWrappedInt1
implicit none
private

Expand Down
33 changes: 17 additions & 16 deletions app/phonons/libnegfint.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,26 @@
#:include "common.fypp"

module phonons_libnegfint
use dftbp_common_accuracy
use dftbp_common_environment
use dftbp_common_file, only : TFileDescr, closeFile, openFile
use phonons_initphonons, only : modeEnum, TempMax, TempMin, TempStep
use dftbp_common_accuracy, only : dp
use dftbp_common_environment, only : TEnvironment
use dftbp_common_file, only : closeFile, openFile, TFileDescr
use dftbp_common_globalenv, only : stdOut, tIoProc
use dftbp_extlibs_negf, only : getel, lnParams, pass_DM, Tnegf, kb, units, convertHeatCurrent,&
& convertHeatConductance, z_CSR, z_DNS, READ_SGF, COMP_SGF, COMPSAVE_SGF, DELTA_SQ, DELTA_W,&
& DELTA_MINGO, associate_lead_currents, associate_ldos, associate_transmission,&
& compute_phonon_current, thermal_conductance, create, create_scratch, destroy,&
& set_readoldDMsgf, destroy_matrices, destroy_negf, get_params, init_contacts, init_ldos,&
& init_negf, init_structure, pass_hs, set_bp_dephasing, set_scratch, set_drop,&
& set_elph_block_dephasing, set_elph_dephasing, set_elph_s_dephasing, set_ldos_indexes,&
& set_tun_indexes, set_params, writememinfo, writepeakinfo, dns2csr, csr2dns, nzdrop, printcsr
use phonons_initphonons, only : TempMin, TempMax, TempStep, modeEnum
use dftbp_io_message
use dftbp_transport_matconv
use dftbp_transport_negfvars
use dftbp_extlibs_negf, only : associate_ldos, associate_lead_currents, associate_transmission,&
& COMP_SGF, COMPSAVE_SGF, compute_phonon_current, convertHeatConductance, convertHeatCurrent,&
& create, create_scratch, csr2dns, DELTA_MINGO, DELTA_SQ, DELTA_W, destroy, destroy_matrices,&
& destroy_negf, dns2csr, get_params, getel, init_contacts, init_ldos, init_negf,&
& init_structure, kb, lnParams, nzdrop, pass_DM, pass_hs, printcsr, READ_SGF,&
& set_bp_dephasing, set_drop, set_elph_block_dephasing, set_elph_dephasing,&
& set_elph_s_dephasing, set_ldos_indexes, set_params, set_readoldDMsgf, set_scratch,&
& set_tun_indexes, thermal_conductance, Tnegf, units, writememinfo, writepeakinfo, z_CSR,&
& z_DNS
use dftbp_io_message, only : error
use dftbp_transport_matconv, only : destruct
use dftbp_transport_negfvars, only : TNEGFTunDos, TTranspar
use dftbp_type_commontypes, only : TOrbitals
#:if WITH_MPI
use dftbp_extlibs_mpifx
use dftbp_extlibs_mpifx, only : MPI_SUM, mpifx_comm, mpifx_reduceip
use dftbp_extlibs_negf, only : negf_mpi_init
#:endif
implicit none
Expand Down
20 changes: 11 additions & 9 deletions app/phonons/phonons.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@
#:include 'common.fypp'

program phonons
use phonons_initphonons, only : atomicMasses, autotestTag, destructProgramVariables, dynMatrix,&
& geo, img2CentCell, iMovedAtoms, initProgramVariables, kPoint, modesToPlot, nAtomUnitCell,&
& nCells, nCycles, neighbourList, nKPoints, nModesToPlot, nMovedAtom, nNeighbour, nSteps,&
& outputUnits, selTypeModes, tAnimateModes, tCompModes, tPhonDispersion, tPlotModes, transpar,&
& tTransport, tundos, tWriteTagged, tXmakeMol
use phonons_libnegfint, only : calc_phonon_current, init_tun_proj, negf_init, negf_init_str
use dftbp_common_accuracy, only : dp, lc
use dftbp_common_constants, only : Hartree__cm, Bohr__AA, Hartree__J, Hartree__eV, hbar, pi
use dftbp_common_environment
use dftbp_common_constants, only : Bohr__AA, Hartree__cm, Hartree__eV, Hartree__J, hbar, pi
use dftbp_common_environment, only : TEnvironment, TEnvironment_init
use dftbp_common_file, only : closeFile, openFile, TFileDescr
use dftbp_common_globalenv
use phonons_initphonons
use dftbp_io_message
use dftbp_io_taggedoutput
use dftbp_common_globalenv, only : destructGlobalEnv, initGlobalEnv, stdOut, tIOProc
use dftbp_io_message, only : error
use dftbp_io_taggedoutput, only : TTaggedWriter, TTaggedWriter_init
use dftbp_math_eigensolver, only : heev
use dftbp_math_simplealgebra, only : invert33
use dftbp_type_typegeometry
use phonons_libnegfint
use ln_structure
implicit none

type(TEnvironment) :: env
Expand Down
21 changes: 10 additions & 11 deletions app/transporttools/helpsetupgeom.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
!--------------------------------------------------------------------------------------------------!

module transporttools_helpsetupgeom
use dftbp_common_accuracy
use dftbp_common_constants
use dftbp_common_globalenv
use dftbp_common_file, only : TFileDescr, openFile, closeFile
use dftbp_io_message
use dftbp_math_f08math
use dftbp_math_simplealgebra
use dftbp_math_sorting
use dftbp_common_accuracy, only : dp, lc
use dftbp_common_constants, only : Bohr__AA
use dftbp_common_file, only : closeFile, openFile, TFileDescr
use dftbp_common_globalenv, only : stdOut
use dftbp_io_message, only : error, warning
use dftbp_math_simplealgebra, only : cross3
use dftbp_math_sorting, only : index_heap_sort
use dftbp_transport_negfvars, only : contactInfo
use dftbp_type_linkedlist
use dftbp_type_typegeometry
use dftbp_type_wrappedintr
use dftbp_type_linkedlist, only : append, asArray, destruct, get, init, len, TListInt, TListIntR1
use dftbp_type_typegeometry, only : TGeometry
use dftbp_type_wrappedintr, only : TWrappedInt1
implicit none

private
Expand Down
10 changes: 2 additions & 8 deletions app/transporttools/inputdata.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@

!> Contains data type representing the input data for setupgeom
module transporttools_inputdata
use dftbp_common_accuracy
use dftbp_io_message
use dftbp_transport_negfvars
use dftbp_type_commontypes
use dftbp_type_linkedlist
use dftbp_type_typegeometry
use dftbp_type_wrappedintr

use dftbp_transport_negfvars, only : TTransPar
use dftbp_type_typegeometry, only : TGeometry
implicit none
private

Expand Down
10 changes: 5 additions & 5 deletions app/transporttools/setupgeom.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
#:include 'common.fypp'

program setupgeom
use dftbp_common_globalenv
use dftbp_common_release, only : releaseYear
use dftbp_io_formatout, only : printDftbHeader
use transporttools_inputdata, only : TInputData
use transporttools_parser, only : parseHsdInput
use dftbp_common_globalenv, only : destructGlobalEnv, initGlobalEnv
use dftbp_common_release, only : releaseYear
use dftbp_io_formatout, only : printDftbHeader
#:if WITH_MPI
use mpi, only : MPI_THREAD_FUNNELED, MPI_COMM_WORLD
use mpi, only : MPI_COMM_WORLD, MPI_THREAD_FUNNELED
use dftbp_common_mpienv, only : TMpiEnv, TMpiEnv_init
use dftbp_extlibs_mpifx, only : mpifx_init_thread, mpifx_finalize
use dftbp_extlibs_mpifx, only : mpifx_finalize, mpifx_init_thread
#:endif
implicit none

Expand Down
17 changes: 9 additions & 8 deletions src/dftbp/api/mm/capi.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@

!> Contains the C-API of DFTB+.
module dftbp_capi
use, intrinsic :: iso_c_binding
use, intrinsic :: iso_fortran_env
use, intrinsic :: iso_c_binding, only : c_associated, c_bool, c_char, c_double, c_f_pointer,&
& c_f_procpointer, c_funptr, c_int, c_loc, c_null_char, c_null_ptr, c_ptr
use, intrinsic :: iso_fortran_env, only : output_unit
use dftbp_common_accuracy, only : dp
use dftbp_common_file, only : TFileDescr, openFile
use dftbp_common_file, only : openFile, TFileDescr
use dftbp_common_globalenv, only : instanceSafeBuild
use dftbp_dftbplus_qdepextpotgenc, only :&
& getExtPotIfaceC, getExtPotGradIfaceC, TQDepExtPotGenC, TQDepExtPotGenC_init
use dftbp_mmapi, only : TDftbPlus, TDftbPlus_init, TDftbPlus_destruct, TDftbPlusInput,&
& TDftbPlusAtomList
use dftbp_type_linkedlist, only : TListString, append, init, destruct
use dftbp_dftbplus_qdepextpotgenc, only : getExtPotGradIfaceC, getExtPotIfaceC, TQDepExtPotGenC,&
& TQDepExtPotGenC_init
use dftbp_mmapi, only : TDftbPlus, TDftbPlus_destruct, TDftbPlus_init, TDftbPlusAtomList,&
& TDftbPlusInput
use dftbp_type_linkedlist, only : append, destruct, init, TListString
implicit none
private

Expand Down
30 changes: 15 additions & 15 deletions src/dftbp/api/mm/mmapi.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@

!> Provides DFTB+ API for MM-type high level access
module dftbp_mmapi
use iso_fortran_env, only : output_unit
use, intrinsic :: iso_fortran_env, only : output_unit
use dftbp_common_accuracy, only : dp
use dftbp_common_environment, only : TEnvironment, TEnvironment_init
use dftbp_common_file, only : TFileDescr, openFile, closeFile
use dftbp_common_globalenv, only : initGlobalEnv, destructGlobalEnv, instanceSafeBuild, withMpi
use dftbp_common_file, only : closeFile, openFile, TFileDescr
use dftbp_common_globalenv, only : destructGlobalEnv, initGlobalEnv, instanceSafeBuild, withMpi
use dftbp_dftbplus_hsdhelpers, only : doPostParseJobs
use dftbp_dftbplus_initprogram, only: TDftbPlusMain
use dftbp_dftbplus_initprogram, only : TDftbPlusMain
use dftbp_dftbplus_inputdata, only : TInputData
use dftbp_dftbplus_mainapi, only : doOneTdStep, checkSpeciesNames, nrOfAtoms, nrOfKPoints,&
& setExternalPotential, getTdForces, setTdCoordsAndVelos, setTdElectricField,&
& initializeTimeProp, finalizeTimeProp, updateDataDependentOnSpeciesOrdering,&
& getAtomicMasses, getGrossCharges, getCM5Charges, getElStatPotential, getExtChargeGradients,&
& getStressTensor, getGradients, getEnergy, getCutOff, setQDepExtPotProxy,&
& setExternalCharges, setGeometry, setNeighbourList, getRefCharges, setRefCharges
use dftbp_dftbplus_parser, only : TParserFlags, rootTag, parseHsdTree, readHsdFile
use dftbp_dftbplus_mainapi, only : checkSpeciesNames, doOneTdStep, finalizeTimeProp,&
& getAtomicMasses, getCM5Charges, getCutOff, getElStatPotential, getEnergy,&
& getExtChargeGradients, getGradients, getGrossCharges, getRefCharges, getStressTensor,&
& getTdForces, initializeTimeProp, nrOfAtoms, nrOfKPoints, setExternalCharges,&
& setExternalPotential, setGeometry, setNeighbourList, setQDepExtPotProxy, setRefCharges,&
& setTdCoordsAndVelos, setTdElectricField, updateDataDependentOnSpeciesOrdering
use dftbp_dftbplus_parser, only : parseHsdTree, readHsdFile, rootTag, TParserFlags
use dftbp_dftbplus_qdepextpotgen, only : TQDepExtPotGen, TQDepExtPotGenWrapper
use dftbp_dftbplus_qdepextpotproxy, only : TQDepExtPotProxy, TQDepExtPotProxy_init
use dftbp_extlibs_xmlf90, only : fnode, createDocumentNode, createElement, appendChild,&
& destroyNode
use dftbp_extlibs_xmlf90, only : appendChild, createDocumentNode, createElement, destroyNode,&
& fnode
use dftbp_io_charmanip, only : newline
use dftbp_io_hsdutils, only : getChild
use dftbp_io_message, only: error
use dftbp_type_linkedlist, only : TListString, init, append, get, len, asArray
use dftbp_io_message, only : error
use dftbp_type_linkedlist, only : append, asArray, get, init, len, TListString
use dftbp_type_typegeometry, only : TGeometry
implicit none
private
Expand Down
2 changes: 1 addition & 1 deletion src/dftbp/api/mm/qdepextpotgenc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

!> Simplified C-interface with callbacks for population dependant external potential generators.
module dftbp_dftbplus_qdepextpotgenc
use, intrinsic :: iso_c_binding
use, intrinsic :: iso_c_binding, only : c_double, c_ptr
use dftbp_common_accuracy, only : dp
use dftbp_dftbplus_qdepextpotgen, only : TQDepExtPotGen
implicit none
Expand Down
2 changes: 1 addition & 1 deletion src/dftbp/common/gpuenv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

!> Information on any GPUs on the system
module dftbp_common_gpuenv
use iso_c_binding, only : c_int
use, intrinsic :: iso_c_binding, only : c_int
use dftbp_common_globalenv, only : stdOut
use dftbp_extlibs_magma, only : getGpusAvailable, getGpusRequested, gpusInit
implicit none
Expand Down
6 changes: 3 additions & 3 deletions src/dftbp/derivs/rotatedegen.F90
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ module dftbp_derivs_rotatedegen
use dftbp_common_status, only : TStatus
use dftbp_math_eigensolver, only : heev
use dftbp_math_qm, only : makeSimilarityTrans
use dftbp_type_wrappedintr, only : TwrappedReal2, TwrappedCmplx2
use dftbp_type_wrappedintr, only : TwrappedCmplx2, TwrappedReal2
#:if WITH_SCALAPACK
use dftbp_common_environment, only : TEnvironment
use dftbp_type_densedescr, only: TDenseDescr
use linecomm_module, only : linecomm
use dftbp_extlibs_scalapackfx, only : linecomm
use dftbp_type_densedescr, only : TDenseDescr
#:endif
implicit none

Expand Down
18 changes: 9 additions & 9 deletions src/dftbp/dftb/dispmbd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@

!> MBD/TS dispersion model.
module dftbp_dftb_dispmbd
use dftbp_common_accuracy, only: dp, mc, lc
use dftbp_common_constants, only: symbolToNumber
use dftbp_common_environment, only: TEnvironment
use dftbp_common_globalenv, only: stdOut
use dftbp_common_accuracy, only : dp, lc, mc
use dftbp_common_constants, only : symbolToNumber
use dftbp_common_environment, only : TEnvironment
use dftbp_common_globalenv, only : stdOut
use dftbp_common_status, only : TStatus
use dftbp_dftb_dispiface, only: TDispersionIface
use dftbp_dftb_periodic, only: TNeighbourList
use dftbp_math_simplealgebra, only: determinant33
use dftbp_dftb_dispiface, only : TDispersionIface
use dftbp_dftb_periodic, only : TNeighbourList
use dftbp_extlibs_mbd, only : mbd_calc_t, TDispMbdInp
use dftbp_math_simplealgebra, only : determinant33
use dftbp_type_commontypes, only : TOrbitals
use dftbp_type_typegeometry, only: TGeometry
use mbd, only: TDispMbdInp => mbd_input_t, mbd_calc_t
use dftbp_type_typegeometry, only : TGeometry
implicit none

private
Expand Down
8 changes: 4 additions & 4 deletions src/dftbp/dftb/sccinit.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
!> Module for initializing SCC part of the calculation.
module dftbp_dftb_sccinit
use dftbp_common_accuracy, only : dp, elecTolMax
use dftbp_common_file, only : TFileDescr, openFile, closeFile
use dftbp_common_file, only : closeFile, openFile, TFileDescr
use dftbp_common_globalenv, only : stdOut
use dftbp_common_status, only : TStatus
use dftbp_dftb_densitymatrix, only : TDensityMatrix
use dftbp_dftb_hybridxc, only : checkSupercellFoldingMatrix, hybridXcAlgo
use dftbp_dftb_periodic, only : getSuperSampling
use dftbp_io_message, only : error
use dftbp_type_commontypes, only : TOrbitals
use dftbp_type_multipole, only : TMultipole
use dftbp_dftb_densitymatrix, onLy : TDensityMatrix
use dftbp_dftb_hybridxc, only : checkSupercellFoldingMatrix, hybridXcAlgo
use dftbp_dftb_periodic, only : getSuperSampling
implicit none

private
Expand Down
Loading

0 comments on commit ac1a8b2

Please sign in to comment.