python code to calculate angle between three point using their 3D coordinates
<p>I have write down a code to calculate angle between three points using their 3D coordinates.       </p>

<pre><code>import  numpy as np

a = np.array([32.49, -39.96,-3.86])

b = np.array([31.39, -39.28, -4.66])

c = np.array([31.14, -38.09,-4.49])

f = a-b # normalization of vectors
e = b-c # normalization of vectors

angle = dot(f, e) # calculates dot product 
print degrees(cos(angle))  # calculated angle in radians to degree 
</code></pre>

<p>output of the code:</p>

<pre><code>degree 33.4118214995
</code></pre>

<p>but when i used one of the software to calculate the same it gives output bit different 120 degree. please help </p>

<p>reference i have used to write the program:</p>

<p>(<a href="https://stackoverflow.com/questions/18945705/how-to-calculate-bond-angle-in-protein-db-file">How to calculate bond angle in protein db file?</a>)</p>