Using a 'Particle-In-Cell' approach taken from plasma physics we have developed a new three-dimensional (3D) parallel computer code that today yields the highest possible accuracy of ion trajectory calculations in electromagnetic fields. This approach incorporates coulombic ion-ion and ion-image charge interactions into the calculation. The accuracy is achieved through the implementation of an improved algorithm (the so-called Boris algorithm) that mathematically eliminates cyclotron motion in a magnetic field from digital equations for ion motion dynamics. It facilitates the calculation of the cyclotron motion without numerical errors. At every time-step in the simulation the electric potential inside the cell is calculated by direct solution of Poisson's equation. Calculations are performed on a computational grid with up to 128 x 128 x 128 nodes using a fast Fourier transform algorithm. The ion populations in these simulations ranged from 1000 up to 1000 000 ions. A maximum of 3 000 000 time-steps were employed in the ion trajectory calculations. This corresponds to an experimental detection time-scale of seconds. In addition to the ion trajectories integral time-domain signals and mass spectra were calculated. The phenomena observed include phase locking of particular m/z ions (high-resolution regime) inside larger ion clouds. A focus was placed on behavior of a cloud of ions of a single m/z value to understand the nature of Fourier transform ion cyclotron resonance (FTICR) resolution and mass accuracy in selected ion mode detection. The behavior of two and three ion clouds of different but close m/z was investigated as well. Peak coalescence effects were observed in both cases. Very complicated ion cloud dynamics in the case of three ion clouds was demonstrated. It was found that magnetic field does not influence phase locking for a cloud of ions of a single m/z. The ion cloud evolution time-scale is inversely proportional to magnetic field. The number of ions needed for peak coalescence depends quadratically on the magnetic field.