Skip to content

Commit

Permalink
Julia 0.6 *and* 0.7 compatability. Fixes to tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvist committed Aug 21, 2018
1 parent c82fe4f commit 6c0b261
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
15 changes: 10 additions & 5 deletions src/Quante.jl
Expand Up @@ -6,11 +6,16 @@ A fork of PqQuante in Julia; experimenting with quantum chemistry in the Julia l

module Quante

using Test # so we can have tests distributed in source
using Distributed
using SharedArrays
using LinearAlgebra
using SpecialFunctions
# Pull in necessary STDLIB stuff for Julia 0.7+
@static if VERSION < v"0.7.0-DEV.2005"
using Base.Test
else
using Test # so we can have tests distributed in source
using Distributed
using SharedArrays
using LinearAlgebra
using SpecialFunctions
end

include("physicalconstants.jl")

Expand Down
2 changes: 1 addition & 1 deletion src/basissets.jl
Expand Up @@ -170,7 +170,7 @@ function test_geo_basis()
@test overlap(l,r) 0.6647387449282997
@test kinetic(l,l) 0.76003188
@test kinetic(r,r) 0.76003188
@test ikinetic(l,r) 0.24141861181119084
@test kinetic(l,r) 0.24141861181119084
@test coulomb(l,l,l,l) 0.7746059439196398
@test coulomb(r,r,r,r) 0.7746059439196398
@test coulomb(l,l,r,r) 0.5727937653511646
Expand Down
2 changes: 1 addition & 1 deletion src/nuclear.jl
Expand Up @@ -110,7 +110,7 @@ end


function test_na2()
@testset test_na2 begin
@testset "test_na2" begin
li,h = lih.atomlist
bfs = build_basis(lih)
s1,s2,x,y,z,h1s = bfs.bfs
Expand Down
2 changes: 1 addition & 1 deletion src/rhf.jl
Expand Up @@ -118,7 +118,7 @@ function rhf(mol::Molecule,MaxIter::Int64=40; verbose::Bool=false, Econvergence:
h = T+V
# generalised eigenvalue decomposition of one-electron hamiltonian and overlap matrix
# used as starting guess for self-consistent procedure?
E,U = eigen(h,S)
E,U = eig(h,S)
# Enuke = (classical) nuclear repulision
Enuke = nuclear_repulsion(mol)
# Define occupied and virtual orbitals
Expand Down
8 changes: 7 additions & 1 deletion test/runtests.jl
@@ -1,6 +1,12 @@
push!(LOAD_PATH, "../src")

using Quante, Test
using Quante
if VERSION < v"0.7.0-DEV.2005"
using Base.Test
else
using Test
end

@testset "Quante.jl" begin

#include("C60.jl")
Expand Down

0 comments on commit 6c0b261

Please sign in to comment.