Skip to content

Instantly share code, notes, and snippets.

View schneiderfelipe's full-sized avatar
🎯
Focusing

Felipe S. S. Schneider schneiderfelipe

🎯
Focusing
View GitHub Profile
@schneiderfelipe
schneiderfelipe / rings2nics.py
Last active July 26, 2016 23:40
Calculates centroids and points above and below a series of rings in a molecule. Useful for NICS calculations.
#!/usr/bin/env python
import sys
from pybel import readfile
import numpy as np
if __name__ == "__main__":
if len(sys.argv) < 2:
sys.exit("Expecting one argument. Abort.")
#!/usr/bin/python
import numpy as np
from scipy.linalg import norm
def read_vector(nome):
p = np.zeros(3)
for i in range(3):
p[i] = float(raw_input("%s_%d = " % (nome, i)))