10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-06-02 19:35:38 +02:00

Compare commits

...

6 Commits

7 changed files with 99 additions and 35 deletions

View File

@ -15,9 +15,9 @@ draft: false
var browsers = {};
browsers["Chromium"] = "https://chromium.woolyss.com/download";
browsers["Firefox"] = "https://www.mozilla.org/fr/firefox";
var recomstring = "We recommend to use Firefox or a Chromium based browser like Google Chrome".;
var recomstring = "We recommend to use Firefox or a Chromium based browser like Google Chrome.";
btn_clip.title = 'This feature is not supported in this browser.\n' + recomsting;
var mystr = 'navigator.clipboard.writeText() not supported in this browser\n' + recomsting;
var mystr = 'navigator.clipboard.writeText() not supported in this browser.\n' + recomsting;
for (var key in browsers) {
mystr += "\n" + String.raw`Download ${key} : ${browsers[key]}`;
}

View File

@ -1,22 +1,22 @@
20
Dimethylaniline,^1A_1,CCSD(T),cc-pVTZ
C 0.00000000 0.00000000 4.89686867
C 2.25704297 0.00000000 3.55138467
C -2.25704297 0.00000000 3.55138467
C 2.27412639 0.00000000 0.92841898
C -2.27412639 0.00000000 0.92841898
C 0.00000000 0.00000000 -0.44595239
C 2.36139267 0.00000000 -4.39675011
C -2.36139267 0.00000000 -4.39675011
N 0.00000000 0.00000000 -3.03916783
H 4.05922248 0.00000000 -0.04344476
H -4.05922248 0.00000000 -0.04344476
H 4.03670718 0.00000000 4.54551891
H -4.03670718 0.00000000 4.54551891
H 0.00000000 0.00000000 6.93154996
H 1.97020408 0.00000000 -6.40997108
H -1.97020408 0.00000000 -6.40997108
H 3.49800498 -1.66955347 -3.96565000
H 3.49800498 1.66955347 -3.96565000
H -3.49800498 1.66955347 -3.96565000
H -3.49800498 -1.66955347 -3.96565000
C 0.00000000 0.00000000 2.59131130
C 1.19437570 0.00000000 1.87931183
C -1.19437570 0.00000000 1.87931183
C 1.20341586 0.00000000 0.49129817
C -1.20341586 0.00000000 0.49129817
C 0.00000000 0.00000000 -0.23598784
C 1.24959519 0.00000000 -2.32665996
C -1.24959519 0.00000000 -2.32665996
N 0.00000000 0.00000000 -1.60825836
H 2.14804803 0.00000000 -0.02298998
H -2.14804803 0.00000000 -0.02298998
H 2.13613345 0.00000000 2.40538502
H -2.13613345 0.00000000 2.40538502
H 0.00000000 0.00000000 3.66801827
H 1.04258710 0.00000000 -3.39201062
H -1.04258710 0.00000000 -3.39201062
H 1.85106452 -0.88348965 -2.09853161
H 1.85106452 0.88348965 -2.09853161
H -1.85106452 0.88348965 -2.09853161
H -1.85106452 -0.88348965 -2.09853161

View File

@ -75,7 +75,6 @@ class newCommand(commandBase):
for cmd in cmds:
if not cmd.run(tex):
cmds.remove(cmd)
collection.remove(cmd)
newCommand.runAll(tex,collection)
class columnAlignment(Enum):
Left = "l"

View File

@ -15,6 +15,19 @@ class state:
self.number = number
self.multiplicity = multiplicity
self.symmetry = symmetry
def __eq__(self, __o: object) -> bool:
return type(__o) is state and __o.number == self.number and __o.multiplicity == self.multiplicity and __o.symmetry == self.symmetry
def __str__(self) -> str:
return f'{self.number} ^{self.multiplicity}{self.symmetry}'
def __repr__(self) -> str:
return f'{self.__class__.__name__}: {self.__str__()}'
def __hash__(self) -> int:
return hash((self.number, self.multiplicity, self.symmetry))
@staticmethod
def fromString(string):
m=re.match(r"^(?P<number>\d)\s*\^(?P<multiplicity>\d)(?P<sym>\S*)",string)
@ -52,9 +65,18 @@ class exSet(object):
self.name=name
self.index=index
def __str__(self):
def __eq__(self, __o: object) -> bool:
return type(__o) is exSet and __o.name == self.name and __o.index == self.index
def __str__(self) -> str:
return f"{self.name},{self.index}"
def __repr__(self) -> str:
return f'{self.__class__.__name__}: {self.__str__()}'
def __hash__(self) -> int:
return hash((self.name, self.index))
@staticmethod
def fromString(string):
vals = string.split(",")
@ -143,6 +165,7 @@ class dataFileBase(object):
else:
raise ValueError()
return handler.readFromTable(table)
def getMetadata(self):
dic=OrderedDict()
dic["Molecule"]=self.molecule
@ -248,6 +271,18 @@ class method:
self.name = name
self.basis=args[0] if len(args)>0 else None
def __eq__(self, __o: object) -> bool:
return type(__o) is method and __o.name == self.name and __o.basis == self.basis
def __str__(self) -> str:
return self.name + f'/{self.basis}' if self.basis!=None else ''
def __repr__(self) -> str:
return f'{self.__class__.__name__}: {self.__str__()}'
def __hash__(self) -> int:
return hash((self.name, self.basis))
@staticmethod
def fromString(string):
vals = string.split(",")
@ -271,6 +306,18 @@ class code:
self.name = name
self.version = version
def __eq__(self, __o: object) -> bool:
return type(__o) is method and __o.name == self.name and __o.version == self.version
def __str__(self) -> str:
return self.name + f'/{self.version}' if self.version!=None else ''
def __repr__(self) -> str:
return f'{self.__class__.__name__}: {self.__str__()}'
def __hash__(self) -> int:
return hash((self.name, self.basis))
@staticmethod
def fromString(string):
vals = string.split(",")

View File

@ -2,6 +2,7 @@ from TexSoup import TexSoup,TexCmd
from . import formats
from .data import dataFileBase,DataType, method, state, exSet
from collections import defaultdict
from pagerange import PageRange
class dfbOptions(object):
def __init__(self):
@ -96,7 +97,7 @@ class dfbOptions(object):
for node in dfbexcludeColumnsNodes:
excludeColumns=node.expr
if type(excludeColumns) is TexCmd:
commas_string=excludeColumns.args[0].value
ints=[int(x.strip()) for x in commas_string.split(",")]
dfb_Opt.excludeColumns.update(ints)
range_string=excludeColumns.args[0].value
PageRangeParser=PageRange(range_string)
dfb_Opt.excludeColumns.update(PageRangeParser.pages)
return dfb_Opt

View File

@ -1,8 +1,24 @@
from .lineHandler import lineHandler
from .columnHandler import columnHandler
from .doubleColumnHandler import doubleColumnHandler
from .TBEHandler import TBEHandler
from .doubleTBEHandler import doubleTBEHandler
from .exoticColumnHandler import exoticColumnHandler
from .fromXLSToLaTeXHandler import fromXLSToLaTeXHandler
from .CTHandlers import CT1Handler, CT2Handler
from inspect import isclass
from pkgutil import iter_modules
from pathlib import Path
from importlib import import_module
from ..formatHandlerBase import formatHandlerBase
# iterate through the modules in the current package
package_dir = Path(__file__).resolve().parent
for (_, module_name, _) in iter_modules([package_dir]):
# import the module and iterate through its attributes
module = import_module(f"{__name__}.{module_name}")
# iterate through the modules in the current package
package_dir = Path(__file__).resolve().parent
for (_, module_name, _) in iter_modules([package_dir]):
# import the module and iterate through its attributes
module = import_module(f"{__name__}.{module_name}")
for attribute_name in dir(module):
attribute = getattr(module, attribute_name)
# if it's a format handler import it
if isclass(attribute) and issubclass(attribute, formatHandlerBase) and hasattr(attribute, '__formatName__'):
globals()[attribute_name] = attribute

View File

@ -3,3 +3,4 @@ numpy>=1.18.3,<1.20
GitPython>=3.1.14
PyYAML>=5.3.1
TexSoup==0.2.1
PageRange>=0.4