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

Index based connectivity #131

Closed
wants to merge 287 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
287 commits
Select commit Hold shift + click to select a range
a77837c
Enable creation of copolymers in make_example_fort5.py
Aug 18, 2020
6c40bf5
Add fort5_to_hdf5.py (not yet functional)
mortele Aug 4, 2020
b8e55af
Make fort5_to_hdf5.py functional
mortele Aug 5, 2020
6e450a9
Cleanup fort5_to_hdf5.py
mortele Aug 20, 2020
c05d5b6
Make n_molecules and n_solvent default to 0
mortele Aug 20, 2020
392f891
Only load 'bonds' from f_input if 'molecules' is present
mortele Aug 20, 2020
3159ac7
Add missing np alias for numpy import
mortele Aug 20, 2020
5531743
Fix indicies -> indices typo in make_input.py
mortele Aug 20, 2020
5606997
Change slicing indices to explicit lists in make_input.py
mortele Aug 20, 2020
7e134ee
Merge pull request #9 from mortele/dev
sigbjobo Aug 20, 2020
00d7c63
Remove misplaced GEN_START_VEL function in main.py
mortele Aug 21, 2020
186fa96
Add logging.
rainwoodman Sep 6, 2020
53bd2ae
Update exchange syntax and log number of particles exchanged.
rainwoodman Sep 7, 2020
7827f9b
Add CONFIGURE_RUNTIME()
rainwoodman Sep 7, 2020
bb24384
Add --disable-mpio flag.
rainwoodman Sep 7, 2020
49ef4e0
Merge pull request #14 from rainwoodman/fixes
sigbjobo Sep 7, 2020
bb5fd39
Reorganise directory structure
mortele Sep 7, 2020
6e0ba9e
Add github actions CI for unit testing
mortele Sep 7, 2020
86f874d
Add a docker image with all dependencies installed
mortele Sep 7, 2020
069fed2
Add LGPL-3.0 License
mortele Sep 8, 2020
89a9023
Add module for assigning particles to ranks
mortele Sep 8, 2020
5fb306b
Add missing conftest.py file
mortele Sep 8, 2020
8ebf157
Add .gitignore
mortele Sep 8, 2020
23115c4
Add .gitattributes
mortele Sep 8, 2020
6236167
Update .gitattributes for HDF5 files
mortele Sep 8, 2020
29a56a4
Delete test/__init__.py
mortele Sep 8, 2020
e15400d
Revert "Delete test/__init__.py"
mortele Sep 8, 2020
d8930e6
Change argument to distribute_input to a h5py.File
mortele Sep 8, 2020
7651071
Change to using distribute_input in main
mortele Sep 8, 2020
ce0ed3c
Add force module for two/three-particle bonds
mortele Sep 8, 2020
e0136c2
Change to using the force module functions in main
mortele Sep 8, 2020
a26ae8e
Add integrator module for time evolution
mortele Sep 8, 2020
9de52df
Change to using the integrator module functions in main
mortele Sep 8, 2020
fb9dfb3
Update README build badge to upstream remote
mortele Sep 8, 2020
4fd8af8
Update branches in ci.yml
mortele Sep 8, 2020
66d495c
Merge pull request #17 from mortele/bonds-dev
sigbjobo Sep 9, 2020
06b14e4
Add testing for the rRESPA scheme
mortele Sep 17, 2020
0d873fd
Change to using rRESPA integrator in main
mortele Sep 17, 2020
beadeef
Merge pull request #20 from mortele/respa
mortele Sep 17, 2020
4287323
Move clog() out of main and into logger.py
mortele Sep 18, 2020
3d2c86a
Use dataclasses instead of namedtuples in force
mortele Sep 22, 2020
dfec48f
Make testing .HDF5 fixture MPI safe
mortele Sep 22, 2020
a69b9c7
Use pytest-mpi mpi_file_name fixture in conftest.py
mortele Sep 22, 2020
cb119e6
Add input_parser for config.toml
mortele Sep 22, 2020
90a224d
Add parser checks for sane n_particles values
mortele Sep 22, 2020
d621022
Add parser checks for max_molecules_size
mortele Sep 22, 2020
063b886
Add check for bonds in config.toml
mortele Sep 28, 2020
48018f8
Add check for chi in config.toml
mortele Sep 28, 2020
449037a
Add more parser checks for chi
mortele Sep 28, 2020
a8cc9d9
Add check for angle bonds in config.toml
mortele Sep 28, 2020
d4417cc
Add helper script for MPI unit tests
mortele Sep 28, 2020
5333df9
Add prettifying bash magic for MPI unit tests
mortele Sep 28, 2020
e980b3c
Change bonds/angles in config toml test case
mortele Sep 28, 2020
344f4ba
Remove stray print statement in test_integrator
mortele Sep 28, 2020
f10c582
Add pyproject.toml specifying build time dependency
mortele Sep 28, 2020
e13fa6f
Add .coveragerc for testing coverage
mortele Sep 28, 2020
dc99290
Update ci.yml
mortele Sep 28, 2020
b4d38b2
Add parser checks for box size and integrator
mortele Oct 5, 2020
221f6a9
Add hamiltonian.py
mortele Oct 6, 2020
af0ed76
Expand logger.py a bit
mortele Oct 7, 2020
b77485d
Setup logger for easy logging with MPI
mortele Oct 7, 2020
e7d39fb
Change import structure in pytest unit tests
mortele Oct 7, 2020
acf23e0
Update .gitignore
mortele Oct 7, 2020
b8de364
Add convert_CONF_to_config function in input_parser
mortele Oct 8, 2020
754c5fb
Ensure NAMES in CONF.py is a list, not a generator
mortele Oct 14, 2020
4e64469
Add some missing keywords to config.toml
mortele Oct 14, 2020
297c9e8
Clean up CONF dictionary in main.py
mortele Oct 14, 2020
999eaeb
Add testing for Hamiltonian
mortele Oct 14, 2020
d14e2ea
Ensure field values all vanish at initialization
mortele Oct 14, 2020
25d9a6f
Guarantee specific structure in chi by sorting keys
mortele Oct 14, 2020
2c559a4
Add chi matrix energy with testing in DefaultWithChi
mortele Oct 14, 2020
d05882f
Add rank/size by default to all log messages
mortele Oct 15, 2020
54cdd83
Fix rank/size formatting in logger
mortele Oct 16, 2020
179c8c7
Rename package directory and prepare for main install
mortele Oct 19, 2020
6626e8e
Add hamiltonian specification to config example
mortele Oct 19, 2020
dd86a5d
Fix MPI h5py file closure issue
mortele Oct 19, 2020
5916b4e
Remove spurious print statements in hamiltonian
mortele Oct 19, 2020
be8c60d
Add checks for sane and consistent input in config.toml
mortele Oct 19, 2020
75bafdb
Default to logging warnings if no --verbose is given
mortele Oct 19, 2020
fc122eb
Add timing and performance to log output from main
mortele Oct 19, 2020
4fa32f1
Update temporary path to hymd/ from hPF/
mortele Oct 19, 2020
37dd664
Update force.py test cases to use the Config class
mortele Oct 19, 2020
ea928b5
Change test case in test_input_parser_check_chi
mortele Oct 19, 2020
27dbdd6
Loosen test case stringency in no_chi_gaussian_core
mortele Oct 19, 2020
81c6c95
Loosen even further
mortele Oct 19, 2020
82ead1d
Add speedup analysis for numba.jit in bonds
mortele Oct 20, 2020
9c0c9ff
Add fortran implementation to bonds speed test
mortele Oct 20, 2020
2f48c9f
Add single precision fortran speedup benchmark
mortele Oct 20, 2020
6f84bb3
Add benchmarks for angle bonds with plain/numba/fortran
mortele Oct 21, 2020
a07f01d
Rewrite file_io to adhere to the H5MD standard
mortele Oct 26, 2020
667ff6b
Add debug option to disable forces, fix decompose bug
mortele Oct 26, 2020
f977cbf
Add fortran implementation of bonds
mortele Oct 26, 2020
1352671
Add --dump-per-particle command line argument
mortele Oct 27, 2020
50ca712
Add plot_traj for plotting properties of h5md files
mortele Oct 27, 2020
66a8222
Make plot_traj also print some observable statistics
mortele Oct 27, 2020
c5db394
Optimize away all inadvertent calls to pm.create
mortele Oct 27, 2020
ed8358a
Fix bugs in fortran implementation of angle forces
mortele Oct 27, 2020
5ecbb01
Some light cleanup
mortele Oct 27, 2020
635e229
Dump momentum per particle with --dump-per-particle
mortele Oct 28, 2020
fc637c4
Fix bug causing angle force to sometimes become inf
mortele Oct 29, 2020
01ea6ca
Rewrite the CSVR thermostat
mortele Oct 29, 2020
33ffc50
Fix a parser bug when no top level [tags] are given
mortele Oct 29, 2020
4567c35
Update requirements.txt
mortele Oct 29, 2020
b1cb910
Compile fortran extension modules in github actions CI
mortele Oct 29, 2020
a3669d2
Use the correct MPI communicator in _find_unique_names
mortele Oct 31, 2020
0012cce
Fix bug in domain decomposition for molecules
mortele Oct 31, 2020
de6e648
Fix bug in H5MD dataset output shape
mortele Nov 2, 2020
d39cbb8
Redirect output of readout in compute_field_force via out=
mortele Nov 2, 2020
42d0040
Revert compute_field_force change
mortele Nov 3, 2020
2f0877e
Add gaussian core calculation module
mortele Nov 3, 2020
fd0aa19
Add testing for domain decomposition with molecules
mortele Nov 3, 2020
5350707
Add fortran speedup of gaussian core forces
mortele Nov 3, 2020
1155774
Add testing of pmesh accuracy against sigma, grid size
mortele Nov 10, 2020
dd89b60
Add fortran module for double precision bond calculation
mortele Nov 10, 2020
68affa7
Add CSRV effective energy H tilde calculation
mortele Nov 10, 2020
e4ab976
Remove unused debug variables
mortele Nov 10, 2020
3d66cec
Remove unused MPI import
mortele Nov 10, 2020
4833972
Add CSVR effective energy as config attribute
mortele Nov 10, 2020
de02592
Add double precision as a command line argument to main
mortele Nov 10, 2020
0228e50
Dont call the functions with --disable passed to main
mortele Nov 10, 2020
b78a623
Fix bug in initial center of mass momentum removal
mortele Nov 10, 2020
4427ea5
Fix bug in plot_traj and add --abs command line arg
mortele Nov 12, 2020
23d1bb9
Fix bug causing angle bonds to not be computed
mortele Nov 18, 2020
92b095f
Use double precision for bond information in force
mortele Nov 18, 2020
e49ad72
Add ΔH to log output in file_io
mortele Nov 18, 2020
de91b83
Remove dead code in potential energy calculation
mortele Nov 18, 2020
d93dd61
Ensure box_size is a numpy array
mortele Nov 18, 2020
9ec35af
Remove erroneous ps units from n_steps specification
mortele Nov 18, 2020
602a20e
Use double precision for interim quantities
mortele Nov 18, 2020
6d8fd60
Move the forces zeroing to main, ensure starting PBC
mortele Nov 18, 2020
9bc9c31
Fix rRESPA bug, move zeroing force back into cbf, caf
mortele Nov 20, 2020
0cdab94
Option to cancel linear COM momentum prior to start
mortele Nov 20, 2020
648d80f
Add option to dump rank ordered output from mpi tests
mortele Nov 20, 2020
46f0b6c
Update Dockerfile and README.md
mortele Nov 20, 2020
7f881c3
Merge pull request #21 from mortele/dev
mortele Nov 20, 2020
094e420
Debugging in progress
Mar 4, 2021
4c8ffa1
formatting, still not working
Mar 4, 2021
78cb541
README fix
Mar 5, 2021
d71109e
Add conf file
Mar 5, 2021
8609619
change README
Mar 5, 2021
c0be5c5
Update README.md
Mar 5, 2021
ef30808
add example
Mar 5, 2021
19ab87e
Merge branch 'main' of https://github.com/Cascella-Group-UiO/HyMD-202…
Mar 5, 2021
f730b2e
Added water input.hdf5
Mar 5, 2021
bfe8f3c
change water config
Mar 5, 2021
e01bf64
Update .coveragerc and branch spec in CI
mortele Mar 18, 2021
f8d6af1
Add the current branch to CI push for testing
mortele Mar 18, 2021
505ea3d
Update README with CI badge
mortele Mar 18, 2021
4d228d7
Change url in README CI badge
mortele Mar 18, 2021
6958b6f
Remove the test hotfix branch from ci.yml
mortele Mar 18, 2021
71c7d61
Add gro2fort5.py, .gro to OCCAM input converter
mortele Mar 18, 2021
b59a854
Add h5md2input.py, h5md to hymd input converter
mortele Mar 18, 2021
7703401
Enable extracing a specific frame in h5md2input.py
mortele Mar 18, 2021
d716b56
Change dtype of time output to float
mortele Mar 18, 2021
50b996b
Merge pull request #13 from mortele/hotfix_10
mortele Mar 18, 2021
249f50f
Add the thermostat work to h5md ouput
mortele Mar 18, 2021
c5d7fce
Add --double-output option to dump 64bit H5MD output
mortele Mar 18, 2021
f66a1ff
Fix typo in double_out parameter passed to file_io
mortele Mar 18, 2021
1978c9b
Fix typo in double_output parameter passed to file_io
mortele Mar 18, 2021
cc4a586
Fix bug causing thermostat_work to be dumped thrice
mortele Mar 19, 2021
de8cd7d
Check before reading velocities in h5md2input
mortele Mar 19, 2021
4a68ae6
Fix bug in velocities output in h5md2input
mortele Mar 19, 2021
c8ce364
Change dtype from Float to float in fort5_to_hdf5
mortele Mar 20, 2021
f59988d
Fix bug in distribute_input making rank1 too greedy
mortele Mar 20, 2021
814c83a
Fix bug in store_static when bonds are disabled
mortele Mar 18, 2021
4e21510
Add --force-output and --velocity-output options
mortele Mar 18, 2021
eb6e327
Fix typo in velocity_output passed to file_oi
mortele Mar 18, 2021
6c55319
Only write velocities/forces when requested
mortele Mar 18, 2021
7686e0c
Pass velocity_out and force_out flags to store_data
mortele Mar 18, 2021
57aca02
Use pmesh communicator in file_io, not COMM_WORLD
mortele Mar 22, 2021
a9bbbfe
Fix domain decomposition without molecules
mortele Mar 22, 2021
1c99911
Rename domain_decomposition placeholder variable dd
mortele Mar 22, 2021
98d3552
Initialize emtpy bonds_2 if no bonds are present
mortele Mar 22, 2021
4d3659e
Pre test step before mod(step, domain_decomposition)
mortele Mar 22, 2021
42f29c1
Ensure no modulo is taken with False
mortele Mar 22, 2021
df96372
Update .gitingore and pyproject.toml
mortele Mar 23, 2021
29ec752
Pass --velocity_output to every store_data call
mortele Mar 24, 2021
6711754
Update field, layouts before calculating field force
mortele Apr 2, 2021
2e30beb
Merge pull request #14 from mortele/dev_gro2fort5
mortele Apr 2, 2021
3b63543
Merge pull request #24 from mortele/hotfix_23
mortele Apr 2, 2021
fd8e901
Merge pull request #27 from mortele/hotfix_25
mortele Apr 2, 2021
ca33c7e
Merge pull request #28 from mortele/hotfix_4
mortele Apr 2, 2021
aa07c5b
Merge pull request #29 from mortele/hotfix_3
mortele Apr 2, 2021
5edc045
Merge pull request #31 from mortele/dev_h5md2input
mortele Apr 2, 2021
1a635d5
Merge pull request #32 from mortele/hotfix_8
mortele Apr 2, 2021
ad476fc
Merge pull request #33 from mortele/hotfix_15_
mortele Apr 2, 2021
42d4901
Merge pull request #36 from mortele/hotfix_26
mortele Apr 2, 2021
436a759
Merge pull request #40 from mortele/hotfix_39
mortele Apr 2, 2021
b8650b9
Merge branch 'main' into hotfix_7_
mortele Apr 2, 2021
4d05a27
Merge pull request #34 from mortele/hotfix_7_
mortele Apr 2, 2021
58e0f23
Merge pull request #41 from mortele/hotfix_35
mortele Apr 2, 2021
2ba2a09
Remove unused compute_field_energy variable
mortele Apr 2, 2021
bcffd65
Merge pull request #59 from mortele/hotfix_53
mortele Apr 2, 2021
aa6c5ef
Merge branch 'main' into hotfix_37
mortele Apr 2, 2021
ab0737f
Merge pull request #38 from mortele/hotfix_37
mortele Apr 2, 2021
3848d31
Merge pull request #1 from Cascella-Group-UiO/main
mortele Apr 2, 2021
8fb9307
Fix typo introduced in PR #38
mortele Apr 3, 2021
5346c2b
Merge remote-tracking branch 'upstream/main' into main
mortele Apr 3, 2021
74e4095
Correctly format exchange cost in log
mortele Apr 3, 2021
6b62c8a
Fix bug in fmtdt causing empty string when days<1
mortele Apr 3, 2021
ab5bfe1
Add thermostat coupling groups to input parser
mortele Apr 4, 2021
9d79c79
Allow random numbers to be passed to thermostat
mortele Apr 5, 2021
4b2a9a8
Flesh out molecules_with_solvent in conftest
mortele Apr 5, 2021
8b6f5ae
Add simple thermostat test
mortele Apr 5, 2021
51b4cfd
Add thermostat coupling groups
mortele Apr 6, 2021
d274a50
Actually update velocity_rescale call in main
mortele Apr 6, 2021
c20ff7b
Update test_field to work with updated conftest
mortele Apr 6, 2021
80e8bf3
Remove dead code in test_thermostat
mortele Apr 6, 2021
4b57351
Fix reference before assignment bug in thermostat
mortele Apr 6, 2021
9125be0
Fix underscore typo in thermostat
mortele Apr 6, 2021
2455042
Fix typo in R1_ in thermostat
mortele Apr 7, 2021
a6918e4
Fix issue with performance logging
mortele Apr 7, 2021
df46387
Merge pull request #68 from mortele/hotfix_67
mortele Apr 14, 2021
90543d8
Merge pull request #62 from mortele/hotfix_60
mortele Apr 14, 2021
d1cb09e
Merge pull request #63 from mortele/hotfix_61
mortele Apr 14, 2021
e5aaa03
Merge pull request #2 from Cascella-Group-UiO/main
mortele Apr 14, 2021
edd5f1c
Lengthen output arrays if mod(n_steps, n_print)==1
mortele Apr 17, 2021
357afac
Merge pull request #81 from mortele/hotfix_77
mortele Apr 17, 2021
3e43079
Rewrite thermostat, add documentation
mortele Apr 20, 2021
48c6ee1
Clean up molecules_with_solvent, convert to float64
mortele Apr 20, 2021
5594ef3
Complete rewrite of test_thermostat
mortele Apr 20, 2021
4ead144
Remove spurious print statement in input_parser
mortele Apr 20, 2021
4666c34
Remove size=1 specification to numpy random calls
mortele Apr 20, 2021
6d822d3
Clean COM velocities before thermostatting
mortele Apr 21, 2021
5cbdc92
Change the -oo option to only run once, not n times
mortele Apr 21, 2021
f76b554
Add option to not clean the COM in thermostat
mortele Apr 21, 2021
9d1fe8a
Remove extraneous comment
mortele Apr 23, 2021
75dca2b
Update csvr_thermostat docstring
mortele Apr 23, 2021
a294098
Use the SI defined exact value of the gas constant
mortele Apr 23, 2021
13fe9f2
Revert erroneous change of (2/3) into 1.5
mortele Apr 23, 2021
49123d0
Merge pull request #65 from mortele/dev_couplgrps
mortele Apr 29, 2021
f456b6a
Add split_gro_molecules.py
mortele Jun 23, 2021
82c4a0c
Merge pull request #117 from mortele/hotfix_116
mortele Jun 23, 2021
81f105e
Change definition of remove_com_momentum in config
mortele Aug 27, 2021
edf9285
Merge pull request #123 from mortele/hotfix_95_
Aug 27, 2021
d3aff97
Move to tomli (#130)
Nov 16, 2021
842cf4d
Add prepare_index_based_bonds() and rename prepare_bonds_old()
Nov 16, 2021
7bbf85f
Read optional topology toml file
Nov 16, 2021
6514e67
Fix toml loading
Nov 16, 2021
ae4c5be
Fix indexing
Nov 16, 2021
3374218
Default topol to None
Nov 16, 2021
1683d00
Update function name
Nov 16, 2021
6a9dab6
Allow simply specifying total number of molecule for each resname ins…
Dec 9, 2021
28d7443
Remove exit() command
Dec 9, 2021
4b3602f
Fix np.where
Dec 10, 2021
e8c8feb
Add tests for new index_based bond method
Dec 10, 2021
93b4fa8
Fix dppc_single calls
Dec 10, 2021
d758785
Revert previous commits by simply 'fixing' the bond and angle order i…
Dec 13, 2021
ecda2f0
Add example itp like toml for DPPC
Dec 13, 2021
7cf2c5c
Fix example
Dec 13, 2021
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
10 changes: 10 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[run]
omit =
setup.py
conf.py
test/*
benchmarks/*
examples/*
docs/*
utils/*
hymd/__init__.py
42 changes: 42 additions & 0 deletions .docker/hpf/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM ubuntu:20.04

# Fix for tzdata installation from
# https://rtfm.co.ua/en/docker-configure-tzdata-and-timezone-during-build/
ENV TZ=Europe/Oslo
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && apt-get install -y \
libopenmpi-dev=4.0.3-0ubuntu1 \
libhdf5-openmpi-dev=1.10.4+repack-11ubuntu1 \
pkg-config=0.29.1-0ubuntu4 \
curl=7.68.0-1ubuntu2.2 \
python3.8 \
python3-pip

RUN pip3 install --upgrade pip && \
pip3 install --no-cache-dir cython==0.29.21 && \
pip3 install --no-cache-dir numpy==1.19.1 && \
pip3 install --no-cache-dir mpi4py==3.0.3 && \
pip3 install --no-cache-dir cython==0.29.21 && \
pip3 install --no-cache-dir networkx==2.5 && \
pip3 install --no-cache-dir sympy==1.6.2 && \
pip3 install --no-cache-dir pytest==6.0.1 && \
pip3 install --no-cache-dir pytest-mpi==0.4 && \
pip3 install --no-cache-dir mpsort==0.1.17 && \
pip3 install --no-cache-dir pfft-python==0.1.21 && \
pip3 install --no-cache-dir pmesh==0.1.56 && \
pip3 install --no-cache-dir numba==0.51.2

COPY . /app
WORKDIR /app

# Compile h5py with MPI support from source. The h5py install script does not
# like to be told where MPI includes are, so first we just put them where
# configure.py expects them to be.
RUN ln -s /usr/lib/x86_64-linux-gnu/openmpi/include/ /usr/include/openmpi

RUN curl -L -o h5py.tar.gz \
https://github.com/h5py/h5py/archive/6f4c578f78321b857da31eee0ce8d9b1ba291888.tar.gz
RUN tar -xzf h5py.tar.gz && rm h5py.tar.gz && \
mv h5py-6f4c578f78321b857da31eee0ce8d9b1ba291888 h5py
RUN cd h5py && HDF5_MPI="ON" pip3 install -v . && cd ..
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.1 linguist-generated
*.2 linguist-generated
*.3 linguist-generated
*.4 linguist-generated
*.5 linguist-generated
*.6 linguist-generated
*.7 linguist-generated
*.8 linguist-generated
*.9 linguist-generated
*.10 linguist-generated
*.11 linguist-generated
*.h5 linguist-generated
*.hdf5 linguist-generated
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
sudo apt-get install libhdf5-openmpi-dev libfftw3-3 libfftw3-dev
python -m pip install --upgrade pip
pip install wheel
pip install pytest pytest-cov pytest-mpi coverage
pip install --upgrade numpy mpi4py cython
pip install -r requirements.txt
- name: Compile fortran modules
run: |
cd hymd/
make clean
make
cd ..
- name: Test with pytest
run: |
pytest -v --cov=./ --cov-report=
#### NPROCS=6
#### chmod +x pytest-mpi
#### ./pytest-mpi --nprocs ${NPROCS} --order-output --verbose
#### mpirun -n ${NPROCS} utils/mute_all_ranks_except.sh 0 pytest -v --only-mpi --cov=./ --cov-append --cov-report=
- name: Coverage report
run: |
coverage report
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
_build
_static
_templates
hymd.egg-info
*.hypothesis
*.mypy_cache
*.pytest_cache
*.eggs
*.coverage
hymd/__pycache__
test/__pycache__
coverage.xml
*.DS_Store
__pycache__
RUN/
*.so
165 changes: 165 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.


This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

0. Additional Definitions.

As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.

"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.

An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.

A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".

The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or

b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the object code with a copy of the GNU GPL and this license
document.

4. Combined Works.

You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:

a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.

c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.

d) Do one of the following:

0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.

1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.

e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)

5. Combined Libraries.

You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:

a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.

b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.

6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Hamiltonian and Alias-Free Hybrid Particle-Field Molecular Dynamics MPI VERSION
This depository contains a simple python-code implementation of hybrid particle-field molecular dynamics (hPF-MD) that allows one to conserve energy and reduce aliasing by refinement of grid. The code supports monoatom particles of any amount of types and interactions.
HyMD testing and development &middot; [![License: GPL v3](https://img.shields.io/badge/License-LGPLv3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0.html) ![build](https://github.com/Cascella-Group-UiO/HyMD-2021/workflows/build/badge.svg)
---------
Compile FORTRAN modules:
```bash
> cd hymd/
> make clean
> make
> cd ..
```

The code is contained in main.py and input files are created with make_input.py from CONF.py. To convert results to unitless units the units.py module is provided.
Run a simple example simulation with
```bash
> mpirun -n 4 python3 hymd/main.py config.toml dppc.h5 --verbose -logfile log.txt
```

To try out the code, simply:
python make_input.py CONF.py
mpirun python main.py CONF.py input.hdf5

Note that to run the code, the following may need to be installed:
pip3 install pmesh
pip3 install pfft-python
Notes:
- Changed numpy data types (Float32, Int32 -> float32, int32) to run in local computer
- TODO: Fix for running monoatomic (or non molecular) systems
Loading