Command line: ./md_001.py Total duration: 1510.79s File: ./md_001.py File duration: 1510.04s (99.95%) Line #| Hits| Time| Time per hit| %|Source code ------+----------+-------------+-------------+-------+----------- ... 141| 25551| 0.0946999| 3.70631e-06| 0.01%| for i in range(0, p_num): 142| 0| 0| 0| 0.00%| 143| 0| 0| 0| 0.00%| # Compute the potential energy and forces. 144| 12775500| 47.1989| 3.69449e-06| 3.12%| for j in range(0, p_num): 145| 12750000| 47.4793| 3.72387e-06| 3.14%| if (i != j): 146| 0| 0| 0| 0.00%| 147| 0| 0| 0| 0.00%| # Compute RIJ, the displacement vector. 148| 50898000| 194.963| 3.83046e-06| 12.90%| for k in range(0, d_num): 149| 38173500| 166.983| 4.37432e-06| 11.05%| rij[k] = pos[k,i] - pos[k,j] 150| 0| 0| 0| 0.00%| # end for 151| 0| 0| 0| 0.00%| 152| 0| 0| 0| 0.00%| # Compute D and D2, a distance and a truncated distance. 153| 0| 0| 0| 0.00%| 154| 12724500| 46.7333| 3.6727e-06| 3.09%| d = 0.0 155| 50898000| 195.426| 3.83956e-06| 12.94%| for k in range(0, d_num): 156| 38173500| 165.494| 4.33531e-06| 10.95%| d = d + rij[k] ** 2 157| 0| 0| 0| 0.00%| # end for 158| 12724500| 72.0723| 5.66406e-06| 4.77%| d = np.sqrt(d) 159| 12724500| 59.0492| 4.64059e-06| 3.91%| d2 = min(d, np.pi / 2.0) 160| 0| 0| 0| 0.00%| 161| 0| 0| 0| 0.00%| # Attribute half of the total potential energy to particle J. 162| 12724500| 76.7099| 6.02852e-06| 5.08%| potential = potential + 0.5 * np.sin(d2) * np.sin(d2) 163| 0| 0| 0| 0.00%| 164| 0| 0| 0| 0.00%| # Add particle J's contribution to the force on particle I. 165| 50898000| 207.158| 4.07005e-06| 13.71%| for k in range(0, d_num): 166| 38173500| 228.123| 5.97595e-06| 15.10%| force[k,i] = force[k,i] - rij[k] * np.sin(2.0 * d2) / d 167| 0| 0| 0| 0.00%| # end for 168| 0| 0| 0| 0.00%| # end if 169| 0| 0| 0| 0.00%| 170| 0| 0| 0| 0.00%| # end for 171| 0| 0| 0| 0.00%| # end for 172| 0| 0| 0| 0.00%| ...