Skip to content

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

@mfherbst

Description

@mfherbst

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) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions