Re: D for project in computational chemistry

2015-08-17 Thread jmh530 via Digitalmars-d
On Sunday, 16 August 2015 at 13:11:12 UTC, Yura wrote: Python: #!/usr/bin/python import sys, string, os, glob, random from math import * a = 0 l = 1000 for i in range(l): for j in range(l): for m in range(l): a = a +i*i*0.7+j*j*0.8+m*m*0.9

Re: D for project in computational chemistry

2015-08-17 Thread John Colvin via Digitalmars-d
On Sunday, 16 August 2015 at 13:59:33 UTC, Idan Arye wrote: Initially I thought the Python version is so slow because it uses `range` instead of `xrange`, but I tried them both and they both take about the same, so I guess the Python JIT(or even interpreter!) can optimize these allocations

Re: D for project in computational chemistry

2015-08-16 Thread Rikki Cattermole via Digitalmars-d
On 17/08/2015 1:11 a.m., Yura wrote: Good afternoon, gentlemen, just want to describe my very limited experience. I have re-written about half of my Python code into D. I got it faster by 6 times. This is a good news. However, I was amazed by performance of D vs Python for following simple

Re: D for project in computational chemistry

2015-08-16 Thread Yura via Digitalmars-d
Good afternoon, gentlemen, just want to describe my very limited experience. I have re-written about half of my Python code into D. I got it faster by 6 times. This is a good news. However, I was amazed by performance of D vs Python for following simple nested loops (see below). D was

Re: D for project in computational chemistry

2015-08-16 Thread Idan Arye via Digitalmars-d
On Sunday, 16 August 2015 at 13:11:12 UTC, Yura wrote: Good afternoon, gentlemen, just want to describe my very limited experience. I have re-written about half of my Python code into D. I got it faster by 6 times. This is a good news. However, I was amazed by performance of D vs Python for

Re: D for project in computational chemistry

2015-08-06 Thread John Colvin via Digitalmars-d
On Thursday, 6 August 2015 at 08:11:49 UTC, Gerald Jansen wrote: On Wednesday, 5 August 2015 at 18:49:21 UTC, bachmeier wrote: Yes. The question is whether we can put together a group of developers to build the infrastructure, which is a lot more than just code. That means, in particular,

Re: D for project in computational chemistry

2015-08-06 Thread Laeeth Isharc via Digitalmars-d
On Thursday, 6 August 2015 at 06:56:11 UTC, Laeeth Isharc wrote: On Thursday, 6 August 2015 at 02:38:15 UTC, jmh530 wrote: On Wednesday, 5 August 2015 at 23:37:37 UTC, Laeeth Isharc wrote: Dataframes aren't intellectually very exciting, but they are very useful for iterative data exploration

Re: D for project in computational chemistry

2015-08-06 Thread Laeeth Isharc via Digitalmars-d
On Thursday, 6 August 2015 at 02:38:15 UTC, jmh530 wrote: On Wednesday, 5 August 2015 at 23:37:37 UTC, Laeeth Isharc wrote: Dataframes aren't intellectually very exciting, but they are very useful for iterative data exploration and quick prototyping since all of that starts with getting the

Re: D for project in computational chemistry

2015-08-06 Thread Gerald Jansen via Digitalmars-d
On Wednesday, 5 August 2015 at 18:49:21 UTC, bachmeier wrote: Yes. The question is whether we can put together a group of developers to build the infrastructure, which is a lot more than just code. That means, in particular, good documentation and using it for our own projects. Right on! I

Re: D for project in computational chemistry

2015-08-06 Thread ixid via Digitalmars-d
On Thursday, 6 August 2015 at 08:11:49 UTC, Gerald Jansen wrote: Is the Dscience github project an adequate platform? How can other people get involved? Is a dedicated discussion group needed? Can we develop a plan of some sort rather than just a scatter of individual efforts? If a group do

Re: D for project in computational chemistry

2015-08-05 Thread Yura via Digitalmars-d
Dear all, Thank you for your replies. I am now really convinced that D is a decent choice for my project (also I am really happy to see that the forum is really active and apparently many of you use D for your scientific projects). I am just looking forward to writing the code. I had a very

Re: D for project in computational chemistry

2015-08-05 Thread Chris via Digitalmars-d
On Wednesday, 5 August 2015 at 17:47:49 UTC, Yura wrote: Dear all, Thank you for your replies. I am now really convinced that D is a decent choice for my project (also I am really happy to see that the forum is really active and apparently many of you use D for your scientific projects). I

Re: D for project in computational chemistry

2015-08-05 Thread bachmeier via Digitalmars-d
On Wednesday, 5 August 2015 at 17:47:49 UTC, Yura wrote: The dominant languages in science now for production codes are Fortran or C/C++, may be D could become another option? With kind regards, Yury Yes. The question is whether we can put together a group of developers to build the

Re: D for project in computational chemistry

2015-08-05 Thread jmh530 via Digitalmars-d
On Wednesday, 5 August 2015 at 23:37:37 UTC, Laeeth Isharc wrote: Dataframes aren't intellectually very exciting, but they are very useful for iterative data exploration and quick prototyping since all of that starts with getting the data in from somewhere in a standard format. May not

Re: D for project in computational chemistry

2015-08-05 Thread Laeeth Isharc via Digitalmars-d
On Wednesday, 5 August 2015 at 18:20:20 UTC, Chris wrote: On Wednesday, 5 August 2015 at 17:47:49 UTC, Yura wrote: Dear all, Thank you for your replies. I am now really convinced that D is a decent choice for my project (also I am really happy to see that the forum is really active and

Re: D for project in computational chemistry

2015-08-05 Thread Laeeth Isharc via Digitalmars-d
On Wednesday, 5 August 2015 at 18:49:21 UTC, bachmeier wrote: On Wednesday, 5 August 2015 at 17:47:49 UTC, Yura wrote: The dominant languages in science now for production codes are Fortran or C/C++, may be D could become another option? With kind regards, Yury Yes. The question is whether

Re: D for project in computational chemistry

2015-08-04 Thread bachmeier via Digitalmars-d
On Tuesday, 4 August 2015 at 13:42:15 UTC, Chris wrote: Good that you point that out. Most people I know claim that it's easier to develop/prototype in with Matlab. Apart from execution speed and fast prototyping, Matlab is proprietary. This alone is a deal breaker. I can only imagine it

Re: D for project in computational chemistry

2015-08-04 Thread Chris via Digitalmars-d
On Sunday, 2 August 2015 at 16:25:18 UTC, Yura wrote: Dear D coders/developers, I am just thinking on one project in computational chemistry, and it is sort of difficult for me to pick up the right language this project to be written. The project is going to deal with the generation of the

Re: D for project in computational chemistry

2015-08-04 Thread maarten van damme via Digitalmars-d
I'm not a programmer myself and used D for a project in computational electromagnetics. While I had to implement numerical integration and a bit of linear algebra which was annoying (would be really useful in phobos), it was a joy to work with and the resulting program was incredibly fast. Most

Re: D for project in computational chemistry

2015-08-04 Thread Chris via Digitalmars-d
On Tuesday, 4 August 2015 at 13:25:22 UTC, maarten van damme wrote: I'm not a programmer myself and used D for a project in computational electromagnetics. While I had to implement numerical integration and a bit of linear algebra which was annoying (would be really useful in phobos), it was a

Re: D for project in computational chemistry

2015-08-04 Thread John Colvin via Digitalmars-d
On Tuesday, 4 August 2015 at 13:42:15 UTC, Chris wrote: On Tuesday, 4 August 2015 at 13:25:22 UTC, maarten van damme wrote: I'm not a programmer myself and used D for a project in computational electromagnetics. While I had to implement numerical integration and a bit of linear algebra which

Re: D for project in computational chemistry

2015-08-04 Thread Chris via Digitalmars-d
On Tuesday, 4 August 2015 at 13:58:02 UTC, bachmeier wrote: On Tuesday, 4 August 2015 at 13:42:15 UTC, Chris wrote: Good that you point that out. Most people I know claim that it's easier to develop/prototype in with Matlab. Apart from execution speed and fast prototyping, Matlab is

Re: D for project in computational chemistry

2015-08-04 Thread jmh530 via Digitalmars-d
On Tuesday, 4 August 2015 at 09:48:07 UTC, Chris wrote: I agree with bachmeier. You cannot go wrong. You mentioned nested loops. D allows you to concatenate (or pipe) loops. So instead of foreach { foreach { foreach { } } } you have something like int[] numbers = [-2, 1,

Re: D for project in computational chemistry

2015-08-04 Thread bachmeier via Digitalmars-d
On Tuesday, 4 August 2015 at 18:56:20 UTC, jmh530 wrote: I don't think I had seen an example like this before (though it is obvious in retrospect). Is there any advantage in terms of performance? The big win is in terms of being able to write complicated, correct code easily. However, there

Re: D for project in computational chemistry

2015-08-04 Thread bachmeier via Digitalmars-d
On Tuesday, 4 August 2015 at 19:40:30 UTC, jmh530 wrote: Wrt static typing, I don't think the issue is about catching bugs in Matlab. I just haven't had much an issue with mixing up types in Matlab. I can see the arguments about static typing and ahead of time compilation for performance, but

Re: D for project in computational chemistry

2015-08-04 Thread jmh530 via Digitalmars-d
On Tuesday, 4 August 2015 at 13:58:02 UTC, bachmeier wrote: I can only imagine it being faster to prototype in Matlab if there are additional libraries available. D's just a way better language - Matlab was designed as a replacement for FORTRAN 77 - and static typing means the compiler catches

Re: D for project in computational chemistry

2015-08-04 Thread John Colvin via Digitalmars-d
On Tuesday, 4 August 2015 at 20:37:18 UTC, bachmeier wrote: A couple of things that might make D more pleasant for me are: - I do a lot of simulation-related things, where the inputs and outputs can change a lot as I figure out how I want to do things, and - I use R. R was invented down the

Re: D for project in computational chemistry

2015-08-04 Thread John Colvin via Digitalmars-d
On Tuesday, 4 August 2015 at 18:56:20 UTC, jmh530 wrote: On Tuesday, 4 August 2015 at 09:48:07 UTC, Chris wrote: I agree with bachmeier. You cannot go wrong. You mentioned nested loops. D allows you to concatenate (or pipe) loops. So instead of foreach { foreach { foreach { }

Re: D for project in computational chemistry

2015-08-03 Thread FreeSlave via Digitalmars-d
On Sunday, 2 August 2015 at 16:25:18 UTC, Yura wrote: Dear D coders/developers, I am just thinking on one project in computational chemistry, and it is sort of difficult for me to pick up the right language this project to be written. The project is going to deal with the generation of the

Re: D for project in computational chemistry

2015-08-03 Thread Laeeth Isharc via Digitalmars-d
On Monday, 3 August 2015 at 06:16:57 UTC, yawniek wrote: On Sunday, 2 August 2015 at 16:25:18 UTC, Yura wrote: While it is easy to code in Python there are two things I do not like: 1) Python is slow for nested loops (much slower comparing to C) 2) Python is not compiled. However, I want to

Re: D for project in computational chemistry

2015-08-03 Thread yawniek via Digitalmars-d
On Sunday, 2 August 2015 at 16:25:18 UTC, Yura wrote: While it is easy to code in Python there are two things I do not like: 1) Python is slow for nested loops (much slower comparing to C) 2) Python is not compiled. However, I want to work with a code which can be compiled and distributed as

Re: D for project in computational chemistry

2015-08-03 Thread jmh530 via Digitalmars-d
On Monday, 3 August 2015 at 14:25:21 UTC, FreeSlave wrote: On Sunday, 2 August 2015 at 16:25:18 UTC, Yura wrote: Dear D coders/developers, I am just thinking on one project in computational chemistry, and it is sort of difficult for me to pick up the right language this project to be

Re: D for project in computational chemistry

2015-08-02 Thread Rikki Cattermole via Digitalmars-d
On 3/08/2015 4:25 a.m., Yura wrote: Dear D coders/developers, I am just thinking on one project in computational chemistry, and it is sort of difficult for me to pick up the right language this project to be written. The project is going to deal with the generation of the molecular structures

Re: D for project in computational chemistry

2015-08-02 Thread ZombineDev via Digitalmars-d
On Sunday, 2 August 2015 at 16:25:18 UTC, Yura wrote: Dear D coders/developers, I am just thinking on one project in computational chemistry, and it is sort of difficult for me to pick up the right language this project to be written. The project is going to deal with the generation of the

Re: D for project in computational chemistry

2015-08-02 Thread Daniel N via Digitalmars-d
On Sunday, 2 August 2015 at 16:25:18 UTC, Yura wrote: Any hints/thoughts/advises? With kind regards, Yury Dear Yura, D is a perfect fit. For performance reasons, when releasing your binary make sure to use one of these compilers: GDC - GCC D Compiler (comparable performance to gcc) LDC

D for project in computational chemistry

2015-08-02 Thread Yura via Digitalmars-d
Dear D coders/developers, I am just thinking on one project in computational chemistry, and it is sort of difficult for me to pick up the right language this project to be written. The project is going to deal with the generation of the molecular structures and will resemble to some extent

Re: D for project in computational chemistry

2015-08-02 Thread bachmeier via Digitalmars-d
On Sunday, 2 August 2015 at 16:25:18 UTC, Yura wrote: I just wander how D would be suitable for my purpose? Please, correct me if I am wrong, but in D the need of pointers is minimal, there is a garbage collector, the arrays can be dynamically allocated, the arrays can be sliced, ~=, etc which