▁opposite ▁sides ▁of ▁the ▁system . ▁This ▁occurs ▁often ▁in ▁mole cular ▁dynamics ▁simulations , ▁for ▁example , ▁in ▁which ▁clusters ▁form ▁at ▁random ▁locations ▁and ▁sometimes ▁neighbour ing ▁atoms ▁cross ▁the ▁periodic ▁boundary . ▁When ▁a ▁cluster ▁str add les ▁the ▁periodic ▁boundary , ▁a ▁na ive ▁calculation ▁of ▁the ▁center ▁of ▁mass ▁will ▁be ▁incorrect . ▁A ▁generalized ▁method ▁for ▁calculating ▁the ▁center ▁of ▁mass ▁for ▁periodic ▁systems ▁is ▁to ▁treat ▁each ▁coordinate , ▁x ▁and ▁y ▁and / or ▁z , ▁as ▁if ▁it ▁were ▁on ▁a ▁circle ▁instead ▁of ▁a ▁line . ▁The ▁calculation ▁takes ▁every ▁particle ' s ▁x ▁coordinate ▁and ▁maps ▁it ▁to ▁an ▁angle , ▁▁▁▁▁ ▁where ▁x max ▁is ▁the ▁system ▁size ▁in ▁the ▁x ▁direction ▁and ▁. ▁From ▁this ▁angle , ▁two ▁new ▁points ▁ ▁can ▁be ▁generated , ▁which ▁can ▁be ▁weight ed ▁by ▁the ▁mass ▁of ▁the ▁particle ▁ ▁for ▁the ▁center ▁of ▁mass ▁or ▁given ▁a ▁value ▁of ▁ 1 ▁for ▁the ▁geometric ▁center : ▁▁▁▁▁▁▁▁▁ ▁In ▁the ▁ ▁plane , ▁these ▁coordinates ▁lie ▁on ▁a ▁circle ▁of ▁radius ▁ 1 . ▁From ▁the ▁collection ▁of ▁ ▁and ▁ ▁values ▁from ▁all ▁the ▁particles , ▁the ▁aver ages ▁ ▁and ▁ ▁are ▁calculated . ▁ ▁where ▁ ▁is ▁the ▁sum ▁of ▁the ▁masses ▁of ▁all ▁of ▁the ▁particles . ▁ ▁These ▁values ▁are ▁mapped ▁back ▁into ▁a ▁new ▁angle , ▁, ▁from ▁which ▁the ▁x ▁coordinate ▁of ▁the ▁center ▁of ▁mass ▁can ▁be ▁obtained : ▁▁▁▁▁▁▁▁ ▁The ▁process ▁can ▁be ▁repeated