Skip to content

Commit 5b16e53

Browse files
committed
Simplify molecule test
1 parent 25d1492 commit 5b16e53

1 file changed

Lines changed: 2 additions & 23 deletions

File tree

test/molecules_test.jl

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,6 @@ Length = 3
1414
d = 3
1515
temperature = 2.0
1616
density = 1.2
17-
box = @SVector fill(typeof(temperature)((N / density)^(1 / d)), d)
18-
position_1 = [box .* @SVector rand(rng, d) for i in 1:Int(N // Length), m in 1:M]
19-
position = []
20-
for r in position_1
21-
push!(position, r)
22-
push!(position, r .+ @SVector [0.1, 0.1, 0.1])
23-
push!(position, r .- @SVector [0.1, 0.1, 0.1])
24-
end
25-
position = Vector{SVector{3,Float64}}(position)
26-
molecule = Vector{Int}()
27-
species = Vector{Int}()
28-
for i in 1:Int(N // Length)
29-
push!(species, 1)
30-
push!(species, 2)
31-
push!(species, 3)
32-
push!(molecule, i)
33-
push!(molecule, i)
34-
push!(molecule, i)
35-
end
3617

3718
function create_bond_matrix(N::Int)
3819
# Create a vector to store the SVectors, each containing a pair of integers
@@ -45,12 +26,10 @@ function create_bond_matrix(N::Int)
4526
end
4627
return matrix
4728
end
48-
29+
chains = load_chains("test/molecule.xyz", args=Dict("temperature" => [temperature], "model" => ["Trimer"], "list_type" => "LinkedList", "bonds" => create_bond_matrix(N)))
4930

5031
model_matrix = Trimer()
51-
bonds = create_bond_matrix(N)
52-
chains = [System(position, species, molecule, density, temperature, model_matrix, bonds; list_type=LinkedList) for _ in 1:M]
53-
## Define moves and combine them into a pool
32+
5433
pswap = 0.2
5534
displacement_policy = SimpleGaussian()
5635
displacement_parameters = ComponentArray=0.05)

0 commit comments

Comments
 (0)