Skip to content
Merged
Show file tree
Hide file tree
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
20 changes: 18 additions & 2 deletions app/inputs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ module inputs

integer, dimension(3) :: grid = [0, 0, 0]
real(real12) :: grid_spacing = 0._real12
real(real12), dimension(3) :: method_probab = [1._real12, 1._real12, 1._real12]
real(real12), dimension(5) :: method_probab = &
[1._real12, 0.1_real12, 0.5_real12, 0.5_real12, 1._real12]

character(1024), dimension(:), allocatable :: database_list ! list of directories containing input database
character(1024) :: database_format !format of input file (POSCAR, XYZ, etc.
Expand Down Expand Up @@ -187,6 +188,8 @@ subroutine read_input_file(file_name)
!! Strings buffers to hold input values (usually derived types).
real(real12), dimension(3) :: width, sigma
!! Width and sigma values for distribution functions.
real(real12) :: void, rand, walk, grow, min
!! Placement method probabilities.
character(50), dimension(3) :: cutoff_min, cutoff_max
!! Cutoff values for distribution functions.
integer, allocatable, dimension(:) :: stoichiometry_list
Expand All @@ -198,9 +201,10 @@ subroutine read_input_file(file_name)
!---------------------------------------------------------------------------
! set up namelists for input file
!---------------------------------------------------------------------------
namelist /setup/ task, filename_host, seed, method_probab, grid, &
namelist /setup/ task, filename_host, seed, grid, &
grid_spacing, &
database_format, database, verbose, output_dir
namelist /placement_method/ void, rand, walk, grow, min
namelist /structure/ num_structures,stoichiometry
namelist /volume/ vdW, volvar
namelist /distribution/ cutoff_min, cutoff_max, width, sigma
Expand All @@ -220,13 +224,20 @@ subroutine read_input_file(file_name)
width = -1._real12
sigma = -1._real12
database_format = "vasprun.xml"
void = 0._real12; rand = 0._real12
walk = 0._real12; grow = 0._real12
min = 0._real12
!---------------------------------------------------------------------------
! read namelists from input file
!---------------------------------------------------------------------------
read(unit,NML=setup,iostat=iostat)
if(iostat.ne.0)then
write(0,*) "THERE WAS AN ERROR IN READING SETUP"
end if
read(unit,NML=placement_method,iostat=iostat)
if(.not.is_iostat_end(iostat).and.iostat.ne.0)then
stop "THERE WAS AN ERROR IN READING PLACEMENT_METHOD SETTINGS"
end if
read(unit,NML=structure,iostat=iostat)
if(.not.is_iostat_end(iostat).and.iostat.ne.0)then
stop "THERE WAS AN ERROR IN READING STRUCTURE SETTINGS"
Expand Down Expand Up @@ -257,6 +268,11 @@ subroutine read_input_file(file_name)
end do
end if

method_probab = [void, rand, walk, grow, min]
if(all(abs(method_probab).lt.1.E-6))then
method_probab = &
[1._real12, 0.1_real12, 0.5_real12, 0.5_real12, 1._real12]
end if

if(trim(stoichiometry).ne."")then
num_species = icount(stoichiometry,",")
Expand Down
9 changes: 8 additions & 1 deletion example/executable/param.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
database_format = "xyz"
database = "../example_files/database/",
seed = 1,
method_probab = 1.0 1.0 1.0,
grid_spacing = 0.05,
verbose = 0,
output_dir = "iteration1"
/

&placement_method
void = 1.0,
rand = 1.0,
walk = 1.0,
grow = 1.0,
min = 1.0
/

&structure
num_structures=10,
stoichiometry="{C:8, Mg:8}",
Expand Down
2 changes: 1 addition & 1 deletion example/wrapper/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
# )

# set energy scale
generator.distributions.set_kbT(0.5)
generator.distributions.set_kBT(0.5)
# set the distribution function widths (2-body, 3-body, 4-body)
generator.distributions.set_width([0.025, np.pi/200.0, np.pi/200.0])

Expand Down
2 changes: 1 addition & 1 deletion example/wrapper/run_BaTiO3.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
)

# set energy scale
generator.distributions.set_kbT(0.2)
generator.distributions.set_kBT(0.2)
# set the distribution function widths (2-body, 3-body, 4-body)
generator.distributions.set_width([0.025, np.pi/200.0, np.pi/200.0])

Expand Down
2 changes: 1 addition & 1 deletion example/wrapper/run_diamond.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
)

# set energy scale
generator.distributions.set_kbT(0.2)
generator.distributions.set_kBT(0.2)
# set the distribution function widths (2-body, 3-body, 4-body)
generator.distributions.set_width([0.025, np.pi/200.0, np.pi/200.0])

Expand Down
2 changes: 1 addition & 1 deletion example/wrapper/run_graphite.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
)

# set energy scale
generator.distributions.set_kbT(0.2)
generator.distributions.set_kBT(0.2)
# set the distribution function widths (2-body, 3-body, 4-body)
generator.distributions.set_width([0.025, np.pi/200.0, np.pi/200.0])

Expand Down
Loading