Search This Blog

Thursday, January 21, 2016

Eating healthy: quick and easy

This blog is going to be on "How to Eat Healthy?". Along with eating healthy, adding a couple of minutes of "most effective" exercises can bring magically beneficial effects on our bodies. I will write about it soon.

Currently I am just collecting interesting videos from the web. Later on I will extract the important points from those and create a compact informative blog for you, well basically for me for future references.


Why 'No' sugar, no carbs?
https://www.youtube.com/watch?v=SZeLI2DYzeM

Then what to eat?
https://www.youtube.com/watch?v=qByjiXsxrmc

What effect a short exercise session can bring you?
https://www.youtube.com/watch?v=cIpo9_Fh8oE

Geant4 on Windows 7

 Introduction

I assume that, like me, at this stage you also have no idea how to install Geant4.
In this blog I will mention what softwares you will need before hand? how to obtain and install those? And then how to install Geant4.

Geant4 is well tested on 32bit packages, therefore I am installing the below mentioned packages of 32bit.

Stage-1
Necessary Softwares you will need to install before going about Geant4 installation -

         1] Visual Studio 2010 (or higher):
         The installation is pretty straight forward. However note that its a commercial software. Ask your institution if they can obtain the license for you.

         2] Qt4.8.6 :
         Obtain the windows installer from qt-project site archive. Easy clicks installation.
       
         3] Cmake (32bit):
          http://www.cmake.org/download/  Easy clicks installation. While installation, make sure you tic mark to "add path to PATH variable".


Stage-2
Softwares required prehand to have optional components of Geant4 -

Strongly recommended to install through binary .exe installers if possible.

           1] GDML support: GDML means Geometry Data in XML format
So, you can decide, if you want to have GDML support then you need to first install -
Binary distribution for Xerces-C++ headers and library. Xerces-C++ makes it easy to give your application the ability to read and write XML data.
In Simple steps:
         (1) Download the correct zip file as per (a) 32bit (32bit is well tested for Geant4) and (b) the Visual Studio version (2010) you have installed.
         (2) Unzip the file. Move it to any other location where you will not touch it.
         (3) Go to /bin folder within it, and copy the full path to /bin folder like -
C:\xerces-c-3.1.1-x86-windows-vc-10.0\bin
         (4) Open Windows explorer and type path variable , click on change environment variables for system
         (5) Locate PATH variable and click on edit. At the end of the values put a ; and paste the copied path here.
Done!

Download page - http://xerces.apache.org/xerces-c/download.cgi
Installation instructions - http://xerces.apache.org/xerces-c/install-3.html#Windows

         2] OpenGL headers and library: You need this for visualization tools. Most probably on the latest laptops and computers the OpenGL is already installed with the appropriate graphics drivers by Microsoft.

Stage-3
Building and installing Geant4 on Windows

Follow the procedure mentioned here -

http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch02s02.html

Tips:
           1] Under the parent Geant4 folder which contains the folder "geant4_10_00_p03" source,  create three more folders - "geant4_10_00_p03-build", "geant4_10_00_p03-install", and "geant4_10_00_p03-DATA"

           2] In Cmake-gui
                  Check on :

                Name                  Value

               CMAKE_INSTALL_PREFIX = path/to/Geant4/geant4_10__00_p03-install

               GEANT4_INSTALL_DATA : Selected
               GEANT4_INSTALL_DATADIR : path/to/geant4_10_00_p03-DATA

               GEANT4_USE_GDML : Selected
               GEANT4_USE_OPENGL_WIN32 : Selected

               GEANT4_USE_QT : Selected

And follow the above procedure.

            3] When opening the Visual Studio, open it as Administer.


            4] You may also use Rapid Environment Editor to create the new Geant4 related environment variable neatly.

It gives - ERROR LNK2019
Build failed.



Monday, November 30, 2015

Install Geant4 on Ubuntu 14.04: Packages needed beforehand

 Packaged need on Ubuntu 14.04 before installing Geant4


After some failed attempts of intalling Geant4 on windows 7, I though I would give it a try on Ubuntu.


 Ubuntu on Windows 7:

For that I first installed Virtual Box on windows 7.
Inside Virtual box I installed Ubuntu 14.04

Ubuntu Packages list for Geant4:

Most of these packages were installed through Synaptic package manager on Ubuntu14.04, because it handles the dependencies/installation in a better way. If not, then from apt-get.

1. g++-4.9
2. Make
3. Cmake-2.8
4. Xerces-c++

5. Opengl
6. Qt4.8
7. motif UI
8. x11
9. libxmu-dev
10. libxmu-header

Installation procedure

The detailed procedure is very well described in the Geant4 installation manual. Here, I assume that you already have gone through it or have it open alongside. Also, that you have already downloaded the Source code folder and all the Data files.

Before I start installation, this is the folder structure created as below, as a cleaner way of working.

Geant4 (Parent folder created by me. Inside this I placed everything related to Geant4)
|--- geant4_10_01_p02-Source (This is the unzipped source code folder renamed)
|--- geant4_10_01_p02-Install (Created by me. This will contain the Geant4 install)
|--- geant4_10_01_p02-Data (Created by me. This will contain all the Geant4 Data you have downloaded and unzipped)
|--- geant4_10_01_p02-Build (Created by me. This will contain the Geant4 build)
|--- geant4_10_01_p02-WorkDir (Created by me. This will contain all of my work examples)


Instructions:


cd Geant4/geant4.10.01.p02-Build/

cmake -DCMAKE_INSTALL_PREFIX=path/to/geant4.10.01.p02-Install -DGEANT4_USE_SYSTEM_EXPAT=OFF -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_QT=ON -DGEANT4_USE_RAYTRACER_X11=ON -DGEANT4_INSTALL_DATADIR=path/to/geant4.10.01.p02-Data path/to/geant4.10.01.p02-Source

make -j2

make install


Done!




Thursday, November 13, 2014

Latex on Windows 7

1. Introduction

There are many Texing ways for Windows 7, however I prefer the robust combination of TexLive + Texmaker. Keep reading to know what are these two peaces.

       1.   TexLive is an underlying Latex distribution. Its a Tex rendering machinery. 
       2.   Texmaker is a just an front-end Tex editor. Texmaker gives you a user friendly GUI experience for creating Tex documents. Texmaker can not work without an underlying Latex distribution pre-installed. 

I prefer TexLive over MikTex, mainly because TexLive is well tested (and rebust) on multiple platforms (OS X, Linux, Windows). From my previous work on OS X, I had several documents processed with TexLive distribution for Mac OS and I did not want to debug those files (for missing packages, package compatibility issues if I had to switch to MikTex) again.

2. Installation

Installation is very easy "click-click" work, although it takes several minutes.

1. FIRST Download and install LexLive latest Windows installer file - 

2.   Texmaker installer file from the official webpage - http://www.xm1math.net/texmaker/download.html

If the original download links are broken then try alternate links mentioned on above webpage itself. Avoid downloading from other sites, since they might pack the installation file up with malwares or adwares.

Thats it!

Friday, January 3, 2014

Why you will fail to have a great career.

     
       If you think - "Having a great career is not my cup of tea, one has to be born intelligent for that", then you are absolutely wrong. Learning new skills (e.g., to drive a car, playing chess strategically, playing piano fluently, solving large integrals intuitively, etc.) merely requires establishing new neural-connections inside our brain! To establish a first simple connection requires a lot of efforts. Once established, to reinforce the connections even stronger requires practise. However, our ability in  establishing such connections is heavily controlled by our emotions at a certain given time. These emotions also constantly override our priorities momentary and may lead to a gap between what we achieve and what we are capable to achieve.

In the following famous talk by ..., he asks this question - "Why you will fail to have a great career" in an effective way and wish you find the answer!


Thursday, December 26, 2013

Tips for installing Geant4.10.00

Hello Friends,

1. Introduction

You must have already had a look at the Geant4-Installation-Guide  -

       1.   http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/fo/BookInstalGuide.pdf

 on Geant4 webpage -

       2.   http://geant4.web.cern.ch/geant4/

While installing on my system, sure enough I realized that I need more help with my installation to overcome some of the problems faced. Therefore I am creating this help-page for my own future reference and also to help people with similar platform installing for the first time.

NOTE: This help-page is NOT self-sufficient and just a supplementary to the above Installation-Guide document.

2. Specifications of my OS/Machine

  1. MacBook pro 13" (mid-2009): 2.26 GHz Intel Core 2 Duo,    Ram 4 GB, DDR3, 1067 MHz
  2. OS X: 10.9.1 (13B42)  Mavericks
  3. Command line terminal: Bashrc 
 3. Basic necessary Pre-installations
(IMPORTANT FOR GEANT4 INSTALLATION)

  • Xcode and command line tools : 
    1. From the installation disk/CD or
    2. Apple App-store or
    3. Macports webpage - http://www.macports.org/install.php
    4. If you have already installed Xcode but not the command line tools, install it by running following command from a terminal => xcode-select --install
  • XQuartz/X11 : 
    1. From the installation disk/CD or
    2. Apple App-store
  • Cmake -GUI (Optional): This provides a GUI to build and install the Geant4 source code. Basically for the steps mentioned in Chapter 2 of the Geant4-Installation-Guide.
  • Macports (Darwin ports) : Obtain a .dmg file from - http://www.macports.org/install.php.  Using Mac ports install the following ports from command line terminal (e.g. sudo port install packagename) -
    1. Qt4-mac
    2. Cmake
    3. Clang
    4. Xercesc
    5. Openmotif
    6. Boost
4. Installation of Geant4

  • Under a general name Geant4-all, create 3 different directories.
    1. Geant4-all/Geant4_10_00 (This contains Source code)
    2. Geant4-all/Geant4_10_00-Build (This will contain build, unix executable makefiles)
    3. Geant4-all/Geant4_10_00-Install (This will contain the installation files - bin, lib, share etc.)
  • Along with these folders also create a text file named as mySettings.cmake (i.e. at location Geant4-all/mySettings.cmake) containing following lines
set(CMAKE_INSTALL_PREFIX /Users/jaydeep/activity/GEANT4-all/Geant4_10_00-Install CACHE STRING "")
set(CMAKE_INSTALL_BINDIR /Users/jaydeep/activity/GEANT4-all/Geant4_10_00-Install/bin CACHE STRING "")
set(CMAKE_INSTALL_INCLUDEDIR /Users/jaydeep/activity/GEANT4-all/Geant4_10_00-Install/include CACHE STRING "")
set(CMAKE_INSTALL_LIBDIR /Users/jaydeep/activity/GEANT4-all/Geant4_10_00-Install/lib CACHE STRING "")
set(CMAKE_INSTALL_DATAROOTDIR /Users/jaydeep/activity/GEANT4-all/Geant4_10_00-Install/share CACHE STRING "")
set(MOTIF_INCLUDE_DIR /opt/local/include CACHE STRING "")
set(MOTIF_LIBRARIES /opt/local/lib/libXm.dylib CACHE STRING "")
set(OPENGL_X11_INCLUDE_DIR /opt/X11/include/GL CACHE STRING "")
set(OPENGL_X11_gl_LIBRARY /opt/X11/lib/libGL.dylib CACHE STRING "")
set(OPENGL_X11_glu_LIBRARY /opt/X11/lib/libGLU.dylib CACHE STRING "")
set(GEANT4_USE_XM ON CACHE BOOL "")
set(GEANT4_USE_OPENGL_X11 ON CACHE BOOL "")
set(GEANT4_USE_RAYTRACER_X11 ON CACHE BOOL "")
set(GEANT4_INSTALL_DATA ON CACHE BOOL "")
set(GEANT4_USE_GDML ON CACHE BOOL "")
set(GEANT4_USE_QT ON CACHE BOOL "")
set(GEANT4_USE_USOLIDS ON CACHE BOOL "")
set(GEANT4_BUILD_EXAMPLES OFF CACHE BOOL "")
  • Save and close this file.
  • From terminal goto the Build directory
cd  Geant4-all/Geant4_10_00-Build
  • and run cmake command as below. This will create the Unix executable files for installation.
cmake -C /Users/jaydeep/activity/GEANT4-all/mySettings.cmake /Users/jaydeep/activity/GEANT4-all/Geant4_10_00
  • then run-   make -j1 VERBOSE=1
  • then run-   make install
  • This should install the Geant4 with the above specified options without error. 
  • You can also perform above steps using a graphical user interface for Cmake i.e. Cmake -GUI, if you have it installed.                     
====================================================================
***** NOTE the variable declared ***** 
  • Cmake vaiables
    • INSTALL variables (are explicitly declared to avoid mess with other system packages):
      1. CMAKE_INSTALL_PREFIX=/Users/jaydeep/activity/GEANT4-all/Geant4_10_00-Install 
      2. CMAKE_INSTALL_BINDIR=/Users/jaydeep/activity/GEANT4-all/Geant4_10_00-Install/bin
      3. CMAKE_INSTALL_INCLUDEDIR=/Users/jaydeep/activity/GEANT4-all/Geant4_10_00-Install/include
      4. CMAKE_INSTALL_LIBDIR=/Users/jaydeep/activity/GEANT4-all/Geant4_10_00-Install/lib
      5. CMAKE_INSTALL_DATAROOTDIR=/Users/jaydeep/activity/GEANT4-all/Geant4_10_00-Install/share
    • FOR Motif (these variables declared because usual Geant4 installation failed to locate the files. Find the correct location on your system and replace it below):
      1. MOTIF_INCLUDE_DIR=/opt/local/include (contains - /Xm/Xm.h)
      2. MOTIF_LIBRARIES=/opt/local/lib/libXm.dylib
    • FOR OpenGL (these variables declared because usual Geant4 installation failed to locate the files. Find the correct location on your system and replace it below):
      1. OPENGL_X11_INCLUDE_DIR=/opt/X11/include/GL (contains gl.h)
      2. OPENGL_X11_gl_LIBRARY=/opt/X11/lib/libGL.dylib
      3. OPENGL_X11_glu_LIBRARY=/opt/X11/lib/libGLU.dylib
  • Geant4 variables
    1. GEANT4_USE_XM=ON
    2. GEANT4_USE_OPENGL_X11=ON
    3. GEANT4_USE_RAYTRACER_X11=ON
    4. GEANT4_INSTALL_DATA=ON 
    5. GEANT4_USE_GDML=ON
    6. GEANT4_USE_QT=ON
    7. GEANT4_USE_USOLIDS=ON
    8. GEANT4_BUILD_EXAMPLES=OFF
  • Done! See Chapter 3 of the Geant4-Installation-Guide for further procedure.

These variables are declared because the 'cmake' command without these variables failed to find - (1) OpenGL dir and lib (2) Motif dir and lib, which are necessary for GEANT4_USE_XM=ON and GEANT4_USE_OPENGL_X11=ON.
 ====================================================================



5.  Setting up the environment

Once the installation is done successfully, we can go ahead to run a basic test example. But before that we need to initialise Geant4 environment.

Purely for a personal choice of having an uncluttered, clean and tidy environment for Geant4 work projects, I created another folder under Geant4-All called G4-WorkDIR.
Then my geant4 parent directory Geant4-All looks like this - 

> cd Geant4-All
> ls
G4-WorkDIR/
Geant4_10_00/
Geant4_10_00-Build/
Geant4_10_00-Install/
mySettings.cmake


**** THIS SECTION IS INCOMPLETE......








Saturday, November 24, 2012

Power of words: Tips for scientific writing: Proposal, SoP, Cover Letter, CV

Here are some words from by boss, I am sharing.

I write a sentence and then re-read the sentence and replace words with stronger words. I sometimes change the order of the sentence so that the strongest bit or punch comes first.

Then I write the next sentence and re-read it, replace words with stronger-sounding words, and so on.  I have a few strong words that I try to include in every proposal to make it sound more important and exciting.

I alternate the strong words around so I am not saying the same word too much.

These strong words are:  significant, strong/strongly, critical, crucial, solid, important, substantial, key, and essential.
Linking words like - address, understand, link, and interplay are good too.

So for example, I might start by writing:

"We believe that our workshop needs to be separate to discuss the controversies in this field".

The I change/add strong words:

"We strongly believe that our workshop needs to be separate to address the important and exciting controversies in this field"

Then I note that "this field" is a bit weak so I change it to:

"We strongly believe that our workshop needs to be separate to address the important and exciting controversies in the interplay between AGN, star
formation and galaxy evolution"


Then I change the order of the sentence around so that our workshop description (the strongest bit) comes first:

"To address the important and exciting controversies in the interplay between AGN, star formation and galaxy evolution, we strongly believe that we require a separate workshop"

Then I start the next sentence and do the same thing.  It sounds like it would take a lot of time, and it used to take some time, but after doing a few proposals (telescope proposals, job proposals), it gets very fast.