18
$\begingroup$

A little bit of coding can a long way in matter modeling. Coding is not used only to write big programs but can be used for scripting, data processing, automation, and more. But sometimes many resources (books, papers, etc.) are generic and superficial.

Are any good resources to learn to code in the context of matter modeling? What do you recommend?

$\endgroup$
7
  • 2
    $\begingroup$ I think this question is too wide. There are different codes to use for coding, as discusses here, for example. And there also many problems in Matter Modeling to address for. $\endgroup$ – Camps Nov 4 '20 at 12:16
  • 2
    $\begingroup$ I want to know what is special in matter modelling if you just start and want to write some scripts to process some data. I, as well as many people I know started from generic programming language books. $\endgroup$ – Y. Zhai Nov 4 '20 at 14:03
  • 2
    $\begingroup$ @Y.Zhai, I started with generic programming language courses/books too. But, for example, what resources can help a beginner to fill the gap between sorting an array and writing complex code? Is there something out there that is closer to the context of matter modeling? Or everyone finds their path on their own adapting ideas from diverse sources? $\endgroup$ – Antonio de Oliveira-Filho Nov 4 '20 at 22:00
  • 2
    $\begingroup$ This might not be specifically related to matter modeling, but this course from MIT: "The Missing Semester of Your CS Education" introduces a beginner to a lot of tools (in the context of linux) which will be helpful for scripting, data processing, automation and others which are relevant for matter modeling. $\endgroup$ – Rashid Rafeek Nov 5 '20 at 5:56
  • 1
    $\begingroup$ @RashidRafeek, thanks! This course looks great! Can you put that as an answer? It will have an upvote from me. $\endgroup$ – Antonio de Oliveira-Filho Nov 5 '20 at 13:46
14
$\begingroup$

The missing semester: An MIT Course

For a beginner in the field, most often the difficulty would be in working with unix-like environments, which is the only way to access many of the matter modeling software and probably the most convenient way to analyse the outputs of the calculations. And this is often learned the hard way by searching the internet on how to work with different tools for different purposes, which often takes a long time to get going with and is most often frustrating for people less familiar with the working of these systems. This course introduces one to the basic components of a unix-like environment, working with shell, scripting, editing files, data analysis and many more which would help build a base understanding of these systems from which one can easily learn the specific tools required for one's work. It's named aptly as "the missing semester" as it is often not covered while teaching computational techniques and is left to the learner to figure out on their own.

$\endgroup$
11
$\begingroup$

Code can be used to automate, derive insights and to calculate more observations with the given set of data.

Automation: This can be done via bash scripts or through the os module in python. This is an example bash script

Deriving insights and data manipulation: This can be done using small python scripts and some modules that may come in handy are:

  • numpy [for array manupulation]
  • pandas [for dataset manipulation]
  • scipy [in case you want to fit curves and do interpolations]
  • sklearn [a machine learning library that would help you get statistical inferences from an ensemble]

Hope this helps :)

$\endgroup$
11
$\begingroup$

For quantum Monte Carlo or exact/Lanczos diagonalization

I recommend Computational Studies of Quantum Spin Systems by Anders Sandvik arXiv:1101.3281, or AIP Conf. Pro. 1297, 135 (2010).

This review is designed to teach you how to write quantum Monte Carlo simulations of spin systems like the Heisenberg model. There are also example codes from the workshop on Sandvik's website (note of caution: there may be a bug where the random number generator doesn't work for the SSE code, so you may have to substitute your own RNG).

$\endgroup$
2
  • 1
    $\begingroup$ Sandvik's text is a great resource for exact diagonalization too. $\endgroup$ – Anyon Nov 4 '20 at 17:21
  • $\begingroup$ ^Totally forgot about that $\endgroup$ – taciteloquence Nov 4 '20 at 17:23
10
$\begingroup$

This question is quite generic but I always plug the online DFT book by Kitchin. Its a good resource showing how python can run VASP which is probably a good starting point.

$\endgroup$
5
$\begingroup$

For Molecular Mechanics

  1. Allen & Tildesley. One of two molecular mechanics bibles. They have a github accounts with a ton of python and fortran codes

  2. Frenkel & Smit, and they have fortran 90 code that you can find. A solid reference book.

  3. D. C. Rapaport The Art of Molecular Simulation. Plenty of codes, written in C.

  4. Andrew Leach Molecular Modelling: Principles and Applications.

The first two cover molecular dynamics and Monte Carlo quite well. These are mandatory reference books. The third covers molecular dynamics quite well.

$\endgroup$
5
  • $\begingroup$ I will wait a day or two and then add a new answer with some good references for macroscopic modelling with thermodynamic equations of state since that is part of matter modelling as well. $\endgroup$ – B. Kelly Jan 3 at 5:47
  • 2
    $\begingroup$ Charlie Crown (a.k.a. B. Kelly) is back! Plus 10. $\endgroup$ – Nike Dattani Jan 3 at 8:02
  • 1
    $\begingroup$ I am here and there. Fall was super busy. $\endgroup$ – B. Kelly Jan 5 at 0:05
  • 1
    $\begingroup$ Nice I ordered the Allen and Tildesley book because of the github python support $\endgroup$ – Cody Aldaz Jan 6 at 2:18
  • $\begingroup$ @CodyAldaz It is nice, but, it constantly annoys me that they use box=1 as well as eps = sig = 1 and never bother with mixed fluids. Really good resource, but when making real code the missing factors of box, eps and sig that they don't include, because who multiplies or divides by 1... really adds up. $\endgroup$ – B. Kelly Jan 26 at 6:04
3
$\begingroup$

First-principles (ab initio) materials simulation:

It is possible to predict properties of materials “from scratch” or “ab initio”: by applying the laws of quantum physics to the atoms that make up the material. The methods for doing this have been developed by solid state physicists, and are now sufficiently mature to tackle materials engineering problems. These so-called “ab initio methods” are becoming a mandatory item in the toolbox of modern materials scientists. This course teaches you in a practical and hands-on way how to become a responsible user of these tools.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.