Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial tests for writing functions #31

Merged
merged 8 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: '^docs/|setup.cfg|\.txt$|\.log$|\.xyz$'
exclude: '^docs/|setup.cfg|\.txt$|\.log$|\.xyz$|\.pdb$|\.mol2$'
- repo: https://github.com/psf/black
rev: 23.10.0
hooks:
Expand All @@ -27,5 +27,5 @@ repos:
hooks:
- id: isort
name: isort (python)
exclude: '^docs/|setup.cfg|\.txt$|\.log$|\.xyz$'
exclude: '^docs/|setup.cfg|\.txt$|\.log$|\.xyz$|\.pdb$|\.mol2$'
args: [--profile=black, --line-length=80]
7 changes: 7 additions & 0 deletions mosdef_dihedral_fit/tests/base_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import pathlib

import numpy as np
import pytest

Expand All @@ -6,3 +8,8 @@ class BaseTest:
@pytest.fixture(autouse=True)
def initdir(self, tmpdir):
tmpdir.chdir()

def get_fn(self, pathname):
"""Get test file path in test/files"""
current_path = pathlib.Path(__file__).parent.resolve()
return str(current_path / "files" / pathname)
31,966 changes: 31,966 additions & 0 deletions mosdef_dihedral_fit/tests/files/CT_CT_C_OH_multiplicity_1.log

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions mosdef_dihedral_fit/tests/files/dihedral.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Scan of Total Energy
# X-Axis: Scan Coordinate
# Y-Axis: Total Energy (Hartree)
# X Y
-170.0 -79.2284584810
-160.0 -79.2276350548
-150.0 -79.2264707680
-140.0 -79.2252587144
-130.0 -79.2243392257
-120.0 -79.2239963440
-110.0 -79.2243396104
-100.0 -79.2252571229
-90.0 -79.2264671389
-80.0 -79.2276315942
-70.0 -79.2284577839
-60.0 -79.2287550063
-50.0 -79.2284577649
-40.0 -79.2276318383
-30.0 -79.2264681503
-20.0 -79.2252587599
-10.0 -79.2243404876
0.0 -79.2239966896
10.0 -79.2243404856
20.0 -79.2252587696
30.0 -79.2264681707
40.0 -79.2276317493
50.0 -79.2284577902
60.0 -79.2287550076
70.0 -79.2284577870
80.0 -79.2276316437
90.0 -79.2264671464
100.0 -79.2252571148
110.0 -79.2243396623
120.0 -79.2239966359
130.0 -79.2243400256
140.0 -79.2252591195
150.0 -79.2264709151
160.0 -79.2276351404
170.0 -79.2284591083
-180.0 -79.2287549865
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Row Highlight Display Tag Symbol X Y Z
1 No Show 1 C -0.0 0.763665 -6e-06
2 No Show 2 C -0.0 -0.763665 -6e-06
3 No Show 3 H -1.012181 1.156071 -4e-06
4 No Show 4 H 0.505895 1.156447 0.876552
5 No Show 5 H 0.505848 1.156531 -0.876509
6 No Show 6 H 1.012181 -1.156071 -4e-06
7 No Show 7 H -0.505895 -1.156447 0.876552
8 No Show 8 H -0.505848 -1.156531 -0.876509
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash

#SBATCH --job-name 4c_m1_CT_CT_C_OH
#SBATCH -q primary
#SBATCH -N 1
#SBATCH -n 4
#SBATCH --mem=32G
#SBATCH --constraint=intel
#SBATCH --mail-type=ALL
#SBATCH [email protected]
#SBATCH -o output_%j.out
#SBATCH -e errors_%j.err
#SBATCH -t 168:0:0

echo "Running on host" hostname
echo "Time is" date

source ~/.bashrc

module swap gnu7 intel/2019


JOB=CT_CT_C_OH_multiplicity_1
DIR=examples/protonated_fragment__CT_CT_C_OH/src/guassian_runs_multiplicity_1/CT_CT_C_OH_Gaussian_multiplicity_1.txt


g16<< EOF > $DIR/$JOB.log




%chk=$JOB.chk
%nproc=4
%mem=32GB
# opt=modredundant UHF/6-31G* SCF=(MaxCycle=1000) Geom=PrintInputOrient

Dihedral Scan at UHF/6-31G*

0 1
C 0.0000 0.0000 0.0000
C -1.5000 0.0000 0.0000
C -2.2000 1.2124 0.0000
O 0.7000 -1.2124 -0.0000
O 0.7710 1.1685 0.0000
H -1.8198 -0.4847 -0.8141
H -1.8198 -0.4847 0.8141
H -1.5440 1.9671 0.0000
H -2.7722 1.2580 -0.8188
H -2.7722 1.2580 0.8188
H 1.7395 0.9195 0.0000

D 3 2 1 5 S 36 10.0

EOF
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@<TRIPOS>MOLECULE
TMP
11 10 1 0 0
SMALL
NO_CHARGES
****
Energy = 0

@<TRIPOS>ATOM
1 C 0.0000 0.0000 0.0000 C 1 TMP 0.000000
2 C -1.5000 0.0000 0.0000 C 1 TMP 0.000000
3 C -2.2000 1.2124 0.0000 C 1 TMP 0.000000
4 O 0.7000 -1.2124 -0.0000 O 1 TMP 0.000000
5 O 0.7710 1.1685 0.0000 O 1 TMP 0.000000
6 H -1.8198 -0.4847 -0.8141 H 1 TMP 0.000000
7 H -1.8198 -0.4847 0.8141 H 1 TMP 0.000000
8 H -1.5440 1.9671 0.0000 H 1 TMP 0.000000
9 H -2.7722 1.2580 -0.8188 H 1 TMP 0.000000
10 H -2.7722 1.2580 0.8188 H 1 TMP 0.000000
11 H 1.7395 0.9195 0.0000 H 1 TMP 0.000000
@<TRIPOS>BOND
1 1 2 1
2 1 4 2
3 1 5 1
4 2 3 1
5 2 6 1
6 2 7 1
7 3 8 1
8 3 9 1
9 3 10 1
10 5 11 1

@<TRIPOS>SUBSTRUCTURE
1 **** 1 TEMP 0 **** **** 0 ROOT

#generated by VMD
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@<TRIPOS>MOLECULE
TMP
11 10 1 0 0
SMALL
NO_CHARGES
****
Energy = 0

@<TRIPOS>ATOM
1 C 0.0000 0.0000 0.0000 C 1 TMP 0.000000
2 C -1.5000 0.0000 0.0000 C 1 TMP 0.000000
3 O -2.2000 1.2124 0.0000 O 1 TMP 0.000000
4 C 0.7000 -1.2124 -0.0000 C 1 TMP 0.000000
5 O 0.7710 1.1685 0.0000 O 1 TMP 0.000000
6 H -1.8198 -0.4847 -0.8141 H 1 TMP 0.000000
7 H -1.8198 -0.4847 0.8141 H 1 TMP 0.000000
8 H -1.5440 1.9671 0.0000 H 1 TMP 0.000000
9 H -2.7722 1.2580 -0.8188 H 1 TMP 0.000000
10 H -2.7722 1.2580 0.8188 H 1 TMP 0.000000
11 H 1.7395 0.9195 0.0000 H 1 TMP 0.000000
@<TRIPOS>BOND
1 1 2 1
2 1 3 2
3 1 5 1
4 2 4 1
5 2 6 1
6 2 7 1
7 4 8 1
8 4 9 1
9 4 10 1
10 5 11 1

@<TRIPOS>SUBSTRUCTURE
1 **** 1 TEMP 0 **** **** 0 ROOT

#generated by VMD
Loading
Loading