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

Skeleton of README details #36

Merged
merged 31 commits into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
16ef762
Skeleton of README details
CalCraven Oct 23, 2023
61a1161
fix gauss vs guass types
CalCraven Oct 23, 2023
c8e39e5
fixes to doc strings
CalCraven Oct 23, 2023
0c8f3ab
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 23, 2023
195fcb0
Install instructions and additional links
CalCraven Oct 27, 2023
ca81a2a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 27, 2023
037a2b9
Initial tests and future tests for writing functions
CalCraven Oct 9, 2023
ef5d820
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 9, 2023
d6c8372
remove pdb and mol2 from precommit modifications
CalCraven Oct 9, 2023
bad14ef
Added tests with new gaussian files
CalCraven Oct 9, 2023
e991a33
merge in main
CalCraven Oct 27, 2023
d77d23c
fixes to issue with resetting dihedral_angle to -180 if equivalently 180
CalCraven Oct 23, 2023
4e78832
set output test angles to be -180
CalCraven Oct 23, 2023
747cf0f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 27, 2023
9eeca98
added MoSDeF-GOMC to the citing repos
bc118 Oct 28, 2023
1a079cd
minor comments about wording/references in readme
CalCraven Oct 29, 2023
333d1b6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2023
e9adc33
Merge branch 'main' into fill_out_readme
daico007 Nov 14, 2023
10b137f
fix gauss vs guass types
CalCraven Oct 23, 2023
5d2c118
fixes to doc strings
CalCraven Oct 23, 2023
43eb73e
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 23, 2023
ed5bfed
Initial tests and future tests for writing functions
CalCraven Oct 9, 2023
13e4a01
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 9, 2023
31796f8
remove pdb and mol2 from precommit modifications
CalCraven Oct 9, 2023
cc607fe
Added tests with new gaussian files
CalCraven Oct 9, 2023
ab3a1af
merge in main
CalCraven Oct 27, 2023
b96690c
Add info about dihedral-fit docs and other outputs files
CalCraven Nov 17, 2023
72d5cfe
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 17, 2023
c0dc15c
Update test_file_read_write.py
bc118 Dec 9, 2023
9d97330
Update README.md
bc118 Dec 9, 2023
1a13e84
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 9, 2023
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: trailing-whitespace
exclude: '^docs/|setup.cfg|\.txt$|\.log$|\.xyz$'
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.10.0
hooks:
- id: black
exclude: '^docs/|setup.cfg|\.txt$|\.log$|\.xyz$'
Expand Down
53 changes: 52 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,53 @@
# MoSDeF-dihedral-fit
MoSDeF-dihedral-fit: A simple software package to fit dihedrals via the MoSDeF software
MoSDeF-dihedral-fit: A simple software package to fit dihedrals via the MoSDeF software.

This package is a tool to add dihedral parameters for [Ryckaert-Bellemans](https://manual.gromacs.org/current/reference-manual/functions/bonded-interactions.html#proper-dihedrals-ryckaert-bellemans-function) dihedral based forcefields by fitting QM calculations for the rotation about the dihedral angle to this functional form. The main functionality is found through the following code snippet.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not say RB only. It should say the same as in the docs or similar.

"The MoSDeF-dihedral-fit program is an open-source, transparent, and lightweight Python software package capable
of fitting dihedrals for existing forces fields. This software fits the
Optimized Potentials for Liquid Simulations (OPLS) <https://pubs.acs.org/doi/10.1021/ja9621760>_ style
dihedrals, then also analytically converts them to the periodic/CHARMM <https://www.charmm.org>_ dihedral and
Ryckaert-Bellemans (RB) torsion.."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is fair. Maybe we should show an example somewhere on the README of the file outputs that you might get from a fit.

```python
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove this, as we always forget to change these.

Let's just leave the link to the examples below, removing the example here
https://github.com/GOMC-WSU/GOMC_Examples/tree/main/MoSDeF-dihedral-fit

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean remove the whole code snippet or just the surrounding text? I would suggest at least having some example of the API because that's a huge selling point. No one wants to use something that they can't understand how to get started, so showing them it's a single function call would be nice. Linking to the examples hides that selling point behind a few more clickable links that a casual user may or may not actually get to.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't think this API should change. And if it does, the examples have to change too so changing this one function call that's actually part of the main repo would be easy to do in a single PR as opposed to changing code in the example too.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My point was all this is in the example in the docs and on the wsu file examples. We should just put a link. Otherwise, we have to change it 3 times if it changes (in different locations). I think a link is ok, as it is 1 click.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to add the print file to the WSU examples and the docs, I am ok with that

Copy link
Collaborator

@bc118 bc118 Oct 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant remove the code example here and just put a link to the examples

import unyt as u
from mosdef_dihedral_fit.dihedral_fit.fit_dihedral_with_gomc import fit_dihedral_with_gomc
fit_dihedral_with_gomc(
["HC", "CT", "CT", "HC"], #atomclass names of the dihedral
"molecule.mol2" # mol2 file with relevant structure
"compound.xml", # xml file with other atomtyped parameters in foyer format
298.15 * u.Kelvin, # relevant temperature
gomc_binary_directory, # path to binary command from GOMC install
{"HC_CT_CT_HC_multiplicity_1.log": []}, # log file to store info
zeroed_dihedral_atom_types=None,
qm_engine="gaussian",
VDWGeometricSigma=False,
atom_type_naming_style="general",
gomc_cpu_cores=1,
fit_min_validated_r_squared=0.99,
fit_validation_r_squared_rtol=1e-03,
)
import os
os.system("cat RB_torsion_k_constants_fit_energy.txt")
```

## Installation/Setup
```
conda install -c conda-forge mosdef_dihedral_fit
Copy link
Collaborator

@bc118 bc118 Oct 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package may need to be name with "-" not _ . I thought conda does not like "_" for packages?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well here's the issue then that we should discuss. Whether it's installed from pypi or condo, the import syntax should be the same. Right now when you pip install it has the mosdef_dihedral_fit package name. So we need to change the package name in setup.py and I'm a fan of probably having the directory structure match that as well. Something like MDAnalysis annoys me to no end when installing from source, but the name doesn't match the top level folder name.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If conda allows _ keep that, I like this better

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know mosdef-GOMC is used for conda.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we keep folder _ and mosdef-dihedral-fit for conda and pip, this is what mosdef-GOMC does.

If we can do mosdef_dihedral_ fit for conda and pip, I am fine with that.

git clone https://github.com/GOMC-WSU/GOMC.git
cd GOMC
chmod u+x metamake.sh
./metamake.sh
./GOMC_<CPU|GPU>_XXXX +p4 in.conf # set to 4 threads
Copy link
Collaborator

@bc118 bc118 Oct 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"cd GOMC". ->. "cd GOMC # or GOMC-main or main folder as downloaded..."

I think we remove this. They don't need to run GOMC?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GOMC needs to be installed. Testing your install is certainly best practice. If something is screwed up in the install, it would be good to identify that that was the issue and not some bug in mosdef-dihedral-fit package.

Copy link
Collaborator

@bc118 bc118 Oct 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was not aware GOMC has it’s own tests.

Copy link
Collaborator

@bc118 bc118 Oct 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would write like remove this as they will not run this command as they conf have test files for GOMC

./GOMC_<CPU|GPU>_XXXX +p4 in.conf

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of running GOMC text, you can provide a link to the mosdef comic examples to test the GOMC install, which has video tutorials (https://github.com/GOMC-WSU/GOMC_Examples/tree/main/MoSDef-GOMC/Part_5_NPT_Example), if you think it is important

pytest -v
daico007 marked this conversation as resolved.
Show resolved Hide resolved
```

## Documentation

## Examples
Some basic workflows that use this package</br>
- [ethane dihedral](https://github.com/GOMC-WSU/GOMC_Examples/tree/main/MoSDeF-dihedral-fit/ethane_HC_CT_CT_HC)</br>
- [propanoic acid dihedral](https://github.com/GOMC-WSU/GOMC_Examples/tree/main/MoSDeF-dihedral-fit/protonated_fragment_CT_CT_C_OH)</br>

## Resources
This package is made as an API with [MoSDeF](https://github.com/mosdef-hub) and [MoSDeF-GOMC](https://github.com/GOMC-WSU/MoSDeF-GOMC). In order to get the most of the dihedral-fitter, it is recommended to do your forcefielding via MoSDeF and simulations via GOMC. Included are some information to get users familiar with those pacakges.
daico007 marked this conversation as resolved.
Show resolved Hide resolved
- [MoSDeF tools](https://mosdef.org)
- [MoSDeF-GOMC integration](https://mosdef-gomc.readthedocs.io/en/latest/index.html)
- [GOMC Examples](https://github.com/GOMC-WSU/GOMC_Examples/tree/main/MoSDef-GOMC)
-

## Citations
- Please cite MoSDeF-GOMC [here.](https://mosdef-gomc.readthedocs.io/en/latest/reference/citing_mosdef_gomc_python.html)
Copy link
Collaborator

@bc118 bc118 Oct 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should just add a link to the citations listed in the MoSDeF_dihedral_fit docs, which include all mosdef packages, and vmd.... We can add the docs link once they are published...

This is currently what the docs say (not to add here, just for reference):

* `MoSDeF-GOMC <https://github.com/GOMC-WSU/MoSDeF-GOMC>`_ -- Python software for the creation of scientific workflows for the Monte Carlo simulation engine GOMC

* `mBuild <https://mbuild.mosdef.org/en/stable/>`_ -- A hierarchical, component based molecule builder

* `foyer <https://foyer.mosdef.org/en/stable/>`_ -- A package for atom-typing as well as applying and disseminating forcefields

* `GMSO <https://gmso.mosdef.org/en/stable/>`_ -- Flexible storage of chemical topology for molecular simulation

* `forcefield-utilities <https://github.com/mosdef-hub/forcefield-utilities/>`_

* `Visual Molecular Dynamics (VMD) <https://www.ks.uiuc.edu/Research/vmd/>`_

* `vmd-python <https://github.com/Eigenstate/vmd-python>`_

Loading
Loading