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

HOOMD-TF CG Example #31

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open

Conversation

RainierBarrett
Copy link
Contributor

Opening this so we can discuss TF debugging stuff. @jennyfothergill the HOOMD-TF branch I'm using is here. Right now our error of the day has to do with tensor dimensions not matching what they should be in an internal cross product operation that happens when trying to get the dihedrals in the CG mapped molecules. The script I'm working on is HTF_CG_Online_Demo.py. You will also need access to the necessary gsd and .npy files which were produced using the code in this repo:

from uli_init.utils.smiles_utils import viz
import uli_init.simulate as simulate
system = simulate.System(molecule='PEEK', para_weight=1.0,
                         density=1.2, n_compounds=[100],
                         polymer_lengths=[4], forcefield='gaff',
                        assert_dihedrals=True, remove_hydrogens=True)
sim = simulate.Simulation(system, gsd_write=100, mode='cpu', dt=0.0001)
sim.quench(kT=1., n_steps=1e6, shrink_steps=2e3)

The gsd with only one PEEK molecule was made the same way but with n_compounds=[1]. This was needed for finding the CG mapping in the kind of hacky way that I did it. The issue right now is cropping up in the compute() call in this model class, which is where the TF code is getting invoked. It calls htf.mol_dihedral() to try to get our molecule-wise batched sets of dihedral participating beads.

Happy to walk through the process and how this is set up!

@chrisjonesBSU
Copy link
Member

chrisjonesBSU commented Mar 9, 2021

Right now our error of the day has to do with tensor dimensions not matching what they should be in an internal cross product operation that happens when trying to get the dihedrals in the CG mapped molecules.

For some context, are the errors you're getting general hoomd-tf errors, or are they only coming up when using a system/simulation that's generated from uli-init specifically?

@jennyfothergill
Copy link
Member

it looks like this PR overlaps with #27, the diffs will be easier to parse once it is merged

@jennyfothergill
Copy link
Member

this error tensor dimensions not matching what they should be in an internal cross product operation sounds to me like a numpy/mkl/scipy/tf incompatibility issue... I bet we can fix it by pinning some particular versions in the environment.yml

@codecov
Copy link

codecov bot commented Mar 18, 2021

Codecov Report

Merging #31 (b717914) into master (6cf51ac) will decrease coverage by 0.91%.
The diff coverage is 50.00%.

❗ Current head b717914 differs from pull request most recent head fafc3b6. Consider uploading reports for the commit fafc3b6 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
- Coverage   93.95%   93.04%   -0.92%     
==========================================
  Files           6        6              
  Lines         480      489       +9     
==========================================
+ Hits          451      455       +4     
- Misses         29       34       +5     
Impacted Files Coverage Δ
uli_init/simulate.py 92.06% <50.00%> (-2.39%) ⬇️

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants