Re: Reg. elasticity property of obstacles

56 views
Skip to first unread message

Daniel Damelin

unread,
Mar 31, 2015, 9:46:30 PM3/31/15
to Prateek Pandey, cc developers
Hi Prateek,

You should download the lab-interactives-site repo and take a look at how the interactives there were constructed. We have already ported the molecular dynamics engine that drives the simulations, and created a framework for authoring new interactives through that system. Looking at the original Java code will not help you in constructing the new interactives. They just provide a guide to what needs to be developed using the new system. There are descriptions of this in some of the other posts on the cc developers list.

-Dan

On Mar 31, 2015, at 7:22 PM, Prateek Pandey <prateekp...@gmail.com> wrote:

Sir,

Can you provide me source code in java and its corresponding json file of any one of the simulation. Ex. "Collision and kinetic energy" has its interactive in HTML5 so I have its json file and all the files related to it. So, can you provide me its corresponding java interactive source code.

Hope for quick response.

Thanking You,
Prateek Pandey

On Tue, Mar 31, 2015 at 11:36 AM, Prateek Pandey <prateekp...@gmail.com> wrote:
Sir,

I am going through the source code for adding elastic property to obstacles from last couple of days.  I am talking about this:
https://www.pivotaltracker.com/n/projects/442903/stories/90070308

But, Can you provide some documentation for this. Understanding source code without documentation takes time and I want to finish it as soon as possible.

I downloaded code base from https://svn.concord.org/svn/projects/trunk/common/java/simulations/mw/src/ 

I just want to know how to compile this project (is there any make file?) and also what is linked to what( which is required now for this). And, I am planning to convert it to JSON file, as after then it would be easier to add elastic property. I already made some basic model which includes moving of balls, required sliders.

It would be great help if you could reply at the earliest.

Prateek Pandey


Prateek Pandey

unread,
Apr 1, 2015, 1:50:18 AM4/1/15
to cc-dev...@googlegroups.com, prateekp...@gmail.com
Thanks for the clarification

-Prateek

Arkajit Mandal

unread,
Apr 1, 2015, 2:10:43 PM4/1/15
to cc-dev...@googlegroups.com, prateekp...@gmail.com
I was trying make a JSON file. But I couldn't understand some of values that are written in the JSON files e.g. pinned values , probe (east,west,north etc) . Is there any documentations on these parameters?

On Wednesday, April 1, 2015 at 7:16:30 AM UTC+5:30, Daniel Damelin wrote:

Daniel Damelin

unread,
Apr 1, 2015, 4:59:33 PM4/1/15
to cc-dev...@googlegroups.com, prateekp...@gmail.com
Hi Arkajit,

Unless you are making a very simple model file we actually use the Java version of Molecular Workbench to author the initial state of the model. This generates a .mml file, which we then run through a converter found here.

What are you trying to work on?

-Dan

-- 
-- 
----
post message :cc-dev...@googlegroups.com
unsubscribe: cc-developer...@googlegroups.com
more options: http://groups.google.com/group/cc-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups "Concord Consortium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cc-developer...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Arkajit Mandal

unread,
Apr 1, 2015, 6:36:49 PM4/1/15
to cc-dev...@googlegroups.com, prateekp...@gmail.com
Thank you Daniel for your response. To be very honest, I did not know ruby on rails, thus it took me awhile to be familiar with. Initially I tried  to add social buttons but I found (I may be wrong) that the share dialogue is generated from lab.js and not by embeddable.js or embeddable.haml. However, I tried to add those buttons using jQuery by appending child to the share dialogue on jQuery ready. Since it is not a good way to do this and before I copy the lab repo (to edit lab.js) I tried to figure out how interactives are made and was trying make an interactive of the elasticity model. I thought that adding a lennard jones potential may simulate the elastic property of the obstacles. But in order to do it I needed to know what other parameters meant. Thus, thank you for showing the way.
 
I am very sorry that I could not give much time this week due to my class tests and due to fact that I was involved in communicating a research article (on molecular dynamics) in ACS. However, I will always try my best. Once again thank you.

Daniel Damelin

unread,
Apr 1, 2015, 10:47:45 PM4/1/15
to cc-dev...@googlegroups.com
On Apr 1, 2015, at 6:36 PM, Arkajit Mandal <arkaji...@gmail.com> wrote:

Thank you Daniel for your response. To be very honest, I did not know ruby on rails, thus it took me awhile to be familiar with. Initially I tried  to add social buttons but I found (I may be wrong) that the share dialogue is generated from lab.js and not by embeddable.js or embeddable.haml. However, I tried to add those buttons using jQuery by appending child to the share dialogue on jQuery ready. Since it is not a good way to do this and before I copy the lab repo (to edit lab.js) I tried to figure out how interactives are made and was trying make an interactive of the elasticity model. I thought that adding a lennard jones potential may simulate the elastic property of the obstacles. But in order to do it I needed to know what other parameters meant. Thus, thank you for showing the way.

You should take some time to read the posts that describe the relationship between the Lab framework (which provides the modeling engines and view for interactive authors) and the lab-interactives-site (which contains the model definitions and interactive specifications). Rather than make a new interactive from scratch (with a new model), it would be simpler to look at the modeling engine code to see where the obstacle elasticity parameter could be added and how a collision with the obstacle could be included in the incremental calculations done in the simulation loop. We use a Lennard-Jones potential to calculate the forces between atoms, but the interactions with obstacles are much simpler. Right now they behave as an ideal reflector in which no kinetic energy is lost (or converted to potential) upon collision with an obstacle. There is a notion of an obstacle having mass and the ability to move, so sometimes the kinetic energy of the atom is transferred to the obstacle, but this is not done through force potential calculations as is done with “collisions” between atoms. I put that in quotes because we don’t calculate inter-atom collisions, just the LJ forces. With obstacles we do determine collisions and adjust the distribution of energies appropriately (if the obstacle can move). Currently obstacles act as objects with 100% elasticity. The idea was to make this more flexible, so that an atom might lose KE upon collision with an obstacle that is fixed in place. This could simulate having a “cold” wall or heat sink. 

The places to start looking at this in the Lab framework are here:

In particular you should start looking at:

There is no need to create a new interactive yet to test out a new obstacle property. If you made changes in Lab to add this property to obstacles, an existing interactive with a non-moving obstacle could first be used as a test case. 


 
I am very sorry that I could not give much time this week due to my class tests and due to fact that I was involved in communicating a research article (on molecular dynamics) in ACS. However, I will always try my best. Once again thank you.


That is understandable. It is better to focus on finishing up your classwork. Can you send a copy of your molecular dynamics article? Were you the lead author?

-Dan

Arkajit Mandal

unread,
Apr 2, 2015, 3:59:36 AM4/2/15
to cc-dev...@googlegroups.com
Thank you Dan. 
No, I am not the lead author. I had been a Summer Intern at National Chemical Laboratory, India for last two summers. I did work in a MD simulation research group. The article that is submitted is on this topic: "Cage diffusion, a result of decoupling of solute-solvent dynamics, leads to the breakdown of Stokes-Einstein relation" and is submitted (manuscript id : jp-2015-03034p) to JPC B , ACS.  Here is the abstract of the paper:

"In this work we study the diffusion of tagged solute particles in the solvent, using Mode Coupling Theory(MCT) analysis and computer simulations by varying the size of the solute. We choose the system in such a way that in some cases we allow interpenetration between the solute-solvent particles thus d the Lorentz Berthelot (LB) mixing rule and in some cases we follow the LB rule. We show here that when the system doesn’t follow LB rule and the solute-solvent interaction is repulsive, then the small particles show a large deviation from the Stokes-Einstein behaviour. This large increase in the diffusion value is attributed to the levitation of small solute particles through the solvent cages."


We have further changed this abstract, but sharing the paper requires me to take permission of my guide. Please do forgive me that I couldnt share the paper for now. As soon as she (my guide) gives me permission I will certainly do so. I really feel sorry about this. 

Daniel Damelin

unread,
Apr 5, 2015, 10:59:56 PM4/5/15
to cc-dev...@googlegroups.com

On Apr 2, 2015, at 3:59 AM, Arkajit Mandal <arkaji...@gmail.com> wrote:

We have further changed this abstract, but sharing the paper requires me to take permission of my guide. Please do forgive me that I couldnt share the paper for now. As soon as she (my guide) gives me permission I will certainly do so. I really feel sorry about this. 


The abstract is fine. I was just curious about the content of the paper and your research.

-Dan

Prateek Pandey

unread,
Apr 8, 2015, 4:54:17 PM4/8/15
to cc-dev...@googlegroups.com, prateekp...@gmail.com
Hi,

I am attaching picture of gravitational force with elasticity property but I am not able to figure out about import thing i.e. how to create .mml file and .cml file. Rest everything I have done i.e made json file under interactives with its model json file.

Can you please help me in figuring out about these two files (.cml and .mml)

Prateek Pandey
Screenshot from 2015-04-09 02:20:21.png

Prateek Pandey

unread,
Apr 8, 2015, 5:16:54 PM4/8/15
to cc-dev...@googlegroups.com, prateekp...@gmail.com

Daniel Damelin

unread,
Apr 8, 2015, 5:31:46 PM4/8/15
to cc-dev...@googlegroups.com, prateekp...@gmail.com
Hi Prateek,

I see you have made the frame for an interactive that could behave like the one on this page of our Java-based system:

If you save that page locally one of the files you will get is a .mml file.

This file can be converted to the new .json format by using the converter found here:

That will give you a model with one atom/ball, four invisible obstacles that line the walls, and the appropriate initial settings for friction and gravity. 

While you need a test interactive to see if the new obstacle elasticity property works, most of the work in adding this new property will be in the Lab repository: https://github.com/concord-consortium/lab 

In other posts I describe in more detail the relationship between Lab and the lab-interactives-site.

-Dan


-- 
-- 
----
post message :cc-dev...@googlegroups.com

Prateek Pandey

unread,
Apr 8, 2015, 6:54:35 PM4/8/15
to cc-dev...@googlegroups.com, prateekp...@gmail.com
Thanks. I will try to complete it within a day or two.

-Prateek
Reply all
Reply to author
Forward
0 new messages