osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getting the center of mass of each part of a molecule


@jladasky and @Gregory:

Thanks your replies. 
The code should do the steps below:

1) Calculate the center of mass (COM) of the whole ligand molecule with the atomic coordinates (x,y,z)
2) Find the ligand heavy atom closest to the COM of the whole ligand molecule
3) Divide the ligand molecule into two parts (except for ligand heavy atom closest to the COM of the whole ligand) based on the COM previously calculated.
4) Calculate the COM of each part divided.

I do the first two steps and get correct result. The difficult task/step I couldn't overcome is to divide the ligand molecule into two parts (except for ligand heavy atom closest to the COM of the whole ligand) based on the COM previously calculated and to find which atoms belong to each half.

Any help will be appreciated.