How to Calculate Centroid in python

后端 未结 2 2049
别跟我提以往
别跟我提以往 2020-12-19 08:32

I\'m beginner to python coding. I\'m working over structural coordinates. I have pdb structure which have xyz coordinate information (last three col)

ATOM          


        
2条回答
  •  忘掉有多难
    2020-12-19 09:04

    try this

    import numpy as nx
    X = nx.rand(10,3)   # generate some number
    centroid = nx.mean(X)
    print centroid
    

提交回复
热议问题