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

Revert "New distances" #395

Merged
merged 1 commit into from
Mar 21, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .github/workflows/cmdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,11 @@ jobs:
- name: Build gromacs
run: |
git clone --depth 1 -b release-2023 https://github.com/multi-ego/gromacs.git
bash tools/cmdata/patch_gromacs.sh gromacs/
cd gromacs; mkdir build; cd build
cmake .. -DGMX_FFT_LIBRARY=fftpack -DBUILD_TESTING=OFF -DGMX_INSTALL_LEGACY_API=ON -DGMX_IMD=OFF
cmake .. -DGMX_FFT_LIBRARY=fftpack -DBUILD_TESTING=OFF -DGMXAPI=OFF -DGMX_IMD=OFF
make -j2
sudo make install
- name: Build cmdata
run: |
cd tools/cmdata; mkdir build; cd build
cmake ../
make
sudo make install
cmdata --help
- name: Run cmdata test
run: |
source /usr/local/gromacs/bin/GMXRC
Expand Down
24 changes: 2 additions & 22 deletions src/multiego/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -1402,28 +1402,8 @@ def generate_LJ(meGO_ensemble, train_dataset, check_dataset, parameters):
meGO_LJ.reset_index(inplace=True)

# when distance estimates are poor we use the cutoff value
# meGO_LJ.loc[(meGO_LJ["probability"] <= meGO_LJ["md_threshold"]), "distance"] = meGO_LJ["cutoff"]
# meGO_LJ.loc[(meGO_LJ["rc_probability"] <= meGO_LJ["md_threshold"]), "rc_distance"] = meGO_LJ["cutoff"]
meGO_LJ.loc[
(meGO_LJ["probability"] <= meGO_LJ["md_threshold"]) & (meGO_LJ["same_chain"]) & (meGO_LJ["intra_domain"]), "distance"
] = (meGO_LJ["rep"] / parameters.epsilon) ** (1.0 / 12.0)
meGO_LJ.loc[
(meGO_LJ["rc_probability"] <= meGO_LJ["md_threshold"]) & (meGO_LJ["same_chain"]) & (meGO_LJ["intra_domain"]),
"rc_distance",
] = (meGO_LJ["rep"] / parameters.epsilon) ** (1.0 / 12.0)
meGO_LJ.loc[
(meGO_LJ["probability"] <= meGO_LJ["md_threshold"]) & (meGO_LJ["same_chain"]) & (~meGO_LJ["intra_domain"]), "distance"
] = (meGO_LJ["rep"] / parameters.inter_domain_epsilon) ** (1.0 / 12.0)
meGO_LJ.loc[
(meGO_LJ["rc_probability"] <= meGO_LJ["md_threshold"]) & (meGO_LJ["same_chain"]) & (~meGO_LJ["intra_domain"]),
"rc_distance",
] = (meGO_LJ["rep"] / parameters.inter_domain_epsilon) ** (1.0 / 12.0)
meGO_LJ.loc[(meGO_LJ["probability"] <= meGO_LJ["md_threshold"]) & (~meGO_LJ["same_chain"]), "distance"] = (
meGO_LJ["rep"] / parameters.inter_epsilon
) ** (1.0 / 12.0)
meGO_LJ.loc[(meGO_LJ["rc_probability"] <= meGO_LJ["md_threshold"]) & (~meGO_LJ["same_chain"]), "rc_distance"] = (
meGO_LJ["rep"] / parameters.inter_epsilon
) ** (1.0 / 12.0)
meGO_LJ.loc[(meGO_LJ["probability"] <= meGO_LJ["md_threshold"]), "distance"] = meGO_LJ["cutoff"]
meGO_LJ.loc[(meGO_LJ["rc_probability"] <= meGO_LJ["md_threshold"]), "rc_distance"] = meGO_LJ["cutoff"]

# at this point meGO_LJ is symmetric in ai/aj for interaction between identical molecules
# while it is not symmetric for cross interactions
Expand Down
2 changes: 1 addition & 1 deletion test/run_cmdata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set -e
set -o pipefail
mkdir test_inputs/cmdata/histo
cd test_inputs/cmdata/histo
cmdata -f ../traj.xtc -s ../protein.tpr --mode=intra
echo "0" | gmx cmdata -f ../traj.xtc -s ../protein.tpr -sym ../aa_sym -mode intra
cd ../../../
tar -zxf test_outputs/cmdata/hh.tgz -C test_outputs/cmdata/
for i in `ls -1 test_inputs/cmdata/histo`; do
Expand Down
30 changes: 30 additions & 0 deletions test/test_inputs/cmdata/aa_sym
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
ARG NH1 NH2
ASP OD1 OD2
GLU OE1 OE2
PHE CD1 CD2
PHE CE1 CE2
TYR CD1 CD2
TYR CE1 CE2
SER OC1 OC2 <--- CHANGE WITH THE CORRECT TERMINAL RESIDUE
POPC C13 C14
POPC C13 C15
POPC C14 C15
POPC O13 O14
POPC O21 O31
POPC O22 O32
POPC C218 C316
POPC C217 C315
POPC C216 C314
POPC C215 C313
POPC C214 C312
POPC C213 C311
POPC C212 C310
POPC C211 C39
POPC C28 C38
POPC C27 C37
POPC C26 C36
POPC C25 C35
POPC C24 C34
POPC C23 C33
POPC C22 C32
POPC C21 C31
Binary file modified test/test_outputs/cmdata/hh.tgz
Binary file not shown.
1 change: 0 additions & 1 deletion tools/cmdata/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
build/
exe/
12 changes: 12 additions & 0 deletions tools/cmdata/aa_sym
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ARG NH1 NH2
ASP OD1 OD2
GLU OE1 OE2
PHE CD1 CD2
PHE CE1 CE2
TYR CD1 CD2
TYR CE1 CE2
GLU O1 O2 # <--- CHANGE WITH THE CORRECT TERMINAL RESIDUE
POPC C13 C14
POPC C13 C15
POPC C14 C15
POPC O13 O14
Loading