Showing 2 of 2 files from the diff.

@@ -16,7 +16,7 @@
Loading
16 16
from quanformer.survey_confs import *
17 17
18 18
import matplotlib as mpl
19 -
#mpl.use("Agg")  # for Mac OS X error of NSInvalidArgumentException on Travis CI
19 +
mpl.use("Agg")  # for Mac OS X error of NSInvalidArgumentException on Travis CI
20 20
21 21
# -----------------------
22 22
@@ -80,7 +80,7 @@
Loading
80 80
81 81
82 82
# test manually without pytest
83 -
if 1:
83 +
if 0:
84 84
    sys.path.insert(0, '/home/limvt/Documents/quanformer/quanformer')
85 85
    sys.path.insert(0, '/home/limvt/Documents/quanformer/quan_mobley/quanformer')
86 86
    from survey_confs import *

@@ -354,21 +354,34 @@
Loading
354 354
355 355
        # estimate density of conformer energies of mol_i for each file/method
356 356
        kdes_mol_i = [kde(normalize(enes_mol_i[j])) for j in range(num_files)]
357 +
        # define x-values for which to get value at kde's
358 +
        x = np.linspace(0, 1, 1000)
357 359
360 +
        # plot normalized densities of conformer energies for diff methods
358 361
        plt.figure()
359 -
360 362
        for j in range(num_files):
361 -
362 -
            # define x-values for which to get value at kde's
363 -
            #x = np.linspace(np.min(enes_mol_i[j]), np.max(enes_mol_i[j]), 1000)
364 -
            x = np.linspace(0, 1, 1000)
365 -
            plt.plot(x, kdes_mol_i[j](x), label=j)
366 -
367 -
        plt.title('kdes')
363 +
            plt.plot(x, kdes_mol_i[j](x), label=f'file {j}')
364 +
        plt.title('kernel density estimates')
368 365
        plt.legend(loc=3)
369 -
370 366
        plt.show()
371 367
368 +
        # compute all-by-all relative entropy calculation
369 +
        # higher value means the two densities are more different
370 +
        kl_matrix = []
371 +
        for a in range(len(kdes_mol_i)):
372 +
          kl_list = []
373 +
          for b in range(len(kdes_mol_i)):
374 +
            kl = stats.entropy(kdes_mol_i[a](x), kdes_mol_i[b](x))
375 +
            kl_list.append(kl)
376 +
          kl_matrix.append(kl_list)
377 +
378 +
        # plot all-by-all relative entropies
379 +
        plt.figure()
380 +
        plt.imshow(kl_matrix, cmap='hot_r', interpolation='nearest', origin='lower')
381 +
        plt.colorbar()
382 +
        plt.savefig(f'kullback_mol{i}.png')
383 +
384 +
372 385
def rmsd_two_files(dict1, dict2, mol_slice=[]):
373 386
    """
374 387
    From files in input dictionaries, read in molecules, extract information
Files Coverage
quanformer 51.48%
Project Totals (24 files) 51.48%
319.1
TRAVIS_OS_NAME=osx
319.2
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
1
# Codecov configuration to make it a bit less noisy
2
coverage:
3
  status:
4
    patch: false
5
    project:
6
      default:
7
        threshold: 50%
8
comment:
9
  layout: "header"
10
  require_changes: false
11
  branches: null
12
  behavior: default
13
  flags: null
14
  paths: null
15
ignore:
16
  - "quanformer/match_plot.py"
17

18
  - "quanformer/quan2modsem.py"
19
  - "quanformer/match_minima.py"
20
  - "quanformer/opt_vs_spe.py"
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading