| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# |
| 3 |
# Copyright (c) 2017, the cclib development team |
| 4 |
# |
| 5 |
# This file is part of cclib (http://cclib.github.io) and is distributed under |
| 6 |
# the terms of the BSD 3-Clause License. |
| 7 |
|
| 8 |
"""Test coupled cluster logfiles""" |
| 9 |
|
| 10 |
import os |
| 11 |
import unittest |
| 12 |
|
| 13 |
import numpy |
| 14 |
|
| 15 |
from skip import skipForParser |
| 16 |
|
| 17 |
__filedir__ = os.path.realpath(os.path.dirname(__file__)) |
| 18 |
|
| 19 |
|
| 20 |
class GenericCCTest(unittest.TestCase): |
| 21 |
"""Generic coupled cluster unittest""" |
| 22 |
|
| 23 |
@skipForParser('Turbomole','The parser is still being developed so we skip this test') |
| 24 |
def testsign(self): |
| 25 |
"""Are the coupled cluster corrections negative?""" |
| 26 |
corrections = self.data.ccenergies - self.data.scfenergies |
| 27 |
self.assertTrue(numpy.alltrue(corrections < 0.0)) |
| 28 |
|
| 29 |
|
| 30 |
if __name__ == "__main__": |
| 31 |
|
| 32 |
import sys |
| 33 |
sys.path.insert(1, os.path.join(__filedir__, "..")) |
| 34 |
|
| 35 |
from test_data import DataSuite |
| 36 |
suite = DataSuite(['CC']) |
| 37 |
suite.testall() |