forked from tongzhugroup/aimdfragmentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
89 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
language: c | ||
os: | ||
- linux | ||
sudo: false | ||
cache: pip | ||
|
||
env: | ||
global: | ||
- PYTHON_VERSION=3.7 | ||
- PIP_DEPENDENCIES="tox-conda" | ||
- secure: "ryUltJvieQGY43Cd7nmSzKBWEZbywksbPOxJZ7Ig7Y428P8ML9u8zdKd9u2VT6JIdzpcfO0aKLuJfN4x+gL9G6DwJ2zIWDeou7fEcKtTcDc5SmVxhnErTFcgQ+7NTiLS2hufuQVZSpHGQ+GdSaDMa4y0/GRt/yxpKhBMa7dhd5L71hSi0Hs9BH6gJAuNfwaYhMOGy3GVBSvjKKFuH99u5KxaOUJ/R8Dd8evuQh5UgvWT1tpy0boPXCNLOEJbsXZtxqsTwezVoHoFHnuxiIHWABgAVye0DnIwjOCNQyGCey6HGYbKAx+lU7ldwmftEC8Tyody+VCbjz5DScEyxIEOLStzVFD6IFcJ6DgizXAFqZh2CXrBDo2e8IdkWgwZKrfDIh2YQntKc90isPimWamaYxHRh8rLorumWjeSt8D3CjdVoAOinTKLK+W3zK6YFymw1hgfj3h1aGxHBFlcuw4L7CzIc9u4duq5+VUZRQ4qSqPFIddd5N5vE0YBUJKCDm+LIk/YBY9udbM0vJDL4X9sKc02igbY4Mj6nm5TxuYMqHsos0CiDfhUJ8q3JEP6HKXunKIRw/AzF7BayYvVdHeZdSk8g1OhBIy4xi21d9aAs/6UpgTBw8lNVTC+SABtzH0iG574NYI9WmSt5r00qamQSsDnjJjZ5V1eM0LIf3Nk77A=" | ||
|
||
before_install: | ||
- git clone --depth 1 https://github.com/circulosmeos/gdown.pl; | ||
- ./gdown.pl/gdown.pl $GAUSSIANURL 'g16.tgz'>/dev/null 2>&1; | ||
- tar -xzvf g16.tgz; | ||
- export g16root=$(pwd) | ||
- source g16/bsd/g16.profile | ||
|
||
install: | ||
- git clone --depth 1 git://github.com/astropy/ci-helpers.git | ||
- source ci-helpers/travis/setup_conda.sh | ||
|
||
script: | ||
- tox |
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 @@ | ||
"""Test.""" |
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,14 @@ | ||
10 | ||
Only for test. | ||
C 7.512907 12.696144 1.222267 | ||
H 7.293064 13.280151 2.138578 | ||
H 6.574419 12.213078 0.885761 | ||
H 7.898877 13.370358 0.431661 | ||
H 8.280431 11.922762 1.429509 | ||
C 7.574584 15.462496 1.102391 | ||
H 7.385296 15.849984 2.124015 | ||
H 7.986105 16.278961 0.474207 | ||
H 8.302545 14.626973 1.150956 | ||
H 6.625172 15.092911 0.663442 | ||
O 7.183741 9.090479 0.638752 | ||
O 6.104619 9.359606 0.936382 |
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,29 @@ | ||
import os | ||
import unittest | ||
import logging | ||
|
||
import pkg_resources | ||
|
||
from aimdfragmentation import AIMDFragmentation | ||
|
||
|
||
class Test_all(unittest.TestCase): | ||
def test_fragment(self): | ||
folder = "testfiles" | ||
xyzfilename = 'test_fragment.xyz' | ||
if not os.path.exists(folder): | ||
os.makedirs(folder) | ||
with open(os.path.join(folder, xyzfilename), 'wb') as f: | ||
f.write(pkg_resources.resource_string(__name__, xyzfilename)) | ||
af = AIMDFragmentation(cutoff=6.0, xyzfilename=xyzfilename) | ||
af.run() | ||
with open(af.outputenergyfile) as f: | ||
logging.info("Energy:") | ||
print(f.read()) | ||
with open(af.outputenergyfile) as f: | ||
logging.info("Force:") | ||
print(f.read()) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
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,20 @@ | ||
[tox] | ||
envlist = py37 | ||
|
||
[testenv] | ||
passenv = GAUSS_* CI TRAVIS TRAVIS_* CODECOV_* | ||
deps = | ||
pytest-sugar | ||
pytest-cov | ||
coveralls | ||
codecov>=1.4.0 | ||
codacy-coverage | ||
conda_deps= | ||
openbabel | ||
conda_channels= | ||
openbabel | ||
commands = | ||
pytest --pyargs aimdfragmentation --cov {envsitepackagesdir}/aimdfragmentation -s | ||
- coveralls | ||
- codecov | ||
- python-codacy-coverage -r coverage.xml |