From 90d7d7ebe06b946ec4e8514b2f90156e86b21c87 Mon Sep 17 00:00:00 2001 From: Kamal Choudhary Date: Thu, 28 Mar 2024 18:01:05 -0400 Subject: [PATCH] improvement: add `Atoms.clone()` and `remove sites by indices`, including in-place. Version update. (#316) * improvement: add `Atoms.clone()` and `remove sites by indices`, including in-place. Use `develop` branch for the PR. (#315) * Fix phonopy requirements. * Fix all requirements. * Fix phonopy requirements. * QE test. * QE test. * Update action_build. * Try other python versions. * Try other python versions. * README updates. * Adding nexus. (#197) * Develop (#196) * Image augmentation. * Augment images. * Augment images. * Specie update. * Add Latt2D, STM image (b-1) fix, image augmentation fix. * Add Latt2D, STM image (b-1) fix, image augmentation fix. * Update conf.py * Update conf.py * Multi-output graph bacthing. * Add EDOS dataset. * Temp. * Add circuit maker. * Add circuit maker. * NELECT update. * Version update, more DBs added. * Fix CHGCAR vasp. * Added volumetric reshape for CHGCAR. * Tmp * Tershoff Hamman update, specie update. * Add crop from center in STM. * Add Fourier transfor in STM. * Update STM pytest. * Add DPI to STM. * Zeo++ added, Atoms cif update, STM update, random vacancy maker added. * Atoms tempfile fix, Potcar from atoms module added. * Test for docs. * C2DB link update, docs Atoms update. * C2DB link update, docs Atoms update. * Version update, COD DB, QM9 JCTC DB added. * Compostion bug fix, elemental descriptor added. * Develop (#186) * Update outputs.py I added the calculation of the Raman intensities inside parse_raman_dat * Update outputs.py * Update outputs.py * Update outputs.py * Update cfid.py * Delete __init__.py * stylecss added. * stylecss added. * Adding extra Makefile/ * Remove examples from docs. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Tutorials update. * Tutorials docs update. * Docs update,pdb reader updated. * Update action_build.yml * Update action_build.yml * Remove pytraj strong dependencies. * Update docs, Added PDBBind and HPOV datasets. * Docs update. * Add thcikness to surface builder. * Surface builder update, Chemical only magpie descriptors added, pdb_core dataset added, zeopp tempfile bugfix. * Typo fix. * Add names to chem descs. * Lessen hermsolver pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * No DFT3D * Exclude dft_3d dataset for memory issue. * Update figshare test. * Update figshare test. * Exclude db from coverage. * Exclude db from coverage. * Add magpie.json. * Add magpie.json. * Wien2k bands bug fix. * Wien2k bands bug fix. * Update JARVIS-FF,Elastictensor,LAMMPS parse folder, VASP bandstructure plot code. * JFF update. * Add JQE_TB3 and hMOF dataset. * Update LAMMPS module. * Update LAMMPS module. * Fix elastic tensor module. * Figshare update, docs db name update. * Substitutions. * Update figshare dft_3d, cfid_3d. * Docs data update. * Generate substitutions. * Lint fix. * Update DOS. * Update DOS. Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: KAMAL CHOUDHARY * First input. * added black * Example folder. Co-authored-by: Kamal Choudhary Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: KAMAL CHOUDHARY * Revert back. * Update .readthedocs.yaml * Update dev-requirements.txt * Docs requirements update. * Update .readthedocs.yaml * Update requirements.txt * Update .readthedocs.yaml * Update requirements.txt * Update .readthedocs.yaml * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update atoms.py * Fixe pbc in ase_to_Atoms. * Add installation tests (#214) * QE inputs, XANES, GHAction updates. (#210) * Image augmentation. * Augment images. * Augment images. * Specie update. * Add Latt2D, STM image (b-1) fix, image augmentation fix. * Add Latt2D, STM image (b-1) fix, image augmentation fix. * Update conf.py * Update conf.py * Multi-output graph bacthing. * Add EDOS dataset. * Temp. * Add circuit maker. * Add circuit maker. * NELECT update. * Version update, more DBs added. * Fix CHGCAR vasp. * Added volumetric reshape for CHGCAR. * Tmp * Tershoff Hamman update, specie update. * Add crop from center in STM. * Add Fourier transfor in STM. * Update STM pytest. * Add DPI to STM. * Zeo++ added, Atoms cif update, STM update, random vacancy maker added. * Atoms tempfile fix, Potcar from atoms module added. * Test for docs. * C2DB link update, docs Atoms update. * C2DB link update, docs Atoms update. * Version update, COD DB, QM9 JCTC DB added. * Compostion bug fix, elemental descriptor added. * Develop (#186) * Update outputs.py I added the calculation of the Raman intensities inside parse_raman_dat * Update outputs.py * Update outputs.py * Update outputs.py * Update cfid.py * Delete __init__.py * stylecss added. * stylecss added. * Adding extra Makefile/ * Remove examples from docs. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Tutorials update. * Tutorials docs update. * Docs update,pdb reader updated. * Update action_build.yml * Update action_build.yml * Remove pytraj strong dependencies. * Update docs, Added PDBBind and HPOV datasets. * Docs update. * Add thcikness to surface builder. * Surface builder update, Chemical only magpie descriptors added, pdb_core dataset added, zeopp tempfile bugfix. * Typo fix. * Add names to chem descs. * Lessen hermsolver pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * No DFT3D * Exclude dft_3d dataset for memory issue. * Update figshare test. * Update figshare test. * Exclude db from coverage. * Exclude db from coverage. * Add magpie.json. * Add magpie.json. * Wien2k bands bug fix. * Wien2k bands bug fix. * Update JARVIS-FF,Elastictensor,LAMMPS parse folder, VASP bandstructure plot code. * JFF update. * Add JQE_TB3 and hMOF dataset. * Update LAMMPS module. * Update LAMMPS module. * Fix elastic tensor module. * Figshare update, docs db name update. * Substitutions. * Update figshare dft_3d, cfid_3d. * Docs data update. * Generate substitutions. * Lint fix. * Update DOS. * Update DOS. * Adding folders for nexus setup. * Update QMOF and hMOF info. * Fixing auto klength error. * Adding zeopp surface area. * Vacancy bug fix, added hmof to docs. * vacancy update. * QE inputs update. * Pyhon 3.9 test, added QE el-ph, VASP XANES, modified hmof db details. * Update Contribution.rst * Minor lint fix. * Update action_build.yml * Update action_build.yml * Fix qiskit requirements. * Fix phonopy requirements. * Fix all requirements. * Fix phonopy requirements. * QE test. * QE test. * Update action_build. * Try other python versions. * Try other python versions. * README updates. * Adding nexus. (#197) * Develop (#196) * Image augmentation. * Augment images. * Augment images. * Specie update. * Add Latt2D, STM image (b-1) fix, image augmentation fix. * Add Latt2D, STM image (b-1) fix, image augmentation fix. * Update conf.py * Update conf.py * Multi-output graph bacthing. * Add EDOS dataset. * Temp. * Add circuit maker. * Add circuit maker. * NELECT update. * Version update, more DBs added. * Fix CHGCAR vasp. * Added volumetric reshape for CHGCAR. * Tmp * Tershoff Hamman update, specie update. * Add crop from center in STM. * Add Fourier transfor in STM. * Update STM pytest. * Add DPI to STM. * Zeo++ added, Atoms cif update, STM update, random vacancy maker added. * Atoms tempfile fix, Potcar from atoms module added. * Test for docs. * C2DB link update, docs Atoms update. * C2DB link update, docs Atoms update. * Version update, COD DB, QM9 JCTC DB added. * Compostion bug fix, elemental descriptor added. * Develop (#186) * Update outputs.py I added the calculation of the Raman intensities inside parse_raman_dat * Update outputs.py * Update outputs.py * Update outputs.py * Update cfid.py * Delete __init__.py * stylecss added. * stylecss added. * Adding extra Makefile/ * Remove examples from docs. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Tutorials update. * Tutorials docs update. * Docs update,pdb reader updated. * Update action_build.yml * Update action_build.yml * Remove pytraj strong dependencies. * Update docs, Added PDBBind and HPOV datasets. * Docs update. * Add thcikness to surface builder. * Surface builder update, Chemical only magpie descriptors added, pdb_core dataset added, zeopp tempfile bugfix. * Typo fix. * Add names to chem descs. * Lessen hermsolver pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * No DFT3D * Exclude dft_3d dataset for memory issue. * Update figshare test. * Update figshare test. * Exclude db from coverage. * Exclude db from coverage. * Add magpie.json. * Add magpie.json. * Wien2k bands bug fix. * Wien2k bands bug fix. * Update JARVIS-FF,Elastictensor,LAMMPS parse folder, VASP bandstructure plot code. * JFF update. * Add JQE_TB3 and hMOF dataset. * Update LAMMPS module. * Update LAMMPS module. * Fix elastic tensor module. * Figshare update, docs db name update. * Substitutions. * Update figshare dft_3d, cfid_3d. * Docs data update. * Generate substitutions. * Lint fix. * Update DOS. * Update DOS. Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: KAMAL CHOUDHARY * First input. * added black * Example folder. Co-authored-by: Kamal Choudhary Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: KAMAL CHOUDHARY * Revert back. * Update .readthedocs.yaml * Update dev-requirements.txt * Docs requirements update. * Update .readthedocs.yaml * Update requirements.txt * Update .readthedocs.yaml * Update requirements.txt * Update .readthedocs.yaml * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update atoms.py * Fixe pbc in ase_to_Atoms. Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: KAMAL CHOUDHARY Co-authored-by: wines1 <74620550+wines1@users.noreply.github.com> * Add installation tests * Fix codestyle * Fix codestyle with black * Add docstrings * Fix pydocstyle error * Update __init__.py * Update __init__.py Co-authored-by: Kamal Choudhary Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: KAMAL CHOUDHARY Co-authored-by: wines1 <74620550+wines1@users.noreply.github.com> * Adding QE super. * Minor changes to QE module, atoms xyz fix. * Adding qe_tb info, and version update. * Update __init__.py * WIP super QE. * Working version of ScSi. * QE inputs and task update. * Add master super. * Add master super. * Lint fix. * Lint fix. * Minor fix. * ET update. * Fix ET test. * Update sanitize atoms. * Additonal checks on supercond. * Debye bug fix. * Pressure in QE Super. * Version fix, publication update, supercond workflow update. * Lint fix. * Tensorboard fix. * Tensorboard fix. * Tensorboard fix. * Melting temp fix. * Update vasp.py (#234) * Local tetra tmp. * Version update. * Lint fix. * HSE06 * Tmp. * Vacancy update, Optimade structureand other minor lint updates. * STEM pytest fix. * Minor lint fix. * Fixed selectrive dynamics issue in Poscar, force reading for single atom system in Vasprun, np.array in core.graps, num_atoms for single atom systems in core.Atoms * Lint fix. * Added phononDos class. * fix pytorch UserWarning in build_undirected_edgedata() (#243) site-packages/jarvis/core/graphs.py:158: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. r = torch.tensor(r).type(torch.get_default_dtype()) * Add PhaseDiagram. * Add PhaseDiagram. * PhaseDiagram update. * STM image pytest increase, requirements upgrade. * STM image pytest increase, requirements upgrade. * STM image pytest increase, requirements upgrade. * Compare atoms, get spg info directly from atoms. * Flake8 fix. * Update publications.rst * Update qiskit. * Update qiskit. * Update test_hermsolver.py * FIix qiskit DOS. * Update test_hermsolver.py * Fix linting. * Develop og (#257) * Added isotope scattering rate to phonon DOS analysis script. * Linting fix. * Linting fix. * Linting fix. * Add QE convergence. * Update converg.py. * Nexus. * Super with converg. * Super with converg. * SuperCon QE update. * Figshare DB update. * Figshare DB update. * Update alignn ff link. * Lint fix. * DB docs update. * Minor fixes: delete agg in figshare, add destination path in figshare data, dtype compatibility with new numpy. * Lint fix. * Supercon workflow fix. * Add extra db entires, fix chem in cfid_chem. * Version update. * Add figshare datasets. * Update databases.rst * codecov fix. * Version update. * Lint fix. * Add FigShare datasets, DOS in QE, Uncertainty. * Add python 3.9. * Create README.md * Update README. * Add README.md. * Update action_build.yml * Update action_lint.yml * Allow md file, add mode databases. * Create NISTtheDocs2Death.yml * Allow md file, add mode databases. * Add publications. * Update publications.rst * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update requirements.txt * Create deploy_nist_pages.yml * Add mkdocs. * Update deploy_nist_pages.yml * Update md. * Update setup.py * Update readme. * Update setup.py * Remove absl. * Update dev-requirements.txt * Update index.md * Update deploy_nist_pages.yml * Update index.rst * Add redirect. * Update action_build.yml * Update dev-requirements.txt * Update dev-requirements.txt * Update setup.py * Update dev-requirements.txt * Fix __repr__ for Atoms. * Update requirements. * Update requirements. * Update requirements. * Update requirements. * Update requirements. * Update requirements. * Update requirements. * Update requirements. * Fix requirements. * Fix requirements. * Fix requirements. * Fix requirements. * Use poscar write as string. * Use poscar write as string. * Use poscar write as string. * Update action_build.yml * Use poscar write as string. * Use poscar write as string. * Update action_build.yml * Use poscar write as string. * Use poscar write as string. * Delete NISTtheDocs2Death.yml * Delete action_lint.yml * Use poscar write as string. * Fix phonopy. * Update dev-requirements.txt * Update databases. * Add eigs. * Add eigs. * Add eigs. * Fix STM test. * Delete .travis.yml * Update README. * Add python docs. * GA * Update action_build.yml * Atoms class update with props. * Atoms class update with props. * Delete .readthedocs.yaml * Update README.md * QEjob fix. * Chang poscar write. * Add check_polar update, locpot update. * Locpot pytest. * X locpot. * Lint. * Update figshare.py * Update tutorials.md for get_chem_only_descriptors (#309) * Develop (#308) * Exclude db from coverage. * Exclude db from coverage. * Add magpie.json. * Add magpie.json. * Wien2k bands bug fix. * Wien2k bands bug fix. * Update JARVIS-FF,Elastictensor,LAMMPS parse folder, VASP bandstructure plot code. * JFF update. * Add JQE_TB3 and hMOF dataset. * Update LAMMPS module. * Update LAMMPS module. * Fix elastic tensor module. * Figshare update, docs db name update. * Substitutions. * Update figshare dft_3d, cfid_3d. * Docs data update. * Generate substitutions. * Lint fix. * Update DOS. * Update DOS. * Adding folders for nexus setup. * Update QMOF and hMOF info. * Fixing auto klength error. * Adding zeopp surface area. * Vacancy bug fix, added hmof to docs. * vacancy update. * QE inputs update. * Pyhon 3.9 test, added QE el-ph, VASP XANES, modified hmof db details. * Update Contribution.rst * Minor lint fix. * Update action_build.yml * Update action_build.yml * Fix qiskit requirements. * Fix phonopy requirements. * Fix all requirements. * Fix phonopy requirements. * QE test. * QE test. * Update action_build. * Try other python versions. * Try other python versions. * README updates. * Adding nexus. (#197) * Develop (#196) * Image augmentation. * Augment images. * Augment images. * Specie update. * Add Latt2D, STM image (b-1) fix, image augmentation fix. * Add Latt2D, STM image (b-1) fix, image augmentation fix. * Update conf.py * Update conf.py * Multi-output graph bacthing. * Add EDOS dataset. * Temp. * Add circuit maker. * Add circuit maker. * NELECT update. * Version update, more DBs added. * Fix CHGCAR vasp. * Added volumetric reshape for CHGCAR. * Tmp * Tershoff Hamman update, specie update. * Add crop from center in STM. * Add Fourier transfor in STM. * Update STM pytest. * Add DPI to STM. * Zeo++ added, Atoms cif update, STM update, random vacancy maker added. * Atoms tempfile fix, Potcar from atoms module added. * Test for docs. * C2DB link update, docs Atoms update. * C2DB link update, docs Atoms update. * Version update, COD DB, QM9 JCTC DB added. * Compostion bug fix, elemental descriptor added. * Develop (#186) * Update outputs.py I added the calculation of the Raman intensities inside parse_raman_dat * Update outputs.py * Update outputs.py * Update outputs.py * Update cfid.py * Delete __init__.py * stylecss added. * stylecss added. * Adding extra Makefile/ * Remove examples from docs. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Tutorials update. * Tutorials docs update. * Docs update,pdb reader updated. * Update action_build.yml * Update action_build.yml * Remove pytraj strong dependencies. * Update docs, Added PDBBind and HPOV datasets. * Docs update. * Add thcikness to surface builder. * Surface builder update, Chemical only magpie descriptors added, pdb_core dataset added, zeopp tempfile bugfix. * Typo fix. * Add names to chem descs. * Lessen hermsolver pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * No DFT3D * Exclude dft_3d dataset for memory issue. * Update figshare test. * Update figshare test. * Exclude db from coverage. * Exclude db from coverage. * Add magpie.json. * Add magpie.json. * Wien2k bands bug fix. * Wien2k bands bug fix. * Update JARVIS-FF,Elastictensor,LAMMPS parse folder, VASP bandstructure plot code. * JFF update. * Add JQE_TB3 and hMOF dataset. * Update LAMMPS module. * Update LAMMPS module. * Fix elastic tensor module. * Figshare update, docs db name update. * Substitutions. * Update figshare dft_3d, cfid_3d. * Docs data update. * Generate substitutions. * Lint fix. * Update DOS. * Update DOS. Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: KAMAL CHOUDHARY * First input. * added black * Example folder. Co-authored-by: Kamal Choudhary Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: KAMAL CHOUDHARY * Revert back. * Update .readthedocs.yaml * Update dev-requirements.txt * Docs requirements update. * Update .readthedocs.yaml * Update requirements.txt * Update .readthedocs.yaml * Update requirements.txt * Update .readthedocs.yaml * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update atoms.py * Fixe pbc in ase_to_Atoms. * Add installation tests (#214) * QE inputs, XANES, GHAction updates. (#210) * Image augmentation. * Augment images. * Augment images. * Specie update. * Add Latt2D, STM image (b-1) fix, image augmentation fix. * Add Latt2D, STM image (b-1) fix, image augmentation fix. * Update conf.py * Update conf.py * Multi-output graph bacthing. * Add EDOS dataset. * Temp. * Add circuit maker. * Add circuit maker. * NELECT update. * Version update, more DBs added. * Fix CHGCAR vasp. * Added volumetric reshape for CHGCAR. * Tmp * Tershoff Hamman update, specie update. * Add crop from center in STM. * Add Fourier transfor in STM. * Update STM pytest. * Add DPI to STM. * Zeo++ added, Atoms cif update, STM update, random vacancy maker added. * Atoms tempfile fix, Potcar from atoms module added. * Test for docs. * C2DB link update, docs Atoms update. * C2DB link update, docs Atoms update. * Version update, COD DB, QM9 JCTC DB added. * Compostion bug fix, elemental descriptor added. * Develop (#186) * Update outputs.py I added the calculation of the Raman intensities inside parse_raman_dat * Update outputs.py * Update outputs.py * Update outputs.py * Update cfid.py * Delete __init__.py * stylecss added. * stylecss added. * Adding extra Makefile/ * Remove examples from docs. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Tutorials update. * Tutorials docs update. * Docs update,pdb reader updated. * Update action_build.yml * Update action_build.yml * Remove pytraj strong dependencies. * Update docs, Added PDBBind and HPOV datasets. * Docs update. * Add thcikness to surface builder. * Surface builder update, Chemical only magpie descriptors added, pdb_core dataset added, zeopp tempfile bugfix. * Typo fix. * Add names to chem descs. * Lessen hermsolver pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * No DFT3D * Exclude dft_3d dataset for memory issue. * Update figshare test. * Update figshare test. * Exclude db from coverage. * Exclude db from coverage. * Add magpie.json. * Add magpie.json. * Wien2k bands bug fix. * Wien2k bands bug fix. * Update JARVIS-FF,Elastictensor,LAMMPS parse folder, VASP bandstructure plot code. * JFF update. * Add JQE_TB3 and hMOF dataset. * Update LAMMPS module. * Update LAMMPS module. * Fix elastic tensor module. * Figshare update, docs db name update. * Substitutions. * Update figshare dft_3d, cfid_3d. * Docs data update. * Generate substitutions. * Lint fix. * Update DOS. * Update DOS. * Adding folders for nexus setup. * Update QMOF and hMOF info. * Fixing auto klength error. * Adding zeopp surface area. * Vacancy bug fix, added hmof to docs. * vacancy update. * QE inputs update. * Pyhon 3.9 test, added QE el-ph, VASP XANES, modified hmof db details. * Update Contribution.rst * Minor lint fix. * Update action_build.yml * Update action_build.yml * Fix qiskit requirements. * Fix phonopy requirements. * Fix all requirements. * Fix phonopy requirements. * QE test. * QE test. * Update action_build. * Try other python versions. * Try other python versions. * README updates. * Adding nexus. (#197) * Develop (#196) * Image augmentation. * Augment images. * Augment images. * Specie update. * Add Latt2D, STM image (b-1) fix, image augmentation fix. * Add Latt2D, STM image (b-1) fix, image augmentation fix. * Update conf.py * Update conf.py * Multi-output graph bacthing. * Add EDOS dataset. * Temp. * Add circuit maker. * Add circuit maker. * NELECT update. * Version update, more DBs added. * Fix CHGCAR vasp. * Added volumetric reshape for CHGCAR. * Tmp * Tershoff Hamman update, specie update. * Add crop from center in STM. * Add Fourier transfor in STM. * Update STM pytest. * Add DPI to STM. * Zeo++ added, Atoms cif update, STM update, random vacancy maker added. * Atoms tempfile fix, Potcar from atoms module added. * Test for docs. * C2DB link update, docs Atoms update. * C2DB link update, docs Atoms update. * Version update, COD DB, QM9 JCTC DB added. * Compostion bug fix, elemental descriptor added. * Develop (#186) * Update outputs.py I added the calculation of the Raman intensities inside parse_raman_dat * Update outputs.py * Update outputs.py * Update outputs.py * Update cfid.py * Delete __init__.py * stylecss added. * stylecss added. * Adding extra Makefile/ * Remove examples from docs. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Docs update. * Tutorials update. * Tutorials docs update. * Docs update,pdb reader updated. * Update action_build.yml * Update action_build.yml * Remove pytraj strong dependencies. * Update docs, Added PDBBind and HPOV datasets. * Docs update. * Add thcikness to surface builder. * Surface builder update, Chemical only magpie descriptors added, pdb_core dataset added, zeopp tempfile bugfix. * Typo fix. * Add names to chem descs. * Lessen hermsolver pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * Reduced pytest. * No DFT3D * Exclude dft_3d dataset for memory issue. * Update figshare test. * Update figshare test. * Exclude db from coverage. * Exclude db from coverage. * Add magpie.json. * Add magpie.json. * Wien2k bands bug fix. * Wien2k bands bug fix. * Update JARVIS-FF,Elastictensor,LAMMPS parse folder, VASP bandstructure plot code. * JFF update. * Add JQE_TB3 and hMOF dataset. * Update LAMMPS module. * Update LAMMPS module. * Fix elastic tensor module. * Figshare update, docs db name update. * Substitutions. * Update figshare dft_3d, cfid_3d. * Docs data update. * Generate substitutions. * Lint fix. * Update DOS. * Update DOS. Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: KAMAL CHOUDHARY * First input. * added black * Example folder. Co-authored-by: Kamal Choudhary Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: KAMAL CHOUDHARY * Revert back. * Update .readthedocs.yaml * Update dev-requirements.txt * Docs requirements update. * Update .readthedocs.yaml * Update requirements.txt * Update .readthedocs.yaml * Update requirements.txt * Update .readthedocs.yaml * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update atoms.py * Fixe pbc in ase_to_Atoms. Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: KAMAL CHOUDHARY Co-authored-by: wines1 <74620550+wines1@users.noreply.github.com> * Add installation tests * Fix codestyle * Fix codestyle with black * Add docstrings * Fix pydocstyle error * Update __init__.py * Update __init__.py Co-authored-by: Kamal Choudhary Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: KAMAL CHOUDHARY Co-authored-by: wines1 <74620550+wines1@users.noreply.github.com> * Adding QE super. * Minor changes to QE module, atoms xyz fix. * Adding qe_tb info, and version update. * Update __init__.py * WIP super QE. * Working version of ScSi. * QE inputs and task update. * Add master super. * Add master super. * Lint fix. * Lint fix. * Minor fix. * ET update. * Fix ET test. * Update sanitize atoms. * Additonal checks on supercond. * Debye bug fix. * Pressure in QE Super. * Version fix, publication update, supercond workflow update. * Lint fix. * Tensorboard fix. * Tensorboard fix. * Tensorboard fix. * Melting temp fix. * Update vasp.py (#234) * Local tetra tmp. * Version update. * Lint fix. * HSE06 * Tmp. * Vacancy update, Optimade structureand other minor lint updates. * STEM pytest fix. * Minor lint fix. * Fixed selectrive dynamics issue in Poscar, force reading for single atom system in Vasprun, np.array in core.graps, num_atoms for single atom systems in core.Atoms * Lint fix. * Added phononDos class. * fix pytorch UserWarning in build_undirected_edgedata() (#243) site-packages/jarvis/core/graphs.py:158: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. r = torch.tensor(r).type(torch.get_default_dtype()) * Add PhaseDiagram. * Add PhaseDiagram. * PhaseDiagram update. * STM image pytest increase, requirements upgrade. * STM image pytest increase, requirements upgrade. * STM image pytest increase, requirements upgrade. * Compare atoms, get spg info directly from atoms. * Flake8 fix. * Update publications.rst * Update qiskit. * Update qiskit. * Update test_hermsolver.py * FIix qiskit DOS. * Update test_hermsolver.py * Fix linting. * Develop og (#257) * Added isotope scattering rate to phonon DOS analysis script. * Linting fix. * Linting fix. * Linting fix. * Add QE convergence. * Update converg.py. * Nexus. * Super with converg. * Super with converg. * SuperCon QE update. * Figshare DB update. * Figshare DB update. * Update alignn ff link. * Lint fix. * DB docs update. * Minor fixes: delete agg in figshare, add destination path in figshare data, dtype compatibility with new numpy. * Lint fix. * Supercon workflow fix. * Add extra db entires, fix chem in cfid_chem. * Version update. * Add figshare datasets. * Update databases.rst * codecov fix. * Version update. * Lint fix. * Add FigShare datasets, DOS in QE, Uncertainty. * Add python 3.9. * Create README.md * Update README. * Add README.md. * Update action_build.yml * Update action_lint.yml * Allow md file, add mode databases. * Create NISTtheDocs2Death.yml * Allow md file, add mode databases. * Add publications. * Update publications.rst * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update requirements.txt * Create deploy_nist_pages.yml * Add mkdocs. * Update deploy_nist_pages.yml * Update md. * Update setup.py * Update readme. * Update setup.py * Remove absl. * Update dev-requirements.txt * Update index.md * Update deploy_nist_pages.yml * Update index.rst * Add redirect. * Update action_build.yml * Update dev-requirements.txt * Update dev-requirements.txt * Update setup.py * Update dev-requirements.txt * Fix __repr__ for Atoms. * Update requirements. * Update requirements. * Update requirements. * Update requirements. * Update requirements. * Update requirements. * Update requirements. * Update requirements. * Fix requirements. * Fix requirements. * Fix requirements. * Fix requirements. * Use poscar write as string. * Use poscar write as string. * Use poscar write as string. * Update action_build.yml * Use poscar write as string. * Use poscar write as string. * Update action_build.yml * Use poscar write as string. * Use poscar write as string. * Delete NISTtheDocs2Death.yml * Delete action_lint.yml * Use poscar write as string. * Fix phonopy. * Update dev-requirements.txt * Update databases. * Add eigs. * Add eigs. * Add eigs. * Fix STM test. * Delete .travis.yml * Update README. * Add python docs. * GA * Update action_build.yml * Atoms class update with props. * Atoms class update with props. * Delete .readthedocs.yaml * Update README.md * QEjob fix. * Chang poscar write. * Add check_polar update, locpot update. * Locpot pytest. * X locpot. * Lint. --------- Co-authored-by: KAMAL CHOUDHARY Co-authored-by: wines1 <74620550+wines1@users.noreply.github.com> Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: Saurav Maheshkar Co-authored-by: Janosh Riebesell Co-authored-by: Ramya Gurunathan * Update tutorials.md --------- Co-authored-by: Kamal Choudhary Co-authored-by: KAMAL CHOUDHARY Co-authored-by: wines1 <74620550+wines1@users.noreply.github.com> Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: Saurav Maheshkar Co-authored-by: Janosh Riebesell Co-authored-by: Ramya Gurunathan * Qsiqskit dversion and CFID chemical feature doc issue. * Update dev-requirements.txt * Update dev-requirements.txt * Update dev-requirements.txt * Update inputs.py * Update figshare.py * Update figshare.py * chore: update .gitignore to add pycharm .idea * improvements: clone method and remove multiple sites, including in place * tests: attempt adding tests for the new functionality not sure how to run these - some documentation would be good to have in README.md * Flake8 fix. * Add pydantic. * wien2k fix. * Comment out qiskit related tests. * Fix OneHotEncoder. * Check conda * Update action_build.yml * Update action_build.yml * Update action_build.yml * Update action_build.yml * Update action_build.yml * Update action_build.yml * Update action_build.yml * Update action_build.yml * Update action_build.yml * Update action_build.yml * Update action_build.yml * Update docs. * Update index.md * Update index.md * Minor lint fix. * Update deploy_nist_pages.yml * fix: lint * Fix bug in the PR. --------- Co-authored-by: knc6 Co-authored-by: wines1 <74620550+wines1@users.noreply.github.com> Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: KAMAL CHOUDHARY Co-authored-by: Saurav Maheshkar Co-authored-by: Janosh Riebesell Co-authored-by: Ramya Gurunathan Co-authored-by: Sangjoon Bob Lee * Version update. --------- Co-authored-by: Timur Bazhirov Co-authored-by: wines1 <74620550+wines1@users.noreply.github.com> Co-authored-by: tavazza Co-authored-by: knc6 Co-authored-by: KAMAL CHOUDHARY Co-authored-by: Saurav Maheshkar Co-authored-by: Janosh Riebesell Co-authored-by: Ramya Gurunathan Co-authored-by: Sangjoon Bob Lee --- .gitignore | 6 +- jarvis/__init__.py | 2 +- jarvis/core/atoms.py | 122 +++++++++++++--------- jarvis/tests/testfiles/core/test_atoms.py | 82 ++++++++++++--- setup.py | 2 +- 5 files changed, 147 insertions(+), 67 deletions(-) diff --git a/.gitignore b/.gitignore index b106e342..515ac96f 100644 --- a/.gitignore +++ b/.gitignore @@ -103,4 +103,8 @@ ENV/ # mypy .mypy_cache/ -.pytest_cache/ \ No newline at end of file +.pytest_cache/ + +# pycharm +.idea + diff --git a/jarvis/__init__.py b/jarvis/__init__.py index 080f8b4f..55e15284 100644 --- a/jarvis/__init__.py +++ b/jarvis/__init__.py @@ -1,6 +1,6 @@ """Version number.""" -__version__ = "2024.3.4" +__version__ = "2024.3.24" import os diff --git a/jarvis/core/atoms.py b/jarvis/core/atoms.py index 7bd5eb9e..0e612ee9 100644 --- a/jarvis/core/atoms.py +++ b/jarvis/core/atoms.py @@ -1,4 +1,5 @@ """This module provides classes to specify atomic structure.""" + import numpy as np from jarvis.core.composition import Composition from jarvis.core.specie import Specie, atomic_numbers_to_symbols @@ -698,14 +699,23 @@ def from_dict(self, d={}): def remove_site_by_index(self, site=0): """Remove an atom by its index number.""" + return self.remove_sites_by_indices(indices=[site]) + + def remove_sites_by_indices(self, indices=[0], in_place=False): + """Remove multiple atoms by their corresponding indices number.""" new_els = [] new_coords = [] new_props = [] for ii, i in enumerate(self.frac_coords): - if ii != site: + if ii not in indices: new_els.append(self.elements[ii]) new_coords.append(self.frac_coords[ii]) new_props.append(self.props[ii]) + if in_place: + self.elements = new_els + self.coords = new_coords + self.props = new_props + return self return Atoms( lattice_mat=self.lattice_mat, elements=new_els, @@ -1268,49 +1278,50 @@ def make_supercell(self, dim=[2, 2, 2]): dim = np.array(dim) if dim.shape == (3, 3): dim = np.array([int(np.linalg.norm(v)) for v in dim]) - coords = self.frac_coords - all_symbs = self.elements # [i.symbol for i in s.species] - nat = len(coords) - - new_nat = nat * dim[0] * dim[1] * dim[2] - new_coords = np.zeros((new_nat, 3)) - new_symbs = [] # np.chararray((new_nat)) - props = [] # self.props - - ct = 0 - for i in range(nat): - for j in range(dim[0]): - for k in range(dim[1]): - for m in range(dim[2]): - props.append(self.props[i]) - new_coords[ct][0] = (coords[i][0] + j) / float(dim[0]) - new_coords[ct][1] = (coords[i][1] + k) / float(dim[1]) - new_coords[ct][2] = (coords[i][2] + m) / float(dim[2]) - new_symbs.append(all_symbs[i]) - ct = ct + 1 - - nat = new_nat - - nat = len(coords) # int(s.composition.num_atoms) - lat = np.zeros((3, 3)) - box = self.lattice_mat - lat[0][0] = dim[0] * box[0][0] - lat[0][1] = dim[0] * box[0][1] - lat[0][2] = dim[0] * box[0][2] - lat[1][0] = dim[1] * box[1][0] - lat[1][1] = dim[1] * box[1][1] - lat[1][2] = dim[1] * box[1][2] - lat[2][0] = dim[2] * box[2][0] - lat[2][1] = dim[2] * box[2][1] - lat[2][2] = dim[2] * box[2][2] - super_cell = Atoms( - lattice_mat=lat, - coords=new_coords, - elements=new_symbs, - props=props, - cartesian=False, - ) - return super_cell + return self.make_supercell_matrix(dim) + # coords = self.frac_coords + # all_symbs = self.elements # [i.symbol for i in s.species] + # nat = len(coords) + + # new_nat = nat * dim[0] * dim[1] * dim[2] + # new_coords = np.zeros((new_nat, 3)) + # new_symbs = [] # np.chararray((new_nat)) + # props = [] # self.props + + # ct = 0 + # for i in range(nat): + # for j in range(dim[0]): + # for k in range(dim[1]): + # for m in range(dim[2]): + # props.append(self.props[i]) + # new_coords[ct][0] = (coords[i][0] + j) / float(dim[0]) + # new_coords[ct][1] = (coords[i][1] + k) / float(dim[1]) + # new_coords[ct][2] = (coords[i][2] + m) / float(dim[2]) + # new_symbs.append(all_symbs[i]) + # ct = ct + 1 + + # nat = new_nat + + # nat = len(coords) # int(s.composition.num_atoms) + # lat = np.zeros((3, 3)) + # box = self.lattice_mat + # lat[0][0] = dim[0] * box[0][0] + # lat[0][1] = dim[0] * box[0][1] + # lat[0][2] = dim[0] * box[0][2] + # lat[1][0] = dim[1] * box[1][0] + # lat[1][1] = dim[1] * box[1][1] + # lat[1][2] = dim[1] * box[1][2] + # lat[2][0] = dim[2] * box[2][0] + # lat[2][1] = dim[2] * box[2][1] + # lat[2][2] = dim[2] * box[2][2] + # super_cell = Atoms( + # lattice_mat=lat, + # coords=new_coords, + # elements=new_symbs, + # props=props, + # cartesian=False, + # ) + # return super_cell def get_lll_reduced_structure(self): """Get LLL algorithm based reduced structure.""" @@ -1431,6 +1442,17 @@ def get_string(self, cart=True, sort_order="X"): result = header + middle + rest return result + def clone(self): + """Clones the class instance.""" + return Atoms( + lattice_mat=self.lattice_mat, + elements=self.elements, + coords=self.frac_coords, + props=self.props, + cartesian=self.cartesian, + show_props=self.show_props, + ) + class VacuumPadding(object): """Adds vaccum padding to make 2D structure or making molecules.""" @@ -1860,18 +1882,18 @@ def to_optimade( info_at["cartesian_site_positions"] = atoms.cart_coords[order].tolist() info_at["nperiodic_dimensions"] = 3 # info_at["species"] = atoms.elements - info_at[ - "species" - ] = self.get_optimade_species() # dict(atoms.composition.to_dict()) + info_at["species"] = ( + self.get_optimade_species() + ) # dict(atoms.composition.to_dict()) info_at["elements_ratios"] = list( atoms.composition.atomic_fraction.values() ) info_at["structure_features"] = [] info_at["last_modified"] = str(now) # info_at["more_data_available"] = True - info_at[ - "chemical_formula_descriptive" - ] = atoms.composition.reduced_formula + info_at["chemical_formula_descriptive"] = ( + atoms.composition.reduced_formula + ) info_at["dimension_types"] = [1, 1, 1] info["attributes"] = info_at return info diff --git a/jarvis/tests/testfiles/core/test_atoms.py b/jarvis/tests/testfiles/core/test_atoms.py index 845e8edc..11712676 100644 --- a/jarvis/tests/testfiles/core/test_atoms.py +++ b/jarvis/tests/testfiles/core/test_atoms.py @@ -7,12 +7,18 @@ OptimadeAdaptor, ) - +import numpy as np import os from jarvis.db.figshare import get_jid_data, data import tarfile import tempfile +FIXTURES = { + "lattice_mat": [[2.715, 2.715, 0], [0, 2.715, 2.715], [2.715, 0, 2.715]], + "coords": [[0, 0, 0], [0.25, 0.2, 0.25]], + "elements": ["Si", "Si"], +} + new_file, filename = tempfile.mkstemp() @@ -55,11 +61,26 @@ "POSCAR", ) -cif_example = os.path.join(os.path.dirname(__file__), "1000052.cif",) -cif_example2 = os.path.join(os.path.dirname(__file__), "Bacomp.cif",) -cif_example3 = os.path.join(os.path.dirname(__file__), "mock.cif",) -cif_example4 = os.path.join(os.path.dirname(__file__), "exp_000034.cif",) -cif_example5 = os.path.join(os.path.dirname(__file__), "1000000.cif",) +cif_example = os.path.join( + os.path.dirname(__file__), + "1000052.cif", +) +cif_example2 = os.path.join( + os.path.dirname(__file__), + "Bacomp.cif", +) +cif_example3 = os.path.join( + os.path.dirname(__file__), + "mock.cif", +) +cif_example4 = os.path.join( + os.path.dirname(__file__), + "exp_000034.cif", +) +cif_example5 = os.path.join( + os.path.dirname(__file__), + "1000000.cif", +) def test_from_cif(): @@ -76,10 +97,11 @@ def test_from_cif(): def test_basic_atoms(): - box = [[2.715, 2.715, 0], [0, 2.715, 2.715], [2.715, 0, 2.715]] - coords = [[0, 0, 0], [0.25, 0.2, 0.25]] - elements = ["Si", "Si"] - Si = Atoms(lattice_mat=box, coords=coords, elements=elements) + Si = Atoms( + lattice_mat=FIXTURES["lattice_mat"], + coords=FIXTURES["coords"], + elements=FIXTURES["elements"], + ) dim = get_supercell_dims(Si) build_xanes_poscar(atoms=Si, filename_with_prefix=True) assert dim == [3, 3, 3] @@ -109,8 +131,8 @@ def test_basic_atoms(): prim = Si.get_primitive_atoms print(prim.cart_coords) conv = Si.get_conventional_atoms - spgn=Si.get_spacegroup - comp=compare_atoms(atoms1=prim,atoms2=conv) + spgn = Si.get_spacegroup + comp = compare_atoms(atoms1=prim, atoms2=conv) assert round(prim.cart_coords[0][0], 2) == round(4.37815150, 2) # print ('raw_distance_matrix', prim.raw_distance_matrix) # print ('raw_distance_matrix', Si.raw_distance_matrix) @@ -209,5 +231,37 @@ def test_basic_atoms(): os.system(cmd) -# test_basic_atoms() -# def test_basic_atoms(): +def test_clone(): + Si = Atoms( + lattice_mat=FIXTURES["lattice_mat"], + coords=FIXTURES["coords"], + elements=FIXTURES["elements"], + ) + Si2 = Si.clone() + np.testing.assert_array_equal(Si2.lattice_mat, Si.lattice_mat) + np.testing.assert_array_equal(Si2.coords, Si.coords) + assert Si2.props == Si.props + assert Si2.elements == Si.elements + assert Si2.cartesian == Si.cartesian + assert Si2.show_props == Si.show_props + + +def test_remove_sites_by_indices(): + Si = Atoms( + lattice_mat=FIXTURES["lattice_mat"], + coords=FIXTURES["coords"], + elements=FIXTURES["elements"], + ) + Si_supercell = Si.make_supercell([2, 2, 2]) + print("Si_supercell", Si_supercell) + Si2_supercell_without_two_atoms = Si_supercell.remove_sites_by_indices( + indices=[0, 1] + ) + print( + "Si2_supercell_without_two_atoms.num_atoms", + Si2_supercell_without_two_atoms.num_atoms, + ) + assert Si2_supercell_without_two_atoms.num_atoms == 14 + + +# test_remove_sites_by_indices() diff --git a/setup.py b/setup.py index 5817fb5c..00142423 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name="jarvis-tools", - version="2024.3.4", + version="2024.3.24", long_description=long_d, install_requires=[ "numpy>=1.20.1",