This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import annotations | |
from typing import List, Optional | |
from pydantic import BaseModel, Field | |
# todo: | |
# - double-check open-spin systems | |
# - other suggestions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/formats/formats.cmake b/src/formats/formats.cmake | |
index c94c8def2..70ee7d81c 100644 | |
--- a/src/formats/formats.cmake | |
+++ b/src/formats/formats.cmake | |
@@ -77,6 +77,7 @@ endif(MSVC OR HAVE_REGEX_H) | |
if(WITH_JSON) | |
set(formats_json | |
chemdoodlejsonformat | |
+ chemicaljsonformat | |
pubchemjsonformat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, os, math, random | |
from openbabel import pybel | |
from openbabel import openbabel as ob | |
colors = [ [ 0, 0, 0 ], # Du | |
[0.75, 0.75, 0.75], # H | |
[0.85, 1.00, 1.00], # He |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import plistlib | |
import requests | |
INPUT_FILE = os.path.join(os.environ['HOME'], 'Library/Safari/Bookmarks.plist') | |
OUTPUT_FILE = 'readinglist.txt' | |
# Load and parse the Bookmarks file | |
with open(INPUT_FILE, 'rb') as plist_file: | |
plist = plistlib.load(plist_file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
import logging | |
import numpy as np | |
from cclib.io import ccopen | |
from nms import nmsgenerator | |
from masses import element_masses |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
from cclib.parser import ccopen | |
import logging | |
def spectra(etens, etoscs, low = 0.5, high = 10.0, resolution = 0.01, smear = 0.04): | |
"""Return arrays of the energies and intensities of a Lorentzian-blurred spectrum""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt | |
index 1a53e8cdd..bbf92481c 100644 | |
--- a/test/CMakeLists.txt | |
+++ b/test/CMakeLists.txt | |
@@ -23,7 +23,7 @@ set (cpptests | |
) | |
set (alias_parts 1) | |
set (automorphism_parts 1 2 3 4 5 6 7 8 9 10) | |
-set (builder_parts 1 2 3 4 5) | |
+set (builder_parts 1 2 3 4 5 6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
import os | |
import math | |
import pybel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/avogadro/qtgui/interfacescript.cpp b/avogadro/qtgui/interfacescript.cpp | |
index f0ad088..c0c2141 100644 | |
--- a/avogadro/qtgui/interfacescript.cpp | |
+++ b/avogadro/qtgui/interfacescript.cpp | |
@@ -458,6 +458,14 @@ bool InterfaceScript::insertMolecule(QJsonObject& json, | |
if (m_moleculeExtension == QLatin1String("None")) | |
return true; | |
+ // insert the selected atoms | |
+ QJsonArray selectedList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, os | |
from openbabel import pybel | |
# read through multiple files on command-line | |
for argument in sys.argv[1:]: | |
filename, extension = os.path.splitext(argument) |