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
Changes from 2 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
25ec2e7
Initial structure.
RainierBarrett Jan 20, 2021
b5c7632
Initial bead count correct
RainierBarrett Jan 20, 2021
c1f040e
Kernel dying when trying to find CG RDFs
RainierBarrett Jan 26, 2021
30f47d1
Position tracking of CG beads working
RainierBarrett Jan 28, 2021
c1ef1fa
First copy of CG demo .py file. Failing
RainierBarrett Feb 8, 2021
515ebf1
Fix cg_num arg
RainierBarrett Feb 8, 2021
9b85ec1
Able to calculate CG bonds/angles/dihedrals
RainierBarrett Feb 17, 2021
2cd1818
Can save out and load mapping indices from .npy files
RainierBarrett Feb 18, 2021
55985eb
Model compiles but doesn't train (dict key error)
RainierBarrett Feb 24, 2021
442f089
Update uli-init to use hoomd-tf
RainierBarrett Mar 4, 2021
f25f9af
Add online demo file. Offline demo broken
RainierBarrett Mar 8, 2021
7d47de8
Fixed model input structure, need to test full run
RainierBarrett Mar 10, 2021
dee13ee
Add script for plotting CG params and writing gsd of CG positions
RainierBarrett Mar 11, 2021
a347e85
Merge branch 'master' of github.com:cmelab/uli-init into htf-cg
jennyfothergill Mar 18, 2021
4c0dbac
Remove old matplotlib import
RainierBarrett Apr 22, 2021
b47d7a4
remove old matplotlib import
RainierBarrett Apr 22, 2021
66b48b1
Merge branch 'master' into htf-cg
RainierBarrett Apr 22, 2021
3623e59
Update with some needed htf packages
RainierBarrett May 4, 2021
b630eea
Merge branch 'htf-cg' of https://github.com/RainierBarrett/uli-init i…
RainierBarrett May 4, 2021
efd7a70
Remove json oops
RainierBarrett May 4, 2021
a4d805c
fix Online example script after upstream HTF update
RainierBarrett May 5, 2021
b303b26
Add saving of CG params/energy/positions/forces
RainierBarrett May 6, 2021
9734a5b
Fix outputs indexing
RainierBarrett May 6, 2021
168c83c
Update plotting from np.genfromtxt to np.load
RainierBarrett May 6, 2021
382a73c
Merge branch 'htf-cg' of https://github.com/RainierBarrett/uli-init i…
RainierBarrett May 6, 2021
3f48550
Add command line args for plotting CG results. Onlilne demo now picks…
RainierBarrett Jun 10, 2021
371a2a5
Update online demo file for tf.gather math
RainierBarrett Jun 30, 2021
36deb16
put several file types generated by online example file in gitignore
RainierBarrett Jun 30, 2021
343be37
Add plotting of simulation potential energy vs time
RainierBarrett Jul 7, 2021
61ff256
Merge branch 'master' into htf-cg
RainierBarrett Jul 13, 2021
8961ce9
Make TF nlist check period a Simulation param
RainierBarrett Jul 13, 2021
5718ec3
Remove outdated environment include
RainierBarrett Jul 13, 2021
75f8114
Update environment mbuild address
RainierBarrett Jul 13, 2021
b717914
Forgot nohoomd env file too
RainierBarrett Jul 13, 2021
ba652d8
Update demo file for upstream changes. rename Initialize class.
RainierBarrett Jul 16, 2021
edc2f7b
HTF running, running out of CUDA memory
RainierBarrett Aug 10, 2021
c41da01
Try smaller nlists to save memory?
RainierBarrett Aug 26, 2021
3eb4fd0
Add TF batch size arg to Simulate class
RainierBarrett Aug 30, 2021
6dd4e32
Add make_fg_traj script
RainierBarrett Nov 29, 2021
fafc3b6
Fix argument error in trajmodel
RainierBarrett Mar 2, 2022
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
14 changes: 7 additions & 7 deletions Notebooks/plot_CG_results.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import numpy as np
import matplotlib.pyplot as plt
import hoomd
import gsd
import gsd.hoomd
import glob

param_fnames = sorted(glob.glob("*params.txt"))
param_fnames = sorted(glob.glob("*params.npy"))
print(param_fnames)

# plot our parameters over time
for fname in param_fnames:
params = np.genfromtxt(fname)
params = np.load(fname)
short_name = fname.split('.')[0] # discard file extension
# first dimension is timesteps
plt.figure()
@@ -46,10 +46,10 @@ def make_frame(i, positions, bonds_matrix):
s.bonds.group = bonds_matrix
return s

angle_params = np.genfromtxt(param_fnames[0])
bond_params = np.genfromtxt(param_fnames[1])
dihedral_params = np.genfromtxt(param_fnames[2])
lj_params = np.genfromtxt(param_fnames[3])
angle_params = np.load(param_fnames[0])
bond_params = np.load(param_fnames[1])
dihedral_params = np.load(param_fnames[2])
lj_params = np.load(param_fnames[3])

positions = np.load('cg_positions.npy')
positions = positions[:,:,:3] # remove types