mc_lj_potential.generate_initial_state¶
-
mc_lj_potential.generate_initial_state(method='random', file_name=None, num_particles=None, box_length=None)¶ Generates initial state of the system.
Generates the initial coordinates of all the atoms in the simulation box. If the method is random, the atoms are assigned a random set of coordinates. If method is file, coordinates are loaded from a file.
- Parameters
method (string. Either 'random' or 'file'.) – Flag which is either set to random or file depending on whether we need random coordinates or load coordinates from a file.
file_name (string. Default is None.) – File name to load coordinates from if method is file.
num_particles (integer. Default is none.) – Number of particles in the simulation box.
box_length (float. Default is None) – Side of cubic simulation box.
- Returns
coordinates – A numpy array with the x, y and z coordinates of each atom in the simulation box.
- Return type
np.array(num_particles,3)