Download source/scratch_cache_initial.py from Queimo/rem3di-scratch-pcqm-cosmo: direct link, hf CLI and curl.
- Browser
- Download file 786 Bytes
-
https://huggingface.co/Queimo/rem3di-scratch-pcqm-cosmo/resolve/main/source/scratch_cache_initial.py
- Command line
-
hf download hf://Queimo/rem3di-scratch-pcqm-cosmo/source/scratch_cache_initial.py
-
curl -L -o scratch_cache_initial.py https://huggingface.co/Queimo/rem3di-scratch-pcqm-cosmo/resolve/main/source/scratch_cache_initial.py
786 Bytes
| """Cache independent COSMO/BigSolDB geometry while PCQM is built on the CPU.""" | |
| from pathlib import Path | |
| import sys | |
| sys.path.insert(0,str(Path(__file__).resolve().parent)) | |
| from scratch_data import * | |
| from scratch_fast_cache import cache_mace_fast | |
| def main(): | |
| with (OUT/'feature_cache.lock').open('a') as lock: | |
| fcntl.flock(lock,fcntl.LOCK_EX) | |
| shared.status=status | |
| cosmo=pd.concat([pd.read_parquet(p) for p in sorted(DATA.glob('cosmo-[0-9]*.parquet'))],ignore_index=True) | |
| assert len(cosmo)==360259 | |
| # Splitting changes only membership columns, never coordinates or row order. | |
| cache_mace_fast('cosmo',cosmo) | |
| shared.cache_mace('bigsoldb',pd.read_parquet(DATA/'bigsoldb_fixed_geometries.parquet')) | |
| if __name__=='__main__':main() | |