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

Zero LJ potential, where non-zero value expected #49

Open
mfherbst opened this issue May 20, 2023 · 0 comments
Open

Zero LJ potential, where non-zero value expected #49

mfherbst opened this issue May 20, 2023 · 0 comments

Comments

@mfherbst
Copy link
Member

This fails with an assertion error when checking the returned energy after evaluating the interatomic potential. I'm not sure what's going on, could be a wrongful screening.

using InteratomicPotentials
using Downloads
using AtomsIO
using Unitful
using UnitfulAtomic
                             
Downloads.download("https://raw.githubusercontent.com/JuliaMolSim/DFTK.jl/904a6e291a7ebb1da76e690cc4ff665be73d8344/examples/Si.extxyz", "Si.extxyz")
                                            
system = load_system("Si.extxyz")
distance = norm(position(system, 1) - position(system, 2))
                                                                       
ε = 10.0u"eV"                                                        
σ = 0.25u"Å"                                                         
r_cutoff = 10u"Å"                                                    
lj = LennardJones(ε, σ, r_cutoff, [:Si, ])                           
                                                                       
@assert distance < r_cutoff                                          
@assert atomic_symbol(system, 1) == :Si                              
@assert atomic_symbol(system, 2) == :Si                                              
                                                                                       
pe, f = energy_and_force(system, lj)                                                 
                                                                                       
@assert !iszero(pe)     # Fails here
@assert !iszero(f) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant