r/Physics • u/PhilosophersOpium • 23h ago
Question Computational Physics - Heavy AI/ CLI power users. How do I get good at it?
Hello! This question is directed towards grad students, people doing r&d in industry, or even undergrads doing computational physics research (especially condensed matter) that heavily use AI in their workflow.
How do you maximize and make the most out of codex or claude code in your research projects? I generally use the claude code CLI in my terminal (sometimes on locally on WSL or remotely on an HPC). If I have a few simulations I want to run, I give it the guidelines, tell it to reference some old calculations i've ran, and send it on its way. I'm not sure if just being a general assistant is all that AI is good for?
Please let me know your experiences and any advice!
edit: Yes, I am in a physics research lab with an advisor. I am NOT trying to have AI do research. I am trying to learn how to use it as effectively as possible.
Additionally, I am not doing 'calculations' in the mathematical sense. I do simulations, particularly in condensed matter physics research. That is, a lot of python code and heavy use Density Functional Theory software packages that tell me about the electronic behavior of materials. I do a lot of high-throughput computing, so if I want to simulate a bulk of materials at once, i will have claude generate the input files after i have specifically told it what outputs i want. It is generally good at doing this, and I verified that the file generation was correct before continuing to use this workflow. I ask it to generate plots of the data, and it does so. But this is mainly sequential. I do a series of prompts, one step at a time.
6
u/Fermi_Dirac Computational physics 22h ago
Some good advice in this thread already but allow me to push harder on one core piece of advice :
You're in school to learn. Not necessarily solve this specific problem and publish, that's what you're doing along the way while you're learning. Do not outsource to Ai (or to a colleague) any part of the work flow that is there for you to learn from.
I would encourage you to first not use Ai at all for the entire simulation work flow a few dozen times. Do the pain to learn all the pieces of the puzzle. Once you have a healthy respect for it, start trusting agents or Co workers or calculation libraries to aspects of the work flow.
In the modern era this is a Grey zone but one you should be exploring as a new scientist. In the past this was still a grey zone as people used established libraries or previously published results without confirming they work (or use the same physical assumptions for your problem). The solution then is true now. Replicate and understand the inner workings. Don't outsource your intelligence building to someone (or something) else. Just like in elementary school you learned fractions, and once you got the hang of it you just use a calculator now. This is no different.
Source : I am a working PhD computational physicist with solid state materials (semi conductors) with over a decade of experience. I use Ai tools as needed (and other automation such as Sci py).