-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move data files from quickff/share to quickff/quickff/data and use pa…
…th routine from importlib.resources
- Loading branch information
Showing
53 changed files
with
147 additions
and
858 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
Steven Vandenbrande <[email protected]>, | ||
Jelle Wieme <[email protected]>, | ||
Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include README | ||
include LICENSE | ||
include quickff/data/* | ||
include quickff/data/systems/*.* | ||
include quickff/data/systems/*/*.* |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
# (CMM), Ghent University, Ghent, Belgium; all rights reserved unless otherwise | ||
# stated. | ||
# | ||
# This file is part of QuickFF. | ||
# | ||
# QuickFF is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 3 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# QuickFF is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, see <http://www.gnu.org/licenses/> | ||
# | ||
#-- |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
@@ -30,6 +30,12 @@ | |
from molmod.units import parse_unit | ||
import os | ||
|
||
try: | ||
from importlib.resources import path | ||
except ImportError: | ||
from importlib_resources import path | ||
|
||
|
||
__all__ = ['Settings'] | ||
|
||
def is_not_none(key, value): | ||
|
@@ -158,10 +164,10 @@ def __init__(self, fn=None, **kwargs): | |
''' | ||
#first read general RC settings from .quickffrc file | ||
from .context import context | ||
self.read_config_file(context.get_fn('quickffrc')) | ||
with path('quickff.data', 'quickffrc') as fn_default: | ||
self.read_config_file(fn_default) | ||
#if a config file is provided, read settings from this file and | ||
#overwrite the general RC settings | ||
#overwrite the default RC settings | ||
if fn is not None: | ||
self.read_config_file(fn) | ||
#if settings are defined through keyword arguments to this init | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
# (CMM), Ghent University, Ghent, Belgium; all rights reserved unless otherwise | ||
# stated. | ||
# | ||
# This file is part of QuickFF. | ||
# | ||
# QuickFF is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 3 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# QuickFF is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, see <http://www.gnu.org/licenses/> | ||
# | ||
#-- |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
@@ -33,7 +33,6 @@ | |
|
||
from quickff.io import read_abinitio | ||
|
||
from quickff.context import context | ||
from quickff.io import read_abinitio | ||
from quickff.reference import SecondOrderTaylor | ||
from quickff.valence import ValenceFF | ||
|
@@ -43,15 +42,26 @@ | |
from quickff.log import log | ||
log.set_level('silent') | ||
|
||
try: | ||
from importlib.resources import path | ||
except ImportError: | ||
from importlib_resources import path | ||
|
||
|
||
__all__ = ['log', 'read_system', 'tmpdir'] | ||
|
||
def read_system(name): | ||
# Load system data. | ||
fn = context.get_fn(os.path.join('systems', name)) | ||
numbers, coords, energy, grad, hess, masses, rvecs, pbc = read_abinitio(fn) | ||
# Load system data | ||
dn = 'quickff.data.systems' | ||
if '/' in name: | ||
words = name.split('/') | ||
dn += '.%s' %('.'.join(words[:-1])) | ||
name = words[-1] | ||
with path(dn, name) as fn: | ||
numbers, coords, energy, grad, hess, masses, rvecs, pbc = read_abinitio(fn) | ||
fns_wpart = glob(os.path.join(os.path.dirname(fn), 'gaussian_mbis.h5')) | ||
# Try to load charges. | ||
charges = None | ||
fns_wpart = glob(os.path.join(os.path.dirname(fn), 'gaussian_mbis.h5')) | ||
if len(fns_wpart) > 0: | ||
with h5.File(fns_wpart[0], 'r') as f: | ||
charges = f['charges'][:] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
@@ -35,10 +35,15 @@ | |
from quickff.tools import set_ffatypes | ||
from quickff.program import DeriveFF | ||
from quickff.settings import Settings | ||
from quickff.context import context | ||
from quickff.reference import SecondOrderTaylor | ||
|
||
from common import log, read_system, tmpdir | ||
from .common import log, read_system, tmpdir | ||
|
||
try: | ||
from importlib.resources import path | ||
except ImportError: | ||
from importlib_resources import path | ||
|
||
|
||
def test_h2(): | ||
#frequency of H2 stretch mode in gaussian.fchk calculation is 4416.656/cm | ||
|
@@ -199,8 +204,8 @@ def test_uio66zrbrick_crossterms(): | |
# Load input data for a ficticious system of an isolated | ||
# UiO-66 brick | ||
name = 'uio66-zr-brick/system.chk' | ||
fn = context.get_fn(os.path.join('systems', name)) | ||
data = load_chk(fn) | ||
with path(quickff.data.systems, name) as fn: | ||
data = load_chk(fn) | ||
system = System(data['numbers'],data['pos'],charges=data['charges'], | ||
ffatypes=data['ffatypes'],bonds=data['bonds'],radii=data['radii']) | ||
system.set_standard_masses() | ||
|
@@ -224,4 +229,3 @@ def test_uio66zrbrick_crossterms(): | |
fc_diag = program.valence.get_params(term.diag_term_indexes[i], only='fc') | ||
print("%50s %15.6f %15.6f %50s" % (term.basename,fc,fc_diag,program.valence.terms[term.diag_term_indexes[i]].basename)) | ||
if fc_diag==0.0: assert fc==0.0 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
@@ -25,7 +25,7 @@ | |
#-- | ||
from molmod.units import angstrom, kjmol | ||
|
||
from common import log, read_system | ||
from .common import log, read_system | ||
|
||
from nose import SkipTest | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
@@ -32,7 +32,7 @@ | |
|
||
from itertools import permutations | ||
|
||
from common import log, read_system | ||
from .common import log, read_system | ||
|
||
import numpy as np | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# QuickFF is a code to quickly derive accurate force fields from ab initio input. | ||
# Copyright (C) 2012 - 2018 Louis Vanduyfhuys <[email protected]> | ||
# Copyright (C) 2012 - 2019 Louis Vanduyfhuys <[email protected]> | ||
# Steven Vandenbrande <[email protected]>, | ||
# Jelle Wieme <[email protected]>, | ||
# Toon Verstraelen <[email protected]>, Center for Molecular Modeling | ||
|
Oops, something went wrong.