Pages

How to hide (white out) some portions in a pdf file

How to hide (white out) some portions in a pdf file before printing?

We may have come across following situation.

You may want to print a research article or any file (which is in .pdf format).

But it may have a lot of pictures that may completely empty your cartridge. You may want to print other portions without this image. Also you may want hide certain portion of the text when you take print out.

Of course. You can do these with the Acrobat Reader (from Adobe)
But, How to do these in the free version of the Adobe Reader?

Here is a simple way.


  1. Open the file in Adobe Reader
  2. Go to Edit --> Paste
  3. A rectangular box will appear (with some text which is typed by you recently)
  4. Adjust the corners/sides of the box so that it hides entire Figure/portion that you want to hide
  5. You may delete the text or you may type some text inside this box
  6. You can also change the color of the outline by right clicking on the box and changing the property.


Hope it helps.





Quantum Espresso Series: How to run calculations in Quantum Espresso

I found a blog where nuts and bolts of doing calculations in Quantum Espresso code. In the blog post from quantumbarista.blogspot.com , the author Ryan Cloke has discussed the "Electronic Structure Calculations of Graphene Nanoribbons Using Quantum Espresso".

This blog post provides a detailed description on how to compute the band structure of a graphene nanoribbon.

Have a look at it.

I will do calculations and update to you later.


Quantum Espresso Series: Installing Quantum Espresso in Ubuntu 16.04 for newbies

Quantum Espresso is a opensource code for studying the electronic properties of materials. Installation of Quantum Espresso had been a difficult task earlier for new comers (now I believe that it is easy)

In this guide, I provide an easy way to install Quantum Espresso in Ubuntu 16.04. The hardware requirements can be seen here.

First check whether you have a FORTRAN complier (gfortran is a free FORTRAN compiler which is available in Ubuntu by default)

To update to new version of gfortran,

sudo apt-get install gfortran

This will install/update gfortran.

Now go the Quantum Espresso site.

Go to download page.

Download the specific version of the code you want.

Download the examples.

Extract the code using xzvf *.tz

Run ./configure

This will tell you if there is need for the installation of any packages

If configure is success,

Run make pw

Then move to examples folder

Now, you can run the specific examples

If there is need for 

Check the number of words/lines/characters in a file

You may know how to check the number of words/characters/lines in a MS Word file. But, how to check these in pdf file or any file?

Here comes the command "wc"

To use this, type the following command (for example to find the number of words in a pdf file).

wc -w fileName.pdf

This will return the number of words in the file.

Linux tips series

To replace the last command with the same arguments

commandName !*  - for all arguments
commandName !$  - for the last argument
commandName !:N - for the Nth argument



Using grep recursively

grep -r "text_to_grep" .
grep -r --include "*.txt" "text_to_grep" .
grep --include="*.csv" -nRHI "text_to_grep" *


After compiling a code, you may search for the executable (if you have a number of files in that directory). In this case, you can use ls -ltr to list all the files as per the time they are created. For example, see blwo.

gfortran -o code.out code.f90

If you run above line you will get the executable code.out in the same directory. But to look at this file, you can type,

ls -ltr

This will list all the files with code.out at the end of the list. This is a quick check for checking whether the executable is created or not. This will be useful when you teach or create a tutorial on coding.


Use top command to check which jobs are running.
Suppose you submit a job to compute in Linux. If you are not sure whether the job is completed or not, use 'top' command to check.

Type on the terminal
top

Now, you will get list of jobs running on the computer.
Then press 1 to see the latest jobs on top.




Viewing .jpg, .eps, .tif and .pdf files in Linux terminal

I mostly use .jpg, .eps, .tiff and .pdf formats for scientific publishing.

To open these files in Linux (Ubuntu)

For JPG files
eof fileName.jpg

For TIF files
eog fileName.tif

For .PNG files
eog fileName.png

For PDF files
evince fileName.pdf

For EPS files

Everything you need to know about Jupyter Notebook

To start a notebook 
In terminal, run

jupyter-notebook 

Now, the notebook will be opened in your default browser.

To change the current line as comment

Ctrl + /   (this will change the current line in to a comment. To convert multiple lines of code in to a comment, select the lines that you want to convert and then hit Ctrl + /

Running different programs in Jupyter-Notebook

You can run Bash comments in jupyter-notebook. In any cell, type %%bash then that shell can be used to to bash comments. Similarly, other programming languages also can be run. A detailed post will be written on this topic.   

E-Book Reader

Now, the e-books are published more often with .epub format. To read the e-book in linux, install fbreader.

To install in Ubuntu,

sudo apt-get install fbreader




A simple way to create a quantum entangled state? Take a deep breath.

Reversible adsorption of CO and O2 molecules with heme is an important process taking place in our body. Using a DFT+DMFT study, researchers have revealed that to describe this interaction, one need to include strong correlation effects. This strong correlation effect comes from the transition metal 'iron'. The original study is by Cédric Weber titled "Importance of Many-Body Effects in the Kernel of Hemoglobin for Ligand Binding and published in prestigious Physics journal PRL.

The associated news is:

"Take a deep breath, you just created a quantum entangled state!"



(to be updated)

Compressing using Zip package in Linux

To zip individual files:

zip Figures.zip Figure1 Figure2 Figure3

To zip a directory:

zip -r Figure.zip DirName

To unzip:

unzip Figures.zip

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...