mc_lj_potential.MCState.get_particle_energy¶
-
MCState.get_particle_energy(i_particle)¶ Computes the energy of a particle with respect to the rest of the system.
- Parameters
coordinates (np.array(num_particles,3)) – A numpy array with the x, y and z coordinates of each atom in the simulation box.
box_length (float) – Side of cubic simulation box.
i_particle (integer) – Particle whose energy is computed.
cutoff2 (float) – Square of cutoff value for Lennard Jones potential.
- Returns
e_total – Total energy of particle_i.
- Return type
float