Question: Please answer Task 2 by importing random function via python code. I submitted task 1 below for reference. Task 2 - Alternate Initial Configuration -
Please answer Task by importing random function via python code.
I submitted task below for reference.
Task Alternate Initial Configuration Cubic Lattice
This task is similar to task except that for this function, you should generate points on a simple cubic lattice. Similar to the random configuration generator, the function should accept arguments for the number of atoms and the desired system density.
Task Alternate Initial Configuration Random Points
So far we have only used an initial configuration from a file. For this task, you will write a function which can generate initial system configurations from a number of particles and a desired system density. Make sure your function includes docstrings!
For density, use the number density. For example, in our sample configuration from NIST, the density is This is calculated by dividing the number of atoms by the box volume atoms since was our box length. You will need to calculate a box length depending on the number of atoms and the desired density.
Write a function that makes a configuration by randomly placing points in a dimensional box. The function should return coordinates, boxlength the same way our readxyz function does so we can switch out the two without changing our code.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
