ubsuny / 23-Homework7G2

MIT License
0 stars 9 forks source link

Task Theme #14

Open tirthbha opened 11 months ago

tirthbha commented 11 months ago

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$
  2. Initialize the cluster geometry to an ideal case.

  3. 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?

  4. Plot the equilibrium configurations using scatter plots and label them with their energies.

Correction to my views and your suggestions will really be appreciated

s4il3sh commented 11 months ago

How do you initialize the ideal case? Have you thought of any particular values?

tirthbha commented 11 months ago

@s4il3sh Following snippet code might help you:

import numpy as np

# Define the side length 'a' of the cube
a = 1.0  # You can modify this value to whatever is appropriate for your simulation

# Define the positions of Na+ ions at the corners of the cube
# There are 8 corners in a cube, but since we need only 4 Na+ ions,
# we will place them at the corners of the bottom square
Na_positions = np.array([[0, 0, 0],
                         [0, a, 0],
                         [a, 0, 0],
                         [a, a, 0]])

# Define the positions of Cl- ions at the centers of the four upper faces of the cube
# This ensures that the Cl- ions are not at the same level (z-coordinate) as the Na+ ions
Cl_positions = np.array([[a/2, a/2, a],    # Center of the top face
                         [a/2, 0, a/2],    # Center of the front face, upper half
                         [0, a/2, a/2],    # Center of the left face, upper half
                         [a, a/2, a/2]])   # Center of the right face, upper half

# Combine the positions into one array
initial_positions = np.vstack((Na_positions, Cl_positions))

# Output the initial positions
initial_positions
tirthbha commented 11 months ago

@s4il3sh But choosing positions depends on which type of structure you are assuming like bcc, fcc or simple.

s4il3sh commented 11 months ago

Thanks for the info.

s4il3sh commented 11 months ago

what are the structures 4 and 5?

AhmedCode99 commented 11 months ago

yeah, that is basically what nacl.ipynb does on compphys