Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #172

Merged
merged 37 commits into from
Dec 2, 2024
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d599de3
Add radius_graph_jarvis.
knc6 Oct 26, 2024
77837a3
Add ALIGNN_FF2, radius_graph_jarvis.
knc6 Oct 27, 2024
060e8b5
Lint.
knc6 Oct 27, 2024
f00a94a
Lint
knc6 Oct 27, 2024
27708df
Lint
knc6 Oct 27, 2024
2ef5930
Add images in all graphs.
knc6 Oct 27, 2024
03e12e9
External.
knc6 Oct 29, 2024
8bb073f
New models for testing only.
knc6 Nov 3, 2024
e445579
Clean up.
knc6 Nov 4, 2024
0e29e77
PyTest fix.
knc6 Nov 4, 2024
03680d5
Fix calculator.
knc6 Nov 5, 2024
e558fd8
Update train.py.
knc6 Nov 6, 2024
fdc7600
additional outputs.
knc6 Nov 9, 2024
3c180de
Arr 0 fix.
knc6 Nov 9, 2024
8c983f5
stress change.
knc6 Nov 18, 2024
bac7d0b
Add new models.
knc6 Nov 19, 2024
d837b3f
Update README.md
knc6 Nov 19, 2024
ceb9813
Add stress method.
knc6 Nov 20, 2024
4c0dfd5
GH Yaml.
knc6 Nov 20, 2024
61d45e6
Slow test fix
knc6 Nov 20, 2024
2c3cb5b
Coverage update.
knc6 Nov 20, 2024
bc50cad
Coverage update.
knc6 Nov 20, 2024
e4440a0
Add NPT test.
knc6 Nov 20, 2024
9540915
Add NPT test.
knc6 Nov 20, 2024
a7c51ec
Os.
knc6 Nov 21, 2024
33725b1
Back to old stress calculator.
knc6 Nov 25, 2024
af3ae5d
Fix calculator
knc6 Dec 2, 2024
9349975
Update README.md
knc6 Dec 2, 2024
d28077f
Fix tests.
knc6 Dec 2, 2024
40c22a2
New FFs.
knc6 Dec 2, 2024
3a3987e
Phonons fix.
knc6 Dec 2, 2024
777fa07
calc fix
knc6 Dec 2, 2024
193c921
Update README.md
knc6 Dec 2, 2024
48f934e
Update README.md
knc6 Dec 2, 2024
bf6e923
Update ff.py
knc6 Dec 2, 2024
ed60958
Update README.md
knc6 Dec 2, 2024
c17395c
Update README.md
knc6 Dec 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Coverage update.
  • Loading branch information
knc6 committed Nov 20, 2024
commit bc50cada394dcd714d7365b5fa34ea37cacbb24f
90 changes: 0 additions & 90 deletions alignn/ff/ff.py
Original file line number Diff line number Diff line change
@@ -1475,93 +1475,3 @@ def ase_phonon(
fig.savefig(filename)
plt.close()
return bs


if __name__ == "__main__":
"""
atoms = JarvisAtoms.from_dict(
# get_jid_data(jid="JVASP-867", dataset="dft_3d")["atoms"]
# get_jid_data(jid="JVASP-1002", dataset="dft_3d")["atoms"]
get_jid_data(jid="JVASP-816", dataset="dft_3d")["atoms"]
)
mlearn = "/wrk/knc6/ALINN_FC/FD_mult/temp_new" # mlearn_path()
phonons(atoms=atoms, model_path=mlearn, enforce_c_size=3)
"""
ff = get_figshare_model_ff()
print("ff", ff)
# phonons3(atoms=atoms, model_path=mlearn, enforce_c_size=3)
# ase_phonon(atoms=atoms, model_path=mlearn)

"""
if __name__ == "__main__":

from jarvis.db.figshare import get_jid_data
from jarvis.core.atoms import Atoms

# atoms = Spacegroup3D(
# JarvisAtoms.from_dict(
# get_jid_data(jid="JVASP-816", dataset="dft_3d")["atoms"]
# )
# ).conventional_standard_structure
# atoms = JarvisAtoms.from_poscar("POSCAR")
# atoms = atoms.make_supercell_matrix([2, 2, 2])
# print(atoms)
model_path = default_path()
print("model_path", model_path)
# atoms=atoms.strain_atoms(.05)
# print(atoms)
# ev = ev_curve(atoms=atoms, model_path=model_path)
# surf = surface_energy(atoms=atoms, model_path=model_path)
# print(surf)
# vac = vacancy_formation(atoms=atoms, model_path=model_path)
# print(vac)

# ff = ForceField(
# jarvis_atoms=atoms,
# model_path=model_path,
# )
# en,fs = ff.unrelaxed_atoms()
# print ('en',en)
# print('fs',fs)
# phonons(atoms=atoms)
# phonons3(atoms=atoms)
# ff.set_momentum_maxwell_boltzmann(temperature_K=300)
# xx = ff.optimize_atoms(optimizer="FIRE")
# print("optimized st", xx)
# xx = ff.run_nve_velocity_verlet(steps=5)
# xx = ff.run_nvt_langevin(steps=5)
# xx = ff.run_nvt_andersen(steps=5)
# xx = ff.run_npt_nose_hoover(steps=20000, temperature_K=1800)
# print(xx)
atoms_al = Atoms.from_dict(
get_jid_data(dataset="dft_3d", jid="JVASP-816")["atoms"]
)
surf = surface_energy(atoms=atoms_al, model_path=model_path)
# atoms_al2o3 = Atoms.from_dict(
# get_jid_data(dataset="dft_3d", jid="JVASP-32")["atoms"]
# )
# atoms_sio2 = Atoms.from_dict(
# get_jid_data(dataset="dft_3d", jid="JVASP-58349")["atoms"]
# )
# atoms_cu = Atoms.from_dict(
# get_jid_data(dataset="dft_3d", jid="JVASP-867")["atoms"]
# )
# atoms_cu2o = Atoms.from_dict(
# get_jid_data(dataset="dft_3d", jid="JVASP-1216")["atoms"]
# )
# atoms_graph = Atoms.from_dict(
# get_jid_data(dataset="dft_3d", jid="JVASP-48")["atoms"]
# )
# intf = get_interface_energy(
# film_atoms=atoms_cu,
# subs_atoms=atoms_cu2o,
# film_thickness=25,
# subs_thickness=25,
# model_path=model_path,
# seperation=4.5,
# subs_index=[1, 1, 1],
# film_index=[1, 1, 1],
# )
# print(intf)
print(surf)
"""
10 changes: 5 additions & 5 deletions alignn/tests/test_alignn_ff.py
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
get_figshare_model_ff,
)
from alignn.graphs import Graph, radius_graph_jarvis, radius_graph_old
from alignn.ff.ff import phonons
from alignn.ff.ff import phonons,ase_phonon
from jarvis.core.atoms import ase_to_atoms
from jarvis.db.figshare import get_jid_data
from jarvis.core.atoms import Atoms
@@ -83,7 +83,7 @@ def test_ev():
print("atoms", atoms)
# atoms = atoms.make_supercell_matrix([2, 2, 2])
# atoms=atoms.strain_atoms(.05)
ev = ev_curve(atoms=atoms, model_path=model_path)
ev = ev_curve(atoms=atoms, model_path=model_path,on_relaxed_struct=True)
# surf = surface_energy(atoms=atoms, model_path=model_path)
# print('surf',surf)
# vac = vacancy_formation(atoms=atoms, model_path=model_path)
@@ -118,12 +118,12 @@ def test_phonons():
model_name="v10.30.2024_dft_3d_307k"
) # default_path()
ph = phonons(model_path=model_path, atoms=(atoms))

ase_phonon(atoms=atoms,model_path=model_path)

# print('test_graph_builder')
test_graph_builder()
#test_graph_builder()
# print('test_ev')
# test_ev()
# print('test_phonons')
# test_phonons()
test_phonons()
# test_alignnff()
Loading