Hi, Le lundi 23 janvier 2012 23:29:39 vous avez écrit : > On Jan 23, 2012, at 9:46 PM, Yuri Pompeu wrote: > > Hello Everyone, > > I want to play around with some coding/programming. Just simple > > calculations from an input PDB file, B factors averages, occupancies, > > molecular weight, so forth... What should I use python,C++, visual > > basic? > > thanks > > Python is the most practical. Here is a simple python program:
Python is certainly a nice idea, especially with cctx. But it's not perfect as it's not a compiled language. It really depends on the task you have to acomplish. To play around, it's an excellent language. > > STAY AWAY from proprietary nonsense like visual basic and from languages > that do not facilitate reusability, like perl or other 1980's era shell > languages. You will find yourself porting or abandoning your code, which is > not a good use of your time. Fortran come from the 60's and is not evil. depends on what you want do. There are also quite some code already in Fortran. But so not much in fortran 90. Fortran is also not too difficult. For example, if you stay away from pointers, there is no memory leak possible by design. > > And python can be VERY fast for calculations if you use free and popular > libraries like numpy and scipy. These librares are wrappers around > optimized fortran and C libraries that you will never have to use directly. Python is fast if you don't use python that's true :D A good start is not to use loops or at least as few as possible. loops are horribly slow. Instead you need to rely heavily on numpy, it's a good way to remember your linear algebra :) > > I recommend staying away from very low level languages like C or fortran, > too. It is good to know these languages, but not so good to use them. Your > creativity should go towards implementing cool ideas and should not be > squandered on plugging memory leaks. It's better to use high level > languages that leverage your time most effectively. Low level languages have their advantages. It's not a good idea to stay away from them just because there is more work or it's more difficult. You cannot have 50M reflections*atoms*s^-1 processed for structure factor calculations in python. But it's true you probably won't need it every day. Brute force has some advantages over cool ideas sometimes ;) Pascal