You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Install from PyPI
pip install mofscreen
# Or install the latest wheel directly from GitHub
pip install https://github.com/sanjjiiev/mofscreen/releases/download/v1.1.0/mofscreen-1.1.0-py3-none-any.whl
After installation, mofscreen is available as a CLI command:
# Full pipeline — all 7 properties
mofscreen my_mof.cif --cores 16
# With DOS parsing enabled
mofscreen my_mof.cif --cores 16 --dos
# With diffusion barrier from pre-computed NEB file
mofscreen my_mof.cif --cores 16 --barrier-file neb_result.txt
# Adsorption with 4 K ions
mofscreen my_mof.cif --cores 16 --ion K --n-ions 4
# High accuracy + compute references
mofscreen my_mof.cif --cores 16 --high-accuracy --compute-refs --ion Na
# Fast screening mode
mofscreen my_mof.cif --cores 8 --fast
# Set CP2K data dir via environment variableexport CP2K_DATA_DIR=/home/user/miniconda/envs/dft_env/share/cp2k/data
mofscreen my_mof.cif --cores 16
All CLI options
Flag
Default
Description
--cores / -n
16
OMP threads per process
--mpi-ranks
1
MPI ranks (multi-node)
--ion
Li
Ion species: Li, Na, K, Mg, Ca, Zn, Al
--n-ions
1
Number of ions to insert
--cell-opt
off
Relax cell during adsorption
--high-accuracy
off
TZV2P basis set
--fast
off
Lower cutoffs (400 Ry)
--compute-refs
off
Compute elemental references
--ion-ref-ev
auto
Element reference energy (eV/atom) override
--ref-energies
—
JSON file with pre-computed energies
--multiplicity
auto
Spin multiplicity override
--barrier-file
—
Path to pre-computed NEB barrier file (eV)
--dos
off
Parse CP2K PDOS files for density of states
Finding Your CP2K Data Directory
# After conda install cp2k:
conda activate dft_env
which cp2k
# e.g. /home/user/miniconda/envs/dft_env/bin/cp2k# Typical data dir locations:# ~/miniconda/envs/dft_env/share/cp2k/data# ~/anaconda3/envs/dft_env/share/cp2k/data# /usr/share/cp2k/data# Verify it contains the right files:
ls ~/miniconda/envs/dft_env/share/cp2k/data/BASIS_MOLOPT
Output Files
All outputs are saved in a results/ folder next to your CIF file:
results/
├── bandgap.inp # CP2K input for bandgap
├── bandgap.out # CP2K output for bandgap
├── bandgap.out.stderr # stderr from CP2K
├── mof_bandgap-RESTART.wfn # Wavefunction checkpoint (for restarts)
├── *.pdos # PDOS files (one per element/spin — used for DOS)
├── adsorption.inp # CP2K input for adsorption
├── adsorption.out # CP2K output for adsorption
├── mof_with_li.cif # MOF structure with inserted ion
├── elemental_refs/ # Elemental reference calculations
│ ├── ref_Li.inp / ref_Li.out
│ └── ref_energies.json
├── summary.json # All 7 results in JSON format
└── run.log # Full timestamped log of the run
Restart support: If a calculation is interrupted, simply re-run the same
script. mofscreen detects existing checkpoint files and resumes automatically.
Result Fields Reference
BandgapResult
Field
Type
Description
bandgap_ev
float
Bandgap in eV (PBE — underestimates by ~30-50%)
classification
str
METALLIC, SEMI-METAL, SEMICONDUCTOR, INSULATOR, etc.
homo_ev
float
HOMO energy in eV
lumo_ev
float
LUMO energy in eV
scf_converged
bool
True if SCF converged
total_energy_ev
float
Total DFT energy in eV
elapsed_min
float
Wall-clock time in minutes
AdsorptionResult
Field
Type
Description
e_ads_ev
float
Adsorption energy: E(MOF+Ion) − E(MOF) − n×E(Ion)
e_mof_ion_ev
float
Total energy of MOF+ion system in eV
relaxed
bool
True if GEO_OPT converged
n_ions
int
Number of ions inserted
ion_symbol
str
Ion species (Li, Na, K, …)
elapsed_min
float
Wall-clock time in minutes
FormationResult
Field
Type
Description
e_form_ev
float
Total formation energy in eV
e_form_per_atom_ev
float
Formation energy per atom in eV/atom
refs_complete
bool
True if all elemental references were available
missing_elements
list[str]
Elements with no reference energy
VolumeResult
Field
Type
Description
expansion_pct
float
Volume expansion in % after insertion
v_before_A3
float
Volume of bare MOF in ų
v_after_A3
float
Volume with ion in ų
cell_relaxed
bool
True if cell vectors were relaxed
OCVResult
Field
Type
Description
ocv_v
float
Open-circuit voltage in Volts vs Ion⁺/Ion
z_charge
int
Ion charge (Li/Na/K=1, Mg/Ca/Zn=2, Al=3)
n_ions
int
Number of ions used
ion_symbol
str
Ion species
DiffusionBarrierResult
Field
Type
Description
barrier_ev
float
Migration barrier in eV (from NEB)
available
bool
True if a barrier file was successfully parsed
source_file
str
Path to the barrier file used
DOSResult
Field
Type
Description
fermi_ev
float
Fermi energy in eV
n_pdos_files
int
Number of PDOS files found
pdos_files
list[str]
Paths to all .pdos files
parsed
bool
True if PDOS files were found and parsed
Bandgap Classification
Classification
Range
Meaning for Anode
METALLIC
< 0.01 eV
Good electronic conductivity
SEMI-METAL
0.01–0.5 eV
Acceptable
NARROW-GAP SEMICONDUCTOR
0.5–1.5 eV
Common for conductive MOFs
SEMICONDUCTOR
1.5–3.0 eV
Common for MOFs
WIDE-GAP SEMICONDUCTOR
3.0–5.0 eV
Needs doping
INSULATOR
> 5.0 eV
Poor conductivity
License
MIT License
Citation
If you use this library in your research, please cite it appropriately.
About
Automated DFT screening of Metal-Organic Frameworks (MOFs) for multi-ion anode material properties using CP2K.