It's been a while since I've posted. I still need to make that post about X-ray scattering but in the mean time, I'd like to share a picture that I helped make. Katherine Sebeck wanted to render the voids in her epoxy simulation in smooth organic way. I generalized the way Kirke handles grids and my metaball code to handle density grids. The density grid for her epoxy simulation was generated from my smoothed meshing code in Kirke. I talk a bit more about it here. I'll show a movie if Katie says it's okay, but for now here is a large picture (~41 MiB):
Showing posts with label molecular dynamics. Show all posts
Showing posts with label molecular dynamics. Show all posts
Tuesday, March 24, 2015
Friday, October 3, 2014
Rendering for a 3D Movie or Smashing Two Copper Spheres Together at 1 km/s
At one point, I needed to have a general code for finding clusters of atoms. I was going to use a cutoff distance between atoms to determine if there was a bond and thus cluster connectivity. At the time, I didn't realize I was implementing a breadth-first search. Fast forward a few days , I realized that needed I to test it on something. I decided it would be fun to use and exploding/fragmenting structure to get many clusters to test my code on.
For this, I simply smashed two copper spheres into each other at ~ 1 km/s using molecular dynamics. I used a Rydberg potential for copper that I had optimized for mechanical properties. I actually implemented it into LAMMPS and sent the pair potential file and description in their format to the developers so they could add it to pair_style library. That was about three years ago and as of this post, they haven't added it. I guess not enough people use the Rydberg potential for them to take interest.
Anyways, I had these exploding copper spheres via atomic trajectories that had fulfilled their scientific purpose. Just for fun, I decided to render the simulation in POV-Ray and make a movie with FFmpeg. Here is that looked like:
For this, I simply smashed two copper spheres into each other at ~ 1 km/s using molecular dynamics. I used a Rydberg potential for copper that I had optimized for mechanical properties. I actually implemented it into LAMMPS and sent the pair potential file and description in their format to the developers so they could add it to pair_style library. That was about three years ago and as of this post, they haven't added it. I guess not enough people use the Rydberg potential for them to take interest.
Anyways, I had these exploding copper spheres via atomic trajectories that had fulfilled their scientific purpose. Just for fun, I decided to render the simulation in POV-Ray and make a movie with FFmpeg. Here is that looked like:
Pretty cool huh? Well that sat on my hard drive for about a year. Meanwhile, I had been trying to convince my adviser, John Kieffer to purchase a 3D TV to replace our office projector for two reasons. The first reason was that 3D TVs could be used to view atomic structures and the second was that the projector exhaust fan would cook whomever was sitting next to it. He finally found the money for this and put me in charge of purchasing a TV. I chose the Sony KDL-70R550A with the advice of the University of Michigan 3D Lab because passive 3D TVs take two side-by-side images and interlace them for the 3D output. It much easier to configure the 3D system when you don't have to worry about the GPU outputing a switching signal for each eye. The disadvantage is that you get half the lateral resolution in 3D mode. So if you have a side-by-side 3D mode on your screen, check out this video:
The funny thing is I don't care for 3D movie showings in theaters, but as a scientific tool they are pretty handy.
The funny thing is I don't care for 3D movie showings in theaters, but as a scientific tool they are pretty handy.
Saturday, September 20, 2014
Thermal Ellipsoids
At one point, I was supposed to compute electron/hole mobilities in boron subphthalocyanine chloride using charge transfer integrals. The problem is that these don't give good results unless you have realistic thermal distortions to the molecule. Before getting bogged down in charge transfer physics, I decided to use ab initio molecular dynamics on a single unit cell to get realistic thermal distortions. I used VASP, which has the ability to perform ab initio molecular dynamics at constant temperature via a Nose-Hoover thermostat and at constant volume. I would have preferred to use a constant pressure barostat but there is not option for that in VASP yet. Once they do implement a Parrinello-Rahman barostat, I will be very happy.
Back to the molecular dynamics. Once the system had equilibrated at 300 K, I ran the simulation for about 10 ps. Once I had the trajectory data for each atom, I computed the covariance matrix of the x, y, and z position lists. A singular value decomposition (SVD) can be used to get the principle axes of the multivariate normal distribution. The isosurfaces of probability density are surfaces of constant Mahalanobis distance. We can figure out the Mahalanobis distance that corresponds to any total fraction contained in an iso-probability surface by inverting the radial cumulative distribution function. Which looks like this for 3D multivariate normal:
Back to the molecular dynamics. Once the system had equilibrated at 300 K, I ran the simulation for about 10 ps. Once I had the trajectory data for each atom, I computed the covariance matrix of the x, y, and z position lists. A singular value decomposition (SVD) can be used to get the principle axes of the multivariate normal distribution. The isosurfaces of probability density are surfaces of constant Mahalanobis distance. We can figure out the Mahalanobis distance that corresponds to any total fraction contained in an iso-probability surface by inverting the radial cumulative distribution function. Which looks like this for 3D multivariate normal:
For an ellipsoid containing the densest 50% of the probability, we can see that we need a Mahalanobis distance of ~ 1.5. So we need scale our principle axes (from the SVD of the covariance matrix) by 1.5 to get our ellipsoid.
For rendering these ellipsoids in POV-Ray, we can use the matrix transform option on a unit sphere to get our ellipsoid. The principal axis form the column vectors of this transform matrix. Here is what it looks like:
Sorry If changed writing styles much in this post, I've been watching Luther.
Glass Made from Mables
This is an old video, probably my earliest video that I can easily find. I made this video using a collection of scripts and maybe a library that would eventually become Kirke. I had just started learning how to use POV-Ray... so about fall 2010. We didn't have a development server and I didn't have my desktop Mastodon. To get POV-ray, I had ask for it to be installed on Nyx. I didn't even have anything cool to make a video of, I had just joined my research group! So I asked Kathrine Sebeck for some of her data.
This is a soda-lime glass molecular dynamics simulation rendered in POV-Ray with ray tracing. Each atom was had a sphere created for it with some size meant to represent the atom size. I have no idea what size I used for each, probably the atomic radius given on Wikipedia. Anyways, each of the spheres was made to look like a glass marble by changing the index of refraction. After rendering each frame, I combined them all using FFmpeg.
This is a soda-lime glass molecular dynamics simulation rendered in POV-Ray with ray tracing. Each atom was had a sphere created for it with some size meant to represent the atom size. I have no idea what size I used for each, probably the atomic radius given on Wikipedia. Anyways, each of the spheres was made to look like a glass marble by changing the index of refraction. After rendering each frame, I combined them all using FFmpeg.
Subscribe to:
Posts (Atom)


