Pages

Top programming languages for Quantum Chemistry or Density Functional Theory Researchers

Top programming languages is mostly debated topic. For a new programmer or researcher, this is the first question that comes to our mind - "What programming language should I use"?

Here are the top languages used for researchers in Quantum Chemistry and Condensed Matter Theory researchers. For wrapping purpose, mostly python is used. Note that a combination of these languages such as (Fortran with Python, C++ with python, Fortran and C also widely used in many codes)

Fortran
C++
Python
C


Here are some discussion.

Fortran
Fortran is the most widely used language for long time. It has rich libraries that can do numerical computations and most (or almost all) of the condensed matter codes are written in Fortran. Codes written in Fortran has very good readablity. One of the reason for the wide use of Fortran is considered is that when the original developers wrote the code, Fortran was mostly popular and still popular and it takes much effort to rewrite modern language such as C++. However, because Fortran 90 adapts all the features of C++ such as class, inheretance, isomorphisms etc, there is no need to switch to C++. 
Example: VASP, Quantum Espresso, ELK, etc.

C++ 
Quantum Chemistry packages where the molecular properties are calculated are mostly using C++ as programming languages. Quantum Chemistry researchers love C++. Most of the chemistry based codes especially use C++. The speed is almost equal to C++. This language also has good libraries for numerical computation.

Python
Python is the fastest growing language and easy to learn. Researchers and educators advice that Python should be taught as the first programming languages. With the Numpy and Scipy packages, the speed is comparable to C++ most of the time. Python can also be used as a wrapper language along with other codes such as Fortran and C/C++.

C
C is the minimalist language and it can be used to do almost anything. While it has no class, inheritance and isomorphism, this is the first language that is taught to computer science students. This language is used in a countable number of codes with Python as a wrapper language.

What is your take on this? Comment here if you agree or disagree.

For the list of software and more details see this Wikipedia page List of quantum chemistry and solid-state physics software.

Top libraries for Data Scientists and Machine Learning Application Researchers

Top libraries for a Data Scientist or Machine Learning applications researchers

  1. TensorFlow
  2. Scikit-Learn
  3. Numpy
  4. Keras
  5. PyTorch
  6. LightGBM
  7. Eli5
  8. SciPy
  9. Plotly
  10. Pandas

Some of the cheat sheets can be obtained here in these links.



Gedit cause ~ at the end of the file name. Why and how to solve this?

If I open a file using gedit, after closing the file, in addition to the file, an additional file is added with ~ at the end of the file name. Why does this happens?



Questions to researchers scientists

This list of questions are inspired by many posts and interviews and my experience. For references, you may see at the end of the

What are some interesting questions to ask researchers/scientists?

Who were your most influential teachers growing up?

Why did you decide to go into your profession?

What do you enjoy the most about your profession?

Did you ever imagine that you would be doing this when you were a teenager/college-student/child?

What would you change if you go back to 20/30 years from now (or to your childhood?)

What would you suggest to someone who want to follow your footsteps (do research in your field)?

What were the turning points or important moments in your research career?

What was the best advice you’ve gotten?

Who are you inspirations both in your field and outside?

What are your daily habits? Are you a morning person or night person?

Could you please explain your research in 5 different levels (inspired by WIRE.com)

Could you please explain your research to a five years old?

What is that you currently working on?

How do you chose PhD students and Postdocs?

If you weren’t a scientist what would you be?

What other jobs have you considered?

Who’s your favorite scientist?

When did you get the call and what situation  or How did you know that you won the award?

Do you use social media? If yes how long every day?

How much is done in your field and what do you envision in your field?

Which one principle you like the most and why?

Which discovery you like the most?







References
Quora: As a teenager what type of interesting question can I ask a Nobel prize winner...

sudo apt/apt-get update error (no update)

Sometimes, I get following error or unable to lock directory /var/lib/apt/lists/ while updating the system. What does that mean?
The output in the terminal is as follow:

$ sudo apt update
Reading package lists... Done
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/

$ sudo apt-get update
Reading package lists... Done
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/


Solution.

Just do follow.

sudo rm /var/lib/apt/lists/lock

Then,

sudo apt-get update 

This will update your system.





IQmol error (not solved yet)

How to install IQmol in Linux?

The IQmol is widely used to analyze the ouptut files form Q-Chem electronic structure theory code. In Windows, it is straight forward to install IQmol.exe package and it works fine.

However, in Linux distribution (Ubuntu 16.04), the .deb package can be installed just by downloading and opening in package installer. However, some functionalities are missing in installation.

Installation from the source.

I cloned the source code from GitHub.com/Iqmol and tried ./configure. I got following error.

./configure
The output in the terminal is:
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- The Fortran compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:26 (find_package):
  Could not find a package configuration file provided by "Qt5QtCore" with
  any of the following names:

    Qt5QtCoreConfig.cmake
    qt5qtcore-config.cmake

  Add the installation prefix of "Qt5QtCore" to CMAKE_PREFIX_PATH or set
  "Qt5QtCore_DIR" to a directory containing one of the above files.  If
  "Qt5QtCore" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/full/path/to/IMol/build/CMakeFiles/CMakeOutput.log".

How to combine .png files side by side

The package montage can be used to combine png files side by side.

Orignally, I want to combine .eps files together. But, I couldn't do it directly. But, there is way to combine .png files as follow.

Suppose, we have two .png files

montage Figure*.png -tile 2x1 -geometry +0+0 combinedFigure.png

Then, you can use "convert" to convert form .png to .eps as follow.

convert combinedFigure.png combinedFigure.eps

This is how I got the work done. The final output file in .eps is not as clear as I expected. But for now, it is suffice. If I come to know more about this, I will update this post.



Following links would be useful to you.
Stackoverflow.com
imagemagick.org

Matplotlib common errors

Error: matplotlib.pyplot
not enough values to unpack (expected 3, got 2)

This is because, I defined as follows.

fig, ax, bx = plt.subplots()

Then, I did not use bx.

Once I removed bx,. i.e., by setting "fig, ax = plt.subplots()", the problem solved.




How to reduce pdf file size?

For a job applications, I had to upload pdf file which had to be less than 500 MB. But, the file size was larger than 500 MB. How to do this?

Here is a way.

ps2pdf fileName.pdf  outFileName.pdf 

Printing or saving the first page (or specific pages) of pdf in Linux

Install pdftk using:

sudo apt-get install pdftk
or
sudo snap install pdftk


and use:

To save only the first page (in the terminal):

pdftk fileName.pdf cat 10-12 output outfile_p10-12.pdf

To save the first page:

pdftk fileName.pdf cat 1-1 output outfile_p1.pdf


You may be interested in these posts

Error in image file conversion: convert-im6.q16: not authorized `test.eps' @ error/constitute.c/WriteImage/1037.

This error is because of the vulnerability. This allows remote execution of code using image formats. So, some Linux distributions by defaul...