This paper presents a new version Java code for the three-dimensional simulation of Cluster–Cluster Aggregation (CCA) model to replace the previous version. Many redundant traverses of clusters-list in the program were totally avoided, so that the consumed simulation time is significantly reduced. In order to show the aggregation process in a more intuitive way, we have labeled different clusters with varied colors. Besides, a new function is added for outputting the particle’s coordinates of aggregates in file to benefit coupling our model with other models. New version program summary Program Title: CCA v04 Program Files doi: http://dx.doi.org10.17632/zwz37tvjny.1 Licensing provisions: Apache-2.0 Programming language: Java Journal reference of previous version: Computer Physics Communications 207 (2016) 547–548 Does the new version supersede the previous version?: Yes Nature of problem: The previous program for CCA model can be optimized for yielding better operation efficiency and visualization effects. Besides, it can be extended for coupling with other models by adding some new functions. Solution method: Some redundant traverses of the clusters-list for updating an important variable were removed technically. Furthermore, displaying different clusters with distinct colors can benefit to the effectiveness of visualization. We have also introduced a new function for outputting the aggregated clusters, so that this model can be easily coupled with other models. Reasons for the new version: 1. In the previous versions [1–3], the global variable of D m a x , which means the maximum diffusion coefficient of clusters, is supposed to be calculated when aggregation occurs. In fact, this variable is critical to determine whether the currently selected cluster carries out diffusion or not. In the previous version, we had to traverse the clusters-list to update D m a x , even though it may keep unchanged after a round of aggregation. But, we have explored that it is not necessary to traverse all clusters, if we compare the previous variable of D m a x with the diffusion coefficient of the new cluster, which is formed by aggregating two clusters. In the case of the new one is larger, D m a x will be updated to it; otherwise, D m a x keep unchanged. Obviously, removing redundant traverses can enhance algorithm efficiency, and the time complexity of the algorithm is closely related to the loop in it. As a result, the new version of code can greatly cut down the simulation time, in contrast to the previous codes. 2. The old versions paint all particles with same color, which does not help to identify different clusters. In order to show the visualization of the 3D aggregate process in different states intuitively, we introduce labeling different clusters with different colors. Consequently, the particles belong to one cluster are painted with the same color. 3. A new function is added to record intermediate or final state of clusters so that it can be used for further research when using other relevant models. Summary of revisions: 1. Reduce unnecessary traverses of the clusters-list for speeding up simulation. 2. Paint clusters with different colors to pursuit better visualization effects. 3. Add a new function of exporting the coordinates of clusters to a text file for benefiting other models. Additional comments: To test the optimization effects offered by the new version of code, we have carried out a comparison experimentto measure the simulation time with different initial particles, by using the new and the previous version 3.0 of code. In the experiments, we set concentration C to 0.01, diffusion exponent γ to 0, sticking probability exponent σ to 1, the sticking probability P 1 to 0.1, absolute temperature T to 298 K, and the side length L of cube was respectively set to 30, 40, 50, 60, 70 and 80 to yield different initial particles, as the number of particles N can be calculated by the formula N = C ∗ L 3 [1]. To avoid the influences of hardware and software, we use Monte Carlo steps (MCS) as our simulation time [4–6]. As shown in Fig. 1 , the slope coefficient caused by this new version of code is about 1.3813, it is close to line complexity, as for the previous version, it is 1.5703, larger than the new one. It is obvious the new one has a faster running speed than the previous one. More importantly, the reduction of simulation time becomes more obvious when the number of simulated particles is getting larger. The changed visualization of our program is shownin Fig. 2 . We can clearly see how much clusters in simulation system, and how they distribute. And the button “save” marked red in Fig. 2 can help realize our new function by exporting the particle coordinates to a text file, which also store the related initial conditions. Acknowledgments This work was partially supported by “ National Natural Science Foundation of China (Nos. 41271292 , 61303038 )”. References [1] C. Li, H. Xiong, 3D simulation of the Cluster-Cluster aggregation model, Computer Physics Communications 185 (12) (2014) 3424–3429. [2] K. Zhang, H. Xiong, C. Li, A new version of code Java for 3D simulation of the CCA model, Computer Physics Communications 204 (2016) 214–215. [3] K. Zhang, J. Zuo, Y. Dou, C. Li, H. Xiong, Version 3.0 of code Java for 3D simulation of the CCA model, Computer Physics Communications 207 (2016) 547–548. [4] T. Vicsek, Dynamic scaling for aggregation of clusters, Physical Review Letters 52 (19) (1984) 1669–1672. [5] P. A. Netz, D. Samios, The study of network formation as a cluster-cluster diffusion-limited aggregation process: Modelling of the curing of an epoxy-resin using the Monte Carlo method, Macromolecular Theory Simulations 3 (3) (1994) 607–621. [6] H. Xiong, H. Li, W. Chen, L. Wu, Data structure for on-lattice cluster-cluster aggregation model performance optimization, Computer Physics Communications 185 (3) (2014) 836–840.