cmelab / polybinder

Initialization of thermoplastic polymer systems to simulate thermal welding
GNU General Public License v3.0
2 stars 5 forks source link

HOOMD-TF CG Example #31

Open RainierBarrett opened 3 years ago

RainierBarrett commented 3 years ago

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 commented 3 years ago
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 commented 3 years ago

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

jennyfothergill commented 3 years ago

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[bot] commented 3 years ago

Codecov Report

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

:exclamation: 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%) :arrow_down:
review-notebook-app[bot] commented 2 years ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB