Skip to content
Merged
Changes from all commits
Commits
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
11 changes: 8 additions & 3 deletions src/ParticlesMC.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ ParticlesMC implemented in Comonicon.
if model === nothing
model = params["model"]
end # optional field
if !isfile(config)
if !isfile(config) && !isdir(config)
error("Configuration file '$config' does not exist in the current path.")
end
filename = isdir(config) ? filename = system["filename"] : "" # if the config is a directory then one need to specify the root of the filenames in toml (include that in README?)
list_type = get(system, "list_type", "LinkedList") # optional field
list_parameters = get(system, "list_parameters", nothing) # optional field
bonds = get(system, "bonds", nothing)
Expand All @@ -176,15 +177,19 @@ ParticlesMC implemented in Comonicon.
"list_type" => list_type,
"list_parameters" => list_parameters,
"bonds" => bonds,
))
),
filename=filename,
)
else
chains = load_chains(config, args=Dict(
"temperature" => temperature,
"density" => density,
"model" => model,
"list_type" => list_type,
"list_parameters" => list_parameters,
))
),
filename=filename,
)
end
algorithm_list = []
# Setup moves
Expand Down