qmcurrents / gimic

Gauge-including magnetically induced currents.
https://gimic.readthedocs.io
GNU General Public License v2.0
28 stars 19 forks source link

How to generate gimic.inp from gaussian optimized files and how to make paraview file from gimic results #233

Closed SKumar1208 closed 5 years ago

SKumar1208 commented 5 years ago

Hii... I have .log and .chk files optimized from Gaussian 09. Plz, tell me how can I make GIMIC input file from this. In addition plz, also tell me whether the only optimization is required or some different calculation is also required to make GIMIC input file and only GIMIC.inp is required or some other files required to run the calculation. I have to visualize current density plot. Plz, give an example file so that I can make the files. Since I was not able to install bash script. I will make gimic.inp manually and run. The next thing is that how can I run the gimic results to visualize current density using paraview?

heikef commented 5 years ago
  1. regarding the bash scripts contact @mariavd
  2. generating gimic input files from Gaussian: read the manual https://gimic.readthedocs.io/en/latest/usage.html#running-gaussian
  3. needed gimic input files: XDENS + MOL + gimic.inp (this is the one you have to generate yourself)
  4. read the manual https://gimic.readthedocs.io/en/latest/usage.html#running-gimic
  5. Paraview: read the manual https://gimic.readthedocs.io/en/latest/interpretation.html
  6. check the examples + test directory for input files
  7. try to reproduce some examples first
  8. watch the youtube videos we refer to in the manual
  9. do not loose patience - you are on a good way
heikef commented 5 years ago

when you want to use the interactive bash scripts you need also a coordinate file in the same directory coord.xyz in Angstrøm when I remember correctly

https://gimic.readthedocs.io/en/latest/scripts.html

patrashantigopal commented 5 years ago

Hi,

Heikef has described all the steps systematically but for your convenience If you want to make input file manually then follow the simple steps: 1) Copy the input file from the benzene example. 2) Change the indices of the bond along which you want to integrate. 3) distance = half of the bond distance in Bohr unit. 4) Inside distance is the distance between the centroid and midpoint of the bond under consideration. 5) Change the fixed atom indices. 6) Do not add any coordinate to the atom indices. Still, you will get the same result.

SKumar1208 commented 5 years ago

Hii.. Thanks for your help. Now I am able to run the calculations. I am getting four files as output ( gimic.out, jvec.vti, grid.xyz and mol.xyz) for close cell calculations. Plz, tell me whether am I right. As I am new learner of linux. I could not understand "how to convert the molecular coordinates to CML format and bohr units. Plz, tell me stepwise. It will be very helpful.

heikef commented 5 years ago

Download the Avogadro program and install it. Read in the xyz file and save it as cml file. Then convert the cml file to bohr. Alternative conversions are documented here, eg using open babel. https://gimic.readthedocs.io/en/latest/scripts.html

heikef commented 5 years ago

Assuming you have a file called mol.cml and you want to convert it to mol-bohr.cml you can use this command:

awk '{ {FS="\""}; {OFS="\""}; if ($1 ~ "<atom id") {print $1, $2, $3, $4, $5, $6/0.526, $7, $8/0.526, $9, $10/0.526, $11 } else print $0; }' mol-bohr.cml

SKumar1208 commented 5 years ago

Thanks. I have Avagadro. I have changed it to cml. But how I will change this in to "bohr" I dont have Idea Plz, tell me. I want to make " see the attached file" figure and integrated analysis from paraview. I am not able to regenerate this from the examples. plz, give me stepwise information so that I can make this figure for my molecule. Thank you so much

SKumar1208 commented 5 years ago

Hiii... Thank you so much. Now I am able to make these files. Plz, give me stepwise information to plot this "attached figure" figure and integration analysis. Since I am trying to make this. my .vti file is not blank and I a, getting this. "see the attached figure. jvec-2d-paraview 11

heikef commented 5 years ago

Nice! You managed to get one step further. Well done!

Did you work through the benzene example ? https://github.com/qmcurrents/gimic/tree/master/examples/benzene

  1. for plots use the "cdens" module
  2. for integration analysis use the "integral" module

-practice first placing the correct integration plane and then do a stepwise / slice integration -depending on the problem you want to solve setting one plane might be sufficient, but more accurate results are achieved doing what we cal the slicing procedure https://gimic.readthedocs.io/en/latest/scripts.html https://gimic.readthedocs.io/en/latest/interpretation.html

SKumar1208 commented 5 years ago

Yes, I have tried but I am getting the same as for this sample. Plz, tell me about paraview keywords step wise like ist I will open jvec.vti then bohr and by selecting .vti what should I have to click to see vectors as I this "attached figure" . I have tried a lot but not getting. Since I have to submit my paper with this current density visual figure and integral analysis very soon. Sorry for asking many things. Plz, help me. Is it ok to take gimic.inp of benzene both 2D and 3D to run my sample using mol and xdense files of my compound.

On Sun, Apr 14, 2019 at 8:50 PM Heike Fliegl notifications@github.com wrote:

Nice! You managed to get one step further. Well done!

Did you work through the benzene example ? https://github.com/qmcurrents/gimic/tree/master/examples/benzene

  1. for plots use the "cdens" module
  2. for integration analysis use the "integral" module

-practice first placing the correct integration plane and then do a stepwise / slice integration -depending on the problem you want to solve setting one plane might be sufficient, but more accurate results are achieved doing what we cal the slicing procedure https://gimic.readthedocs.io/en/latest/scripts.html https://gimic.readthedocs.io/en/latest/interpretation.html

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/qmcurrents/gimic/issues/233#issuecomment-482997406, or mute the thread https://github.com/notifications/unsubscribe-auth/Aut1FBf799vSxBNepkJ59Ff4divxpIO-ks5vg0cigaJpZM4cpzT4 .

-- Sincerely, ------------------------------------------------- Dr Sharvan Kumar

Research AssociateChemical Engineering and Chemistry Indian Institute of Technology, DelhiNew Delhi 110016

heikef commented 5 years ago

Just to understand you correctly: you managed to run a 3D gimic calculation, right? And now you try to visualize it with paraview?

heikef commented 5 years ago

So you have a mol-bohr.cml file and jvec.vti in your folder. I am using paraview version 5.6.0.

SKumar1208 commented 5 years ago

Yes, but I have used gimic.inp of benzene molecule without any further change and I have used Mol and Xdens file of my molecule. Plz, see these files and let me know what is wrong in these files. Why I am not getting the results? XDENS https://drive.google.com/file/d/1j7x9_sYeRhx9NCImzEQ_9MiFHpSU-ZuL/view?usp=drive_web

On Sun, Apr 14, 2019 at 9:35 PM Heike Fliegl notifications@github.com wrote:

Just to understand you correctly: you managed to run a 3D gimic calculation, right? And now you try to visualize it with paraview?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/qmcurrents/gimic/issues/233#issuecomment-483006562, or mute the thread https://github.com/notifications/unsubscribe-auth/Aut1FIcM_X2CD2LrAVMT_3uhgl0V_a9Lks5vg1G4gaJpZM4cpzT4 .

-- Sincerely, ------------------------------------------------- Dr Sharvan Kumar

Research AssociateChemical Engineering and Chemistry Indian Institute of Technology, DelhiNew Delhi 110016

patrashantigopal commented 5 years ago

To get the picture first you need to load the state file (.pvm) which you can copy from the benzene example 2D/3D folder, then you should choose the .vti file.

heikef commented 5 years ago

I included a new paraview state file into the benzene 3D example folder. You have to make sure that mol-bohr.cml and jvec.vti are in the same folder. Then you open the state file (*.pvsm) the ending .in means input file. You can just move it to pvsm. "mv file.pvsm.in file.pvsm". You can load this into paraview by clicking on: file -> load state

The 2D picture you are after has in former times been obtained by an extra 2D calculation. Meanwhile it is possible to do a big 3D calculation and use the slice tool of paraview to place the plane exactly where you want it to be. So you can change the distance to the molecular plane as you like.

SKumar1208 commented 5 years ago

Sorry to bother you, Plz, tell me how can I change this .pvsm.in file to .pvsm because when I am going to paraview - file load state ( this .pvsm.in file is not comming). For your information. I have installed paraview in windows 10 and at this moment I am working on that. Although I have installed git bash. so I think I can make it here. If not plz tell me.

On Sun, Apr 14, 2019 at 10:16 PM Heike Fliegl notifications@github.com wrote:

I included a new paraview state file into the benzene 3D example folder. You have to make sure that mol-bohr.cml and jvec.vti are in the same folder. Then you open the state file (*.pvsm) the ending .in means input file. You can just move it to pvsm. "mv file.pvsm.in file.pvsm". You can load this into paraview by clicking on: file -> load state

The 2D picture you are after has in former times been obtained by an extra 2D calculation. Meanwhile it is possible to do a big 3D calculation and use the slice tool of paraview to place the plane exactly where you want it to be. So you can change the distance to the molecular plane as you like.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/qmcurrents/gimic/issues/233#issuecomment-483014794, or mute the thread https://github.com/notifications/unsubscribe-auth/Aut1FMik22di6Z27S-bHpijUhDm2Xhrgks5vg1tjgaJpZM4cpzT4 .

-- Sincerely, ------------------------------------------------- Dr Sharvan Kumar

Research AssociateChemical Engineering and Chemistry Indian Institute of Technology, DelhiNew Delhi 110016

heikef commented 5 years ago

You have to rename it. In unix you use the command move like:

mv file.pvsm.in file.pvsm

Paraview reads in file.pvsm we called it file.pvsm.in to stress that this is an input file. Sorry for the confusion. Perhaps you can just rename it under windows?

patrashantigopal commented 5 years ago

Yah renaming works well.

heikef commented 5 years ago

My pull request is not granted yet. Let's assume you have jvec.vti and mol-bohr.cml in the same directory.

  1. open paraview file -> open mol-bohr.cml
  2. file -> open jvec.vti
  3. add filter slice -> you will see a plane which you can move -> click on z to align it in z direction
  4. add filter glyph -> you have to click on glyph arrow and then no scaling + vector in case the vectors are not oriented
patrashantigopal commented 5 years ago

I included a new paraview state file into the benzene 3D example folder. You have to make sure that mol-bohr.cml and jvec.vti are in the same folder. Then you open the state file (*.pvsm) the ending .in means input file. You can just move it to pvsm. "mv file.pvsm.in file.pvsm". You can load this into paraview by clicking on: file -> load state

The 2D picture you are after has in former times been obtained by an extra 2D calculation. Meanwhile it is possible to do a big 3D calculation and use the slice tool of paraview to place the plane exactly where you want it to be. So you can change the distance to the molecular plane as you like.

But for the slice plot we need the 3D-LIC.pvsm file as the state file. Am I right?

heikef commented 5 years ago

you can also adapt this one

heikef commented 5 years ago

I prepared this one for you: https://github.com/qmcurrents/gimic/blob/master/examples/benzene/3D/jvec-state-file.pvsm.in Not super fancy but you can get started with this. Then you have to do the fine tuning yourself. Look also into the paraview manual.

patrashantigopal commented 5 years ago

This works perfect. pyrrole-jvec-plot

patrashantigopal commented 5 years ago

Try @SKumar1208 .It will work.

SKumar1208 commented 5 years ago

Hiii... exactly, I need this type of figure. I have tried and got this result (attached figure ss.png). In addition when I tried to do this, after load state it was asking (load state data file option for which I have chosen search file under specific directory) it was showing some error (capture file) no representation was found with name: surface LIC atomic radius type set to custom array radius, but no array name "radii" found in input vertex. Plz, tell me what should I have to do. Thanks

On Sun, Apr 14, 2019 at 11:21 PM patrashantigopal notifications@github.com wrote:

This works perfect. [image: pyrrole-jvec-plot] https://user-images.githubusercontent.com/46942514/56096959-10f13400-5f0c-11e9-87e6-704febd36179.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/qmcurrents/gimic/issues/233#issuecomment-483028423, or mute the thread https://github.com/notifications/unsubscribe-auth/Aut1FDOJH25yyEbGYeRcOGdli6FmX__aks5vg2q4gaJpZM4cpzT4 .

-- Sincerely, ------------------------------------------------- Dr Sharvan Kumar

Research AssociateChemical Engineering and Chemistry Indian Institute of Technology, DelhiNew Delhi 110016

patrashantigopal commented 5 years ago

Follow the steps:

1) Download the jvec-state-file.pvsm file from example/benzene/3D (you can get it in Github). 2) Keep your mol-bohr.cml, jvec.vti and jvec-state-file.pvsm in the the same folder. 3) Open Paraview. 4) From the file option load the jvec-state-file.pvsm. Then in the pop-up, it will ask for the mol-bohr.cml and jvec.vti file. 5) Select those files by browsing in the proper folder. 6) Then click OK. 7) Then in the left, there is a pipeline browser panel. There you have four options. Among them just click on the Glyph 1. 8) Then in the down go to the active attributes. There in the vector option change none to vector. 10) You can change the color and width of the arrows (just try to play with it using different options you will learn a lot of things by yourself). 10) That's it hope you will get the picture. Good luck!

SKumar1208 commented 5 years ago

Dear Patrashantigopal, Thank you so much for your help. I have followed your instructions. However, could not generate the figures. Plz, see the attached (capture figure) I am not seeing any vector option. I am sending you the files, plz, see and if possible generate the figures and tell me the instructions on what to do. I have three more molecules (same type) and I have to visualize current density and I have also to do integration analysis. It will be very helpful to me. Thank you. XDENS https://drive.google.com/file/d/19PuMhHM4gik858Oc3lnIgjGEnPCoZX5f/view?usp=drive_web

On Mon, Apr 15, 2019 at 12:19 AM patrashantigopal notifications@github.com wrote:

Follow the steps:

  1. Download the jvec-state-file.pvsm file from example/benzene/3D (you can get it in Github).
  2. Keep your mol-bohr.cml, jvec.vti and jvec-state-file.pvsm in the the same folder.
  3. Open Paraview.
  4. From the file option load the jvec-state-file.pvsm. Then in the pop-up, it will ask for the mol-bohr.cml and jvec.vti file.
  5. Select those files by browsing in the proper folder.
  6. Then click OK.
  7. Then in the left, there is a pipeline browser panel. There you have four options. Among them just click on the Glyph 1.
  8. Then in the down go to the active attributes. There in the vector option change none to vector.
  9. You can change the color and width of the arrows (just try to play with it using different options you will learn a lot of things by yourself).
  10. That's it hope you will get the picture. Good luck!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/qmcurrents/gimic/issues/233#issuecomment-483039277, or mute the thread https://github.com/notifications/unsubscribe-auth/Aut1FE5a7SUisyMqRvFZjQI0HwtY6bQBks5vg3hEgaJpZM4cpzT4 .

-- Sincerely, ------------------------------------------------- Dr Sharvan Kumar

Research AssociateChemical Engineering and Chemistry Indian Institute of Technology, DelhiNew Delhi 110016

patrashantigopal commented 5 years ago

Send me the MOL and XDEN file in my email id: patrashantigopal@gmail.com

bast commented 5 years ago

Super cool that you are helping out!

patrashantigopal commented 5 years ago

now he can do it by himself. you can close the issue.

bast commented 5 years ago

Thanks! Closing.