1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Computational physics

  1. May 16, 2012 #1

    I'm interested in pursuing a career in computational physics or any field that involves computer science and physics (both are my majors). I have also considered video game programming and simulation/modeling. You get the idea.

    My question is - for someone who wants to be a programmer working on scientific software, is it worth doing a BS in physics or will a BA suffice?

    I can do a double BS in physics and computer science and graduate in two years, but I'm wondering if it would be better to do just a BA in physics and fill in the extra slots with more CS electives.

    There are so many CS courses that I'm interested in, but don't have space to take them. Or should I just wait and take them when I go to grad school? I'm going to grad school for CS, not physics.

    I'm so confused! I like the idea of a double BS but I wonder if I'll ever need the physics one.
  2. jcsd
  3. May 17, 2012 #2
    The difference between a BS and a BA is school dependent, and no one is going to really care.

    If you want to be a computational physicist, you should go to graduate school in physics. If you go to graduate school in CS, you'll be working on a different set of problems. Also, you should do a lot of extra-curricular programming. My experience is that it's easier to learn programming on your own than it is to physics, so my coursework has been focused on physics. YMMV.

    Also professional masters degrees in CS and a Ph.D. in CS are completely different things. In particular, most professional masters degrees have as a goal to teach you to program so that you can get a job. Ph.D.'s in CS don't have that goal.
  4. May 17, 2012 #3


    User Avatar
    Science Advisor

    I'd also echo twofish-quant's advice to do extracurriculur programming activities.

    When you are going to be interviewed, you are going to be asked about the projects you worked on in conjunction with the standard technical questions in all likelihood (this comment is based on my own experience).

    Projects that are more complex, with different technologies linked together (scripting languages, external libraries either compiled or DLL, and so on) with multiple contributors is a good thing to have and should be supplemented with other kinds of your own work.
  5. May 17, 2012 #4
    But where does the physics major come in? I'm very confident with computer science and love the subject, so I'm wondering if I should just focus on it more. On the other hand, I'm not very good in physics, but I want to be. Is it really worth going for a physics BS (6 more classes than a BA) when instead I could be taking more extra electives in CS? Or that might be a good thing, actually - I might get too overwhelmed with too many CS courses at once. Next semester I'll only be taking one CS course. I guess I could use that time for some extracurricular programming then.

    This person had a similar question to mine: https://www.physicsforums.com/showthread.php?t=593916
    Last edited: May 17, 2012
  6. May 17, 2012 #5


    User Avatar
    Science Advisor

    The physics major provides domain knowledge.

    In programming you have two kinds of knowledge: domain knowledge and general knowledge. The general knowledge pertains to general programming which includes a lot of things like generic data structures and algorithms, good technique, good interface and structure definitions, and other associated things that do not really depend a lot on the domain.

    The domain stuff is different: this is the stuff that helps define the things like the design of the code-base, its elements, its interconnection and ultimately with all of these types of things, the final structures, interface components, and functionality of the actual program/project/library/whatever itself.

    If you don't have domain knowledge of a reasonable standard, you won't get hired over someone that has domain knowledge provided other things are similar. The simple reason is that when you are thrown a huge repository of code, documentation for a DLL, or given a task that requires you to conceptually understand what you are doing, then both domain and general knowledge in isolation will not help you do what you need to do.
  7. May 17, 2012 #6
    Thanks for the reply. Sounds like I am on the right track then. I'm reassured.

    Which CS electives would you recommend for a physics major? Next semester I'm going to take parallel algorithms and I can chose between networks and compilers. Not sure which of the latter two to pick.
  8. May 17, 2012 #7


    User Avatar
    Science Advisor

    I don't know much about the domain of computational physics, but I do know that it will be an intensive thing computationally which means anything to do with performance will be critical.

    This is opposed to say other kinds of projects like say writing a text-editor or a word-processor where you can get away with using non-optimal code due to the nature of the application (I'm not condoning it, but I'm pointing out the contrast between different domains).

    Parallel algorithms sounds good and anything with vector processing (which is a specific kind of parallel machine) is probably going to be a good thing as well.

    Both compilers and networks are good choices but I would say that learning networks would be a good thing especially for things like distributed computing.

    You will find that when you have a lot of computers that are linked together by a really good network (like a LAN or a WAN), then with the right network interface you can do a lot of distributed computing tasks for the right kinds of tasks and this is what a lot of people do when they can't afford to buy a specialized super-computer.

    In this context, networking is a very good thing to know because it's good to use for distributed computing when you have situations where you can just throw tasks at different machines, especially if you do not require strict latency requirements where you need very fine-grained synchronization.

    An instance of what I'm talking about is a situation where you say construct a process to create 1000 things in parallel and there is not any synchronization required between each of the things. This means that if you had say a 1000 computers with processing time to spare, you create a connection, send the data (hopefully small enough) and then have a 1000 threads waiting for each task to finish and then you get all the results when they arrive.

    If you can use a situation where you don't have to wait for all things to finish, then this provides a massive advantage to a single machine solution (and even if this is not necessarily the case, it's still good).

    The thing though is that when you implement this and actually execute it, you will get some results that will show you when and where performance changes for specific problems and this will help you immensely in deciding when to use distributing computing for some problems and when not to use it.
  9. May 17, 2012 #8
    Thank you for explaining it to me. That's exactly what one of my professors said, it's good to hear it from someone else too. He urged me to take parallel algorithms and networks at the same time because they go hand in hand. So in order to do that I will have to take linear algebra in the summer, which is another issue, but it'll be doable.

    So after this fall I will have 3 semesters left and only 2 more CS courses to take. I'll have plenty of time to take more CS electives if I want to, some which will be independent study where I can hopefully do more physics related things.

    I just hope it all works out as I have planned. I don't get financial aid so summer courses are really expensive, but it's the only way I can manage to do both majors.
  10. May 17, 2012 #9


    User Avatar
    Science Advisor

    If you want to get into a computational science, you really should study the science in question (e.g., physics in this case). If you are already a decent programmer, then learning a few more CS techniques on demand here and there will be simple. But you would have, literally, *no chance at all* of learning something like computational solid state physics by yourself.

    In fact, from a certain level, more CS classes will generally not help you, because most of the computational problems treated in sciences do not even have theoretical solutions. For example, your network course will not help you with designing parallel algorithms for real science projects, because the difficulty in such projects is not undertanding the network, but developing ways of splitting up the data and tasks in such a way that they can be processed in a parallel manner. In order to do that, you need to understand the problem domain. You do not even need more than a superficial understanding of how networks work (for all practical purposes, you treat the network as a set of nodes with latencies and bandwidths between them, which can talk via MPI. All the ugly stuff is abstracted away!).

    Similarly: Global optimization. CS might teach you all kinds of cool meta-heuristic methods (whee, genetic algorithms \o/), but in the end you still need to develop the actual heuristics these things are based on, and without a deep understanding of the problem domain this will simply not work.

    In short: It is much easier to learn a specialized CS topic when you need it, than to learn QM, statistical mechanics, solid state physics, particle physics, etc, etc. The reason for that is that in physics (and many other sciences) all the different topics are based on each other: You cannot simply learn, say, quantum chemistry, without first learning linear algebra, analysis, classical mechanics, electrodynamics, physical chemistry, quantum mechanics, and statistical mechanics beforehand. On the other hand, learning even advanced CS topics like scheduling, parser&compiler construction, or special numerical linera algebra techniques independently is perfectly possible.
  11. May 17, 2012 #10
    If you want to do computational physics, yes. Now, there are lots of interesting things in computer science, so it's fine if you want to focus on computer science.

    You don't learn computer programming in courses. Computer programming is basically a specialized form of writing, and while writing classes are useful, if you just write what you are assigned in writing classes, you aren't going to be a good writer. You learn writing by writing.

    Also do continue the analogy. Computer science is like linguistics. In order to be a decent writer, you have to master the basics of grammar and syntax, but being an expert at grammar or linguistics is of very little usefulness in writing. Also the important thing if you want to be a writer is to have something to write about. If you want to write love poetry, and you spend your time thinking about grammar rather than love, then it's probably not going to work. If you want to be a comedian, then most of your time should be thinking about comedy rather than about spelling.

    So if you want to be a computational physicist, you have to learn the grammar, but the core is the physics.
  12. May 17, 2012 #11
    Also get some experience in machine language. Algorithms are also important. The other things is that for your humanities requirement, I've found classes in writing and poetry to be useful in computer programming. If you think about it, you are basically writing a poem. Good code rhymes.
  13. May 18, 2012 #12
    Thank you all for the advice, you guys are great.

    Makes sense. I know because I have taught myself many skills in CS... whereas in physics, I tend to learn better in a more formal setting. So yeah, that convinces me. I can always pick up necessary CS skills on the job, but not so much physics. That makes me less sad about giving up CS courses for physics.

    Wonderfully said. I will have to quote you on that one day.

    I took a course in computer organization this semester and started to love assembly language. I also just finished data structures & algorithms. Sounds like I am on the right track!

    By the way, one of my professors said the same thing about programming and poetry just a few days ago. Are you him? :tongue:
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Computational physics
  1. Computational Physics (Replies: 5)

  2. Computational Physics (Replies: 3)

  3. Computational Physics (Replies: 1)

  4. Computational physics (Replies: 17)

  5. Computational Physics (Replies: 3)