The invention provides a
molecular dynamics simulation parallel computing method of a TIP4P
water model, and relates to the field of
parallel computing, and the method comprises the steps: initializing an
adjacency list of adjacent atom pairs, and calculating
hydrogen atom coordinates and virtual charge coordinates corresponding to
oxygen atoms; packaging the coordinates of the atoms, the charge quantity and the types of the atoms into a
data structure, and storing the type of data in an array; loading the array into the LDM
shared space; dividing atoms in the
adjacency list into a plurality of atom sets according to the total number of atoms to be calculated in the current process and the number of slave cores; and establishing a three-layer circular traversal
adjacency list, performing circular traversal on the atom set allocated to the slave core on the outer layer, performing circular traversal on atoms in the atom set on the middle layer, performing circular traversal on all neighbor atoms for the atoms on the inner layer, reading atom data in an array from the LDM
shared space by the slave core, and performing calculation on
electrostatic interaction force and Lennard-Jones potential. According to the method, the problem that the overall execution efficiency is reduced due to frequent
data exchange between the LDM and the main memory when a TIP4P force field is simulated in the prior art can be solved,
data dependence and conditional branches in an optimization
algorithm are realized, the
potential energy calculation efficiency is improved, discrete memory access is reduced, and the parallel calculation efficiency is improved.