Skip to content

Commit

Permalink
Merge pull request #48 from BrandeisPatrick/patrick_merge
Browse files Browse the repository at this point in the history
Patrick merge
  • Loading branch information
ffangliu authored May 9, 2024
2 parents a643a1d + eed0bc8 commit 4e2bdb7
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 25 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
##################################################################################################
# @Date: May 9th 2024
# @Author: Patrick
# @Email: [email protected]
# @Description: This workflow will automatically run pytest
##################################################################################################

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "autosolvate_merge" ]
pull_request:
branches: [ "autosolvate_merge" ]

permissions:
contents: read

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
channels: anaconda
channel-priority: true

- name: Create conda environment
run: conda env create -f devtools/conda-envs/environment.yml

- name: Activate conda environment
shell: bash -l {0}
run: conda activate autosolvate

- name: Install additional dependencies if needed
run: conda install --yes flake8 pytest

- name: Test with pytest
run: conda run -n autosolvate pytest
54 changes: 29 additions & 25 deletions autosolvate/tests/test_example_4.py
Original file line number Diff line number Diff line change
@@ -1,36 +1,40 @@
#--------------------------------------------------------------------------------------------------#
######################################################################################################
# test example 4: Naphthalene Radical in Chloroform: box gen: test pdb, prmtop
# author: Patrick Li (2022-10-18)
# path: autosolvate/tests/test_case4.py
#--------------------------------------------------------------------------------------------------#
import os
import pytest
import numpy as np
# @Author : Patrick Li (2022-10-18)
######################################################################################################
# @Date : May 9th 2024
# @Author : Patrick Li
# @Note : Disabled because this test case requires the gaussian to be installed
######################################################################################################

import autosolvate
from . import helper_functions as hp
# import os
# import pytest
# import numpy as np

# import autosolvate
# from . import helper_functions as hp

def test_example_4(tmpdir):
testName = "test_example_4"

# def test_example_4(tmpdir):
# testName = "test_example_4"

autosolvate.startboxgen([
"-m", hp.get_input_dir("naphthalene_radical.xyz"),
"-s", "chloroform",
"-c", "1",
"-u", "2",
"-g", "resp",
"-o", "nap_radical_chcl3",
])
# autosolvate.startboxgen([
# "-m", hp.get_input_dir("naphthalene_radical.xyz"),
# "-s", "chloroform",
# "-c", "1",
# "-u", "2",
# "-g", "resp",
# "-o", "nap_radical_chcl3",
# ])

out = "nap_radical_chcl3"
ref = hp.get_reference_dir("nap_radical_chcl3")
# out = "nap_radical_chcl3"
# ref = hp.get_reference_dir("nap_radical_chcl3")


for suffix in [".pdb", ".prmtop", ".inpcrd"]:
assert os.path.exists(out + suffix)
# for suffix in [".pdb", ".prmtop", ".inpcrd"]:
# assert os.path.exists(out + suffix)

assert hp.compare_pdb(out, ref)
assert hp.compare_inpcrd_prmtop(out, ref)
# assert hp.compare_pdb(out, ref)
# assert hp.compare_inpcrd_prmtop(out, ref)


54 changes: 54 additions & 0 deletions devtools/conda-envs/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
##################################################################################################
# @Date: May 9th 2024
# @Author: Patrick
# @Email: [email protected]
# @Description: environment for merged autosolvate (multicomponent + continous integration)
##################################################################################################
name: autosolvate
channels:
- conda-forge
dependencies:
# Base depends
- python=3.8
- pip
- setuptools
- cython

# Testing
- pytest
- pytest-cov
- codecov

# Openbabel
- openbabel=3.1.1

# molsimplify:
- molsimplify=1.7.3

# Molecule visualization
- nglview

# AmberTools
- ambertools

# MDtraj
- mdtraj

# rdkit
- rdkit

# Documentation
- sphinx
- sphinx_rtd_theme

# Pip-only installs
- pip:
- imolecule
- pillow
- pubchempy
- ase
- mendeleev
- git+https://github.com/MolSSI-BSE/basis_set_exchange.git
- git+https://github.com/Liu-group/pyvdwsurface_moreelements.git
- git+https://github.com/Liu-group/pymsmt_autosolvate.git
# - codecov

0 comments on commit 4e2bdb7

Please sign in to comment.