abics.mc_mpi module¶
-
class
abics.mc_mpi.ParallelMC(comm, MCalgo, model, configs, kTs, subdirs=True)[source]¶ Bases:
object- Parameters
comm (comm world) – MPI communicator
MCalgo (object for MonteCarlo algorithm) – MonteCarlo algorithm
model (dft_latgas object) – DFT lattice gas mapping model
configs (config object) – Configurations
kTs (list) – Temperature list
subdirs (boolean) – if true, working directory for this rank is made
-
__init__(comm, MCalgo, model, configs, kTs, subdirs=True)[source]¶ - Parameters
comm (comm world) – MPI communicator
MCalgo (object for MonteCarlo algorithm) – MonteCarlo algorithm
model (dft_latgas object) – DFT lattice gas mapping model
configs (config object) – Configurations
kTs (list) – Temperature list
subdirs (boolean) – if true, working directory for this rank is made
-
class
abics.mc_mpi.RXParams[source]¶ Bases:
objectParameter set for replica exchange Monte Carlo
-
nreplicas¶ The number of replicas
- Type
int
-
nprocs_per_replica¶ The number of processes which a replica uses
- Type
int
-
kTstart¶ The lower bound of temperature range
- Type
float
-
kTend¶ The upper bound of temperature range
- Type
float
-
nsteps¶ The number of MC steps
- Type
int
-
RXtrial_frequency¶ The number of MC steps between replica exchange operations
-
sample_frequency¶ The number of MC steps between measurements observables
-
print_frequency¶ The number of MC steps between show information
-
reload¶ Whether to restart simulation or not
- Type
bool
-
seed¶ The seed of the random number generator If 0, some random number is used (e.g., system time or some random noise).
- Type
int
-
-
abics.mc_mpi.RX_MPI_init(rxparams)[source]¶ - Parameters
rxparams (RXParams) – Parameters for replica exchange Monte Carlo method.
Returns –
------- –
comm (comm world) – MPI communicator
-
class
abics.mc_mpi.TemperatureRX_MPI(comm, MCalgo, model, configs, kTs, subdirs=True)[source]¶ Bases:
abics.mc_mpi.ParallelMC- Parameters
comm (comm world) – MPI communicator
MCalgo (object for MonteCarlo algorithm) – MonteCarlo algorithm
model (dft_latgas) – DFT lattice gas mapping model
configs (config object) – Configuration
kTs (list) – Temperature list
subdirs (boolean) – If true, working directory for this rank is made
-
__init__(comm, MCalgo, model, configs, kTs, subdirs=True)[source]¶ - Parameters
comm (comm world) – MPI communicator
MCalgo (object for MonteCarlo algorithm) – MonteCarlo algorithm
model (dft_latgas) – DFT lattice gas mapping model
configs (config object) – Configuration
kTs (list) – Temperature list
subdirs (boolean) – If true, working directory for this rank is made
-
find_procrank_from_Trank(Trank)[source]¶ - Parameters
Trank (int) – Temperature rank
- Returns
procrank
- Return type
int
-
run(nsteps, RXtrial_frequency, sample_frequency=9223372036854775807, print_frequency=9223372036854775807, observer=<abics.mc.observer_base object>, subdirs=True, save_obs=True)[source]¶ - Parameters
nsteps (int) – The number of Monte Carlo steps for running.
RXtrial_frequency (int) – The number of Monte Carlo steps for replica exchange.
sample_frequency (int) – The number of Monte Carlo steps for observation of physical quantities.
print_frequency (int) – The number of Monte Carlo steps for saving physical quantities.
observer (observer object) –
subdirs (boolean) – If true, working directory for this rank is made
save_obs (boolean) –
- Returns
obs_list – Observation list
- Return type
list