Skip to content

Commit

Permalink
Further changes to allow support for both OpenBabel 2.4.1 and 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristaps Ermanis committed Apr 30, 2020
1 parent 033af70 commit 7bd3bcd
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 9 deletions.
7 changes: 6 additions & 1 deletion Carbon_assignment.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
from scipy.optimize import linear_sum_assignment as optimise
from scipy.stats import linregress
import copy
from openbabel import *

try:
from openbabel.openbabel import OBConversion, OBMol, OBAtomAtomIter, OBMolAtomIter
except ImportError:
from openbabel import *

from scipy.stats import gaussian_kde


Expand Down
Empty file modified Carbon_plotting.py
100644 → 100755
Empty file.
Empty file modified Carbon_processing.py
100644 → 100755
Empty file.
6 changes: 4 additions & 2 deletions FiveConf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
from math import sqrt, pi, cos, sin, acos
import scipy.optimize as sciopt

from openbabel import *

try:
from openbabel.openbabel import OBConversion, OBMol, OBAtomAtomIter, OBMolAtomIter
except ImportError:
from openbabel import *

def main(f, settings):

Expand Down
5 changes: 4 additions & 1 deletion Karplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
from math import sqrt, pi, cos, sin, acos, atan2
import sys

from openbabel import *
try:
from openbabel.openbabel import OBConversion, OBMol, OBAtomAtomIter, OBMolAtomIter
except ImportError:
from openbabel import *

#Parameter sets B-E for generalised Karplus equation from
#C. A. G. Haasnoot, F. A. A. M. de Leeuw and C. Altona
Expand Down
6 changes: 5 additions & 1 deletion Proton_assignment.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
import copy
import os
import pickle
from openbabel import *

try:
from openbabel.openbabel import OBConversion, OBMol, OBAtomAtomIter, OBMolAtomIter
except ImportError:
from openbabel import *

def AssignProton(NMRData,Isomers,settings):

Expand Down
Empty file modified Proton_plotting.py
100644 → 100755
Empty file.
11 changes: 7 additions & 4 deletions Proton_processing.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
import nmrglue as ng
from scipy.stats import norm
import pickle
from openbabel import *

try:
from openbabel.openbabel import OBConversion, OBMol, OBAtomAtomIter, OBMolAtomIter
except ImportError:
from openbabel import *

from scipy.optimize import linear_sum_assignment as optimise
import copy
from scipy.interpolate import InterpolatedUnivariateSpline
Expand Down Expand Up @@ -1624,9 +1629,7 @@ def integral_score(integrals, structure_protons, proton_guess, l_protons, impuri

diff = abs(proton_guess - structure_protons)

#incease the value of the scale parameter here where large devations from integer values are expected for the integrals.

probs = 4 * (1 - norm.cdf(differences, loc=0, scale = 1 / 16))
probs = 4 * (1 - norm.cdf(differences, loc=0, scale=1 / 16))

mean = gmean(probs) * (1 - norm.cdf(diff, loc=0, scale=std)) * (1 / 2 ** impurities)

Expand Down
Empty file modified PyDP4_GUI.py
100644 → 100755
Empty file.

0 comments on commit 7bd3bcd

Please sign in to comment.