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

[pre-commit.ci] pre-commit autoupdate #259

Merged
merged 2 commits into from
Mar 6, 2024
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
The table of contents is too big for display.
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 @@ -16,12 +16,12 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.2.0
hooks:
- id: black
args: [--line-length=80, --target-version=py38]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
Expand Down
43 changes: 25 additions & 18 deletions reproducibility_project/aggregate_summary/aggregate_init.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Initialize signac statepoints."""

import itertools
import os

Expand Down Expand Up @@ -183,28 +184,34 @@ def dict_product(dd):
"ensemble": ensemble if ensemble else None,
"N_liquid": n_liq,
"N_vap": n_vap if n_vap else None,
"box_L_liq": np.round(
liq_box_L.to_value("nm"),
decimals=3,
).item()
if liq_box_L
else None,
"box_L_vap": np.round(
vap_box_L.to_value("nm"),
decimals=3,
).item()
if vap_box_L
else None,
"box_L_liq": (
np.round(
liq_box_L.to_value("nm"),
decimals=3,
).item()
if liq_box_L
else None
),
"box_L_vap": (
np.round(
vap_box_L.to_value("nm"),
decimals=3,
).item()
if vap_box_L
else None
),
"init_liq_den": np.round(
init_liq_den.to_value(g_per_cm3),
decimals=3,
).item(),
"init_vap_den": np.round(
init_vap_den.to_value(g_per_cm3),
decimals=3,
).item()
if init_vap_den
else None,
"init_vap_den": (
np.round(
init_vap_den.to_value(g_per_cm3),
decimals=3,
).item()
if init_vap_den
else None
),
# "mass": np.round(
# mass.to_value("amu"),
# decimals=3,
Expand Down
1 change: 1 addition & 0 deletions reproducibility_project/aggregate_summary/analyze_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Create summary data based on the aggregate values."""

import pathlib

import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions reproducibility_project/aggregate_summary/plotting.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Plotting code for main project."""

import textwrap

import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions reproducibility_project/clean_dicts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Remove job doc entries related to the analysis of the simulation data."""

import signac


Expand Down
1 change: 1 addition & 0 deletions reproducibility_project/clean_workspace.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Move and remove obsolete jobs from workspace. Use with care."""

import json
import os
import os.path
Expand Down
1 change: 1 addition & 0 deletions reproducibility_project/clear_folder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Script for deleting certain files in a state point folder."""

# It also parses the gsd format trajectory stored in each output analysis folder (obtained by executing conv_traj.py before this script) to get the RDFs."""
import os
import shutil
Expand Down
1 change: 1 addition & 0 deletions reproducibility_project/delete_empty_folders.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Delete folders in ws which are empty."""

import os
from glob import glob

Expand Down
1 change: 1 addition & 0 deletions reproducibility_project/find_job.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Script for finding the job ids of specific simulations."""

# It also parses the gsd format trajectory stored in each output analysis folder (obtained by executing conv_traj.py before this script) to get the RDFs."""
import os
import shutil
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Analysis routines and helper methods."""

from reproducibility_project.src.analysis.equilibration import *
from reproducibility_project.src.analysis.rdf import gsd_rdf
from reproducibility_project.src.analysis.sampler import sample_job
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Timeseries and pyMBAR related methods."""

import pathlib
from typing import List

Expand Down
1 change: 1 addition & 0 deletions reproducibility_project/hoomd4_subproject/src/dashboard.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Dashboard for viewing data associated with jobs in a signac project."""

from signac_dashboard import Dashboard
from signac_dashboard.modules import (
ImageViewer,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Setup for signac, signac-flow, signac-dashboard for this study."""

import datetime
import os
import pathlib
Expand Down
43 changes: 25 additions & 18 deletions reproducibility_project/init.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Initialize signac statepoints."""

import itertools
import os

Expand Down Expand Up @@ -187,28 +188,34 @@ def dict_product(dd):
"ensemble": ensemble if ensemble else None,
"N_liquid": n_liq,
"N_vap": n_vap if n_vap else None,
"box_L_liq": np.round(
liq_box_L.to_value("nm"),
decimals=3,
).item()
if liq_box_L
else None,
"box_L_vap": np.round(
vap_box_L.to_value("nm"),
decimals=3,
).item()
if vap_box_L
else None,
"box_L_liq": (
np.round(
liq_box_L.to_value("nm"),
decimals=3,
).item()
if liq_box_L
else None
),
"box_L_vap": (
np.round(
vap_box_L.to_value("nm"),
decimals=3,
).item()
if vap_box_L
else None
),
"init_liq_den": np.round(
init_liq_den.to_value(g_per_cm3),
decimals=3,
).item(),
"init_vap_den": np.round(
init_vap_den.to_value(g_per_cm3),
decimals=3,
).item()
if init_vap_den
else None,
"init_vap_den": (
np.round(
init_vap_den.to_value(g_per_cm3),
decimals=3,
).item()
if init_vap_den
else None
),
"mass": np.round(
mass.to_value("amu"),
decimals=3,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Initialize signac statepoints."""

import itertools
import os

Expand Down Expand Up @@ -128,28 +129,34 @@
"ensemble": ensemble if ensemble else None,
"N_liquid": n_liq,
"N_vap": n_vap if n_vap else None,
"box_L_liq": np.round(
liq_box_L.to_value("nm"),
decimals=3,
).item()
if liq_box_L
else None,
"box_L_vap": np.round(
vap_box_L.to_value("nm"),
decimals=3,
).item()
if vap_box_L
else None,
"box_L_liq": (
np.round(
liq_box_L.to_value("nm"),
decimals=3,
).item()
if liq_box_L
else None
),
"box_L_vap": (
np.round(
vap_box_L.to_value("nm"),
decimals=3,
).item()
if vap_box_L
else None
),
"init_liq_den": np.round(
init_liq_den.to_value(g_per_cm3),
decimals=3,
).item(),
"init_vap_den": np.round(
init_vap_den.to_value(g_per_cm3),
decimals=3,
).item()
if init_vap_den
else None,
"init_vap_den": (
np.round(
init_vap_den.to_value(g_per_cm3),
decimals=3,
).item()
if init_vap_den
else None
),
"mass": np.round(
mass.to_value("amu"),
decimals=3,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Create summary data based on the aggregate values."""

import pathlib

import matplotlib.pyplot as plt
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Remove job doc entries related to the analysis of the simulation data."""

import signac


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Takes an mbuild filled_box and creates a restart file for mcccs simulations."""

import errno
import os
import sys
Expand Down Expand Up @@ -94,9 +95,9 @@ def fort77writer(
MoleculesBox[1] = molecule_names

NBeadsBox = {}
NBeadsBox[
1
] = nbeads_list # list that contains number of beads for each molecule type
NBeadsBox[1] = (
nbeads_list # list that contains number of beads for each molecule type
)

NMoleculesBox = {}
NMoleculesBox[1] = num_each_moltype # number of molecules
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Takes an mbuild filled_box and creates a restart file for mcccs simulations."""

import errno
import os
import sys
Expand Down Expand Up @@ -108,9 +109,9 @@ def fort77writer(
MoleculesBox[1] = molecule_names
MoleculesBox[2] = molecule_names
NBeadsBox = {}
NBeadsBox[
1
] = nbeads_list # list that contains number of beads for each molecule type
NBeadsBox[1] = (
nbeads_list # list that contains number of beads for each molecule type
)
NBeadsBox[2] = nbeads_list

NMoleculesBox = {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Setup for signac, signac-flow, signac-dashboard for this study."""

# import foyer
import os
from pathlib import Path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Setup for signac, signac-flow, signac-dashboard for this study."""

import os
import pathlib
import sys
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Setup for signac, signac-flow, signac-dashboard for this study."""

import datetime
import os
import pathlib
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Setup for signac, signac-flow, signac-dashboard for this study."""

import os
import pathlib
import sys
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Script for analysing the results from the 16 different seeds from the 11 systems."""

# It also parses the gsd format trajectory stored in each output analysis folder (obtained by executing conv_traj.py before this script) to get the RDFs."""
import os
import shutil
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Setup for signac, signac-flow, signac-dashboard for running MCCCS-MN simulations for the reproducibility study."""

import fileinput
import math
import os
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Setup for signac, signac-flow, signac-dashboard for this study."""

import pathlib
from copy import copy
from typing import List
Expand Down
Loading
Loading