Giter VIP home page Giter VIP logo

ubsuny / 23-homework7g4 Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 8.0 2.45 MB

Molecular Simulation - Equilibrium Configurations of Na₄Cl₄ Tetramers: This repository contains code and analysis for a computational physics homework assignment focused on simulating and determining the equilibrium configurations of Na₄Cl₄ clusters for tetramers (n=4).

Home Page: https://github.com/ubsuny/23-Homework7G4

License: MIT License

Jupyter Notebook 99.37% Python 0.63%
initialization-strategies optimization-algorithms role-of-potential-energy-function visualization-techniques

23-homework7g4's Introduction

Homework Task

Determine the equilibrium configurations of Na_4Cl_4 clusters for tetramers (n=4) in this paper:  K. Michaelian, "Evolving few-ion clusters of Na and Cl",Am. J. Phys. 66, 231 (1998),shown in Figure 4.

Plot the equilibrium configurations using the code in CompPhys/MinMax/nacl.ipynb. Label them with their energies. Initialize them to an “ideal” case for the geometry, and allow the optimization to determine the final configurations.

There are 7 configurations, each member of the group chooses 2, then discuss your approach for each individual case. No unit tests necessary this time. Still lint your code.


For this you have to complete the following steps:

  • Discuss in this repository using issues who will do which configuration (specified above)
  • Discuss who should be the main responsible for the repository (the one that can accept merge requests, let me know in discord so I can adjust rights)
  • Discuss and generate milestone for your project to optimize the timeline of your project
  • Discuss and generate labels for your issues
  • Fork this repository
  • Merge the necessary fies from the original homework project into your fork
  • commit
  • create merge requests for your work

Also use discord for discussing solutions to any issues popping up.

Grading

Homework Points
Interaction on own project
Category min per person point factor max points
Commits 6 1 6
Merge requests 3 1 3
Merge Accepted 1 1 1
Branches 2 0.5 1
Issues 10 0.5 5
Closed Issues 5 0.2 1
# Conversations 30 0.2 6
Total 23
Shared project points
# Label 5 0.2 1
# Milestones 2 1 2
# Tags 0 1 0
Total 7 5
Interaction on others project(s)
Category min per person point factor max points
Commits 3 1 3
Branches 1 0.5 0.5
Issues 9 0.5 4.5
# Conversations 15 0.2 3
Total 22 11
Result
Task completion 5 1 5
Sum 42

23-homework7g4's People

Contributors

reshnashrestha avatar wildjimmy avatar yasmensarhan27 avatar laserlab avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

23-homework7g4's Issues

Cubic structure.

Who took cubic structure in your group? I am facing an issue, nan"divide by zero encountered in divide" for potential calculations. I took those 8 indices, and they are all, (a,0,0), (0,0,a), etc. and I considered all indices to be at most "a" apart. Did I take those indices wrong, or am I missing something?
Thank you.

Configurations' name

This paper will let you know some important configurations for our task that will aid to understand the structure type.
Source:
J. P. Rose and R. S. Berry, ‘‘Towards Elucidating the Interplay of Structure and Dynamics in Clusters: Small KCl Clusters as Models,’’ J. Chem. Phys. 96, 517–538 ~1992!.
configurations_name

Box size!

I have chosen a planar rectangle as one of the 7 configurations, how would we expect to assign the values of a and b (a=length and b=width)? Are we allowed to choose randomly? Because there are no specific values for these terms in the paper?

I will appreciated your responses.

LICENSE

I have chosen MIT license for this homework.

HW explanation,.

Hello, dear members of the G#4,
I just want to make sure that I understood correctly about this HW, So all we need to do is to find the positions of the Na and Cl molecules and then make 2 arrays out of them and use the code provided, to find out the potential energy. Once we find the potential energy, we have to run the optimization code and once we run that it will give us the minimum energy. Is that the whole plan?
Thank you.

Structure of Tetramer Configuration

Hi all,
Do we have to know the structure of tetramer configurations and search for the position of Na and Cl ion to be used for optimization. For different structure, what is the difference that we have to do to implement the code. Paper shows that the binding energy per ions for given configurations are different, so how we approach to get that value?

Configuration for number 5

Using a random guess method I got this configuration which looks like number 5

image

With

image

Is this reasonable? I'm not even trying to focus on 5 I just got here on accident so this is more curiosity than anything

Plot Printing Differently in Jupyter Notebook/Colab

For the exact same code (for configuration 3) I get this plot when running in a jupyter notebook
image
Which is not great, but running locally in Spyder I get this
image
Which looks like the rectangular configuration for me. Any idea why this is?

Configuration

Hello,
who is working on the cubic and pentagon configurations??

Energy, not the same,

Hello, I got different energy in my case than the paper, what could be the reason? Could it be the reason that may be our a,b, etc, values are different? What you think? Any help would be appreciated.

Potential formula Confusion

The ion-ion potential in K.Michaelian paper is:
image
and the one found in the Compphys minmax is:
image

and in the paper, the potential formula is referenced to:
image
For this homework, which formula should we follow? @laserlab may be you can provide some lead.

Showing interactive plot: Solved

If you encountered the problem of getting the interactive plot in the Jupyter notebook, you could replace the first line %matplotlib notebook with %matplotlib inline as shown in the figure.
Screenshot 2023-11-30 at 8 02 05 AM

Task Main Idea

I assume that we will do the following steps to carry out this task:
To determine the equilibrium configurations of Na4Cl4 clusters for tetramers and plot their configurations with energies, we can proceed with the following steps:

  1. Define the potential energy function for the Na4Cl4 cluster.
    For our case the potential energy is of the form:
    Screenshot from 2023-11-26 22-12-51
    The potential energy function parameters for the Na4Cl4 cluster are defined as follows:
  • $\ A_{ij} = 423.80 \ eV$
  • $\ \rho = 0.317 \ Å$
  • $\ \frac{e^2}{4 \pi \epsilon_0} = 1.44 \ eV·nm$
  1. Initialize the cluster geometry to an ideal case.
  2. Use an optimization algorithm to minimize the energy and find the equilibrium configuration.
    Note: We will use CG algorithm for the optimization.
    What about you guys?
  3. Plot the equilibrium configurations using scatter plots and label them with their energies.

Correction to my views and your suggestions will really be appreciated

Using a random guess to try for equilibrium configurations

Right now I'm messing around with trying to just randomly get some of the more complex configurations. By random I literally mean using

r_na = np.random.rand(4,3)
r_cl = np.random.rand(4,3)

Which actually gets me somewhere, but I usually end up with either structures 2 or 3 which is not entirely useful. Do you think running this on a loop until I reach (around) a set equilibrium energy would be fruitful? This is the tactic I'm debating to make this at least a little more methodical

Strange ending configuration for #7

When using the initial positions provided by the professor for structure 7, I end up with a plot like this

image

Has anyone else had this issue? This is not the form of in the paper and it needs some additional tuning correct?

Straight line configuration when using random guess

Sometimes when using the random guess method (as described in #54) I get a configuration that looks like this
image
Is this valid? I know we're not looking for it but I'm curious if this actually works or if it's just kind of a fluke. It happens reasonably often

Plot of first configuration, cube

This the first configuration among 7, with optimized potential -28.69 eV. [G1]
cubical_configuration

Your suggestions and corrections will be appreciated

lynting

Why did you lynt the main NaCl file?

Difference between different configurations.

What exactly is the difference between different configuration? It seems that the final potential energy after optimization is different ? Any idea how we start with the initial ideal position ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.