Materials Informatics

Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due

Assignment 2

Below are the questions for Assignment 2 of the course Materials Informatics.
  • Please complete these tasks independently and adhere to the NUS rules regarding academic honesty.
  • The questions are designed with varying difficulty levels, so you might not be able to solve all of them. However, please try to solve as many as you can.
  • Even if you can't get the correct results, you can still earn credits by showing your efforts.
  • Remove your API-KEY before submitting the assignment.
  • Write your name, email, and student ID in the cell below:
  • Name:
  • Email:
  • Student ID:

Problem 1 High-Throughput Workflow for Screening Materials Stability(50%)

Problem Description Materials discovery often involves screening large databases of materials for desired properties.High-throughput computation automates this process using workflows. in this problem, you will query the Materials Project database for ternary compounds within a specific chemical space. You will then filter these compounds based on their calculated stability (energy above hull). Finally, you will define an Atomate2 workflow to perform structural relaxation using the ASE/MACE calculator for the most promising candidates and analyze the results.

1.1(10%) Database Query and Filtering

Search for all materials from Materials Project containing: Li, P, S or any binary, ternary compounds with the combination of these elements. Query for properties with material_id, formula_pretty, structure, and energy_above_hull. Only query materials with an energy above hull (energy_above_hull) less than 0.01 eV/atom, indicating potential synthesizability.

Solution 1.1 Write your code in the next cell. Please execute the cell after you finish writing the code and save your results. Please add more cells if needed.

1.2(10%) Atomate2 Workflow

  • For each material, get its pymatgen.core.Structure object (available from the MP query results).
  • Define an Atomate2 Job that performs a structure relaxation using ASE with the MACE calculator.
    • Set appropriate relaxation parameters (fmax=0.01eV/A).
    • Make sure you also relax the cell shape and volume.
  • Create a jobflow. Flow object and pass the job as a list to the Flow object. Then run the flow using run_local( ).See here for more information: https://materialsproject.github.io/jobflow/tutorials/5-dynamic-flows.html

Solution 1.2

Write your code in the next cell. Please execute the cell after you finish writing the code and save your results. Please add more cells if needed.


1.3(10%) Workflow Execution (Local)

  • Configure Atomate2 to run locally (e.g. using run_locally). You might need to ensure the MACE calculator and its model file are
  • Execute the Flow locally for the selected small subset of materials. Monitor the execution. This will create output directoriesffles accessible in the execution anvironmont
  • Note: This calculation can be very slow (30-60 min). it's better if you can test it on a smaller subset of materials before running all based on your Atomate2 setup. You should show all the logs and outputs in the notebook. of them. if you have a NVIDIA GPU,you can use cuda instead of cpu in calculator for much faster calculations.


Solution 1.3 Write your code in the next cell. Please execute the cell after you finish writing the code and save your results.Please add more cells if needed.

1.4 (20%) Results Analysis

  • Once the jobs in the flow are completed successfully, inspect the results. Atomate2 jobs store their outputs. Find the final relaxed structure and the final energy for each successfully completed relaxation job.
  • Compare the MACE-relaxed energies per atom with the original DFT energies per atom from Materials Project by a plot. 
  • Compare the MACE-relaxed volume per atom with the original DFT volume per atom from Materials Project by a plot.
  • Plot the ternary phase diagram for the L-P-S system. You can use the pymatjen.analysis.phase_diagram module to plot the phase diagram. Check their documentation for more details.
  • Show the most stable Li3PS4 structure from your HT calculatior: mp-id, total energy, and energy above hull. Compare them to the data in Materials Project.
Solution 1.4 Write your code in the next cell. Please execute the cell after you firish writing the code and save your results. Please add more cells if needed.

Problem 2: Force Field (50%)

Problem Description: In this problem, we will useEMT patential to run simulations af Cu.

2.1(5%) Equation of State

  • Construct the Cu structure as ASE.Atons object. Pleaso construct it in a corventional cell setting (cubic) instead of the primitive cell.
  • Print the final structure and energy.
  • Compute the bulk modulus using this structure. Bulk modulus can be fitted from the equation of the state (Birch-Mumaghan EOS,10 volumes from ±5% of the cell).
  • Plot the equation of state and show the fitted bulk modulus.
  • Get the equilibrium volume from the EOS fit and apply it to the structure.
Solution 2.1 Write your code in the next cell. Please execute the cell after you finish writing the code and save your results. Please add more cells if needed.

2.2(10%) MD Simulation of Cu


  • Use the Cu structure from the previous step (with equilibrium volume) and make a supercell of at least 100 atoms.Print the total number of atoms in the supercall.
  • Perform MD simulations at 400,600,800,....2000K.Each run should be indipendent with each other (not continuous).
  • Use EMT potential as implemented in ASE's MD modules or use ASAP3.it is highly recommended to use ASAP3 because it's much faster. You can run this on the Google Colab if you have issue with the ASAP3. 
  • Use the ase.md.npt.NPT ensemble with following setting: scaling time of 100 fs (temperature) and 200 fs (pressure); external  pressure of 1 atr; take the bulk modulus (in GPa) from the previous step and compute the pfactor = bulk_madulus * ptime * ptimc * units.GPa * units.fs * units.fs.
  • Choose time step as 2 fs and store your trajectory every 20 fs.
  • Run equilibration for 10 ps and production run for 50 ps.
  • Print following information during the MD every 20 fs.
    • Curent step number
    • Temperature
    • Kinetic anergy
    • Potential energy
    • Total energy
    • Volume
    • Average stress (along the diagonal of the stress tensor)
  • Save the atomic positions during production run to a trajectory file (md_T.traj) for 2.3.
  • Save energy and temperature data during the MD for 2.4.
  • *Plot volume vs time and temperature vs time at different temperatures.



Solution 2.2 Please write your code in the next cell. Please execute the cell after you finish writing the code and save your results. Please add more cells if needed.

2.3(10%) Radial Distribution Function (RDF) Analysis

  • Read the trajectory file (nd_T.traj ) from the production run.
  • Calculate the partial Radial Distribution Functions (RDFs) g (r) over the production trajectory Irames for each temperature.
  • You can use existing lbraries/functions to compute RDFs.Check ase.geonetry.analysis or consider simple implementations using distance calculations.
  • Plot the calculated g( r)vs distance r (0 to 5 人. like half the bax length) at each temperature and use 1000 bins.
Solution 2.3 Write your code in the next cell. Please execute the cell after you finish writing the code and save your results. Please add more cells if nended.

2.4 (10%) Phase Transition Analysis

  • Plot the everage volume (V_avg)vs temperature at each temperature
  • Show the standard deviation of the volume at each temperature on the plot as error bar.
  • Plot the dV_avg/dT vs temperature.


Solution 2.4 Write your code in the next cell. Please execute the cell after you finish writing the code and save your results.Please add more cells if needed.

2.5(15%) Phase Boundary Identification

  • Perform a finer scan of temperature for the phase boundary around the phase transition temperature and identify the phase transition temperature with an accuracy of 20 K.
  • Replot above plots (rdfs, volume vs temperature, dV_avg/dT) in a finer region with such finer temperature scan.
  • Is this a first-order or second-order phase transition? Justify your answer.
  • Compare the phase transition temperature with the experimental value (if avalable) and discuss the difference. lf you can find the experimental value, please include it in your report.
  • Describe the change in the RDFs and the volume around the phase transition temperature. Discuss the physical meaning of these changes.
Solution 2.5 Write your code in the next cell. Please execute the cell after you firish writing the code and save your results.Please add more cells if needed.


发表评论

电子邮件地址不会被公开。 必填项已用*标注