Author Topic: molecular display  (Read 10733 times)

0 Members and 5 Guests are viewing this topic.

Offline jose gonzalez

  • ZX 81
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
molecular display
« on: February 12, 2012 »
I am trying to do a display molecular of pdb files in opengl  any idea?

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: molecular display
« Reply #1 on: February 12, 2012 »
Do you want to read data from the pdb files?

What features of the molecule do you want to display?
You are our 9001st visitor.
Challenge Trophies Won:

Offline jose gonzalez

  • ZX 81
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: molecular display
« Reply #2 on: February 13, 2012 »
Do you want to read data from the pdb files?    yes

What features of the molecule do you want to display? atoms and  bonds (single, double and triple).  I am a teacher of chemistry in a high school in Mexico.  I want to make a program to display the molecules. I know there are programs that make it, but i want to do for myself.
I did one last weeks in borland C++ Builder but i want some ideas to add it.  My program rotate and zoom the molecule using the right and left mouse and display information about the molecule.

I am sorry for my english (I only speak spanish     >>>>  solo hablo espanol ) and i learn to make programs by selfteaching (autodidacta)   I added a attachment of a captured image of my program

Thanks
   

Offline jose gonzalez

  • ZX 81
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: molecular display
« Reply #3 on: February 13, 2012 »
I forgot to mention than i could do it thanks a code i got from steve cunningham.  The code of Steve works in glut and use the keyboard  but i change it to not use glut and it can mouse and buttons and run in win7.   (GLUT do not run in win7 >>> at least in my computer)

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: molecular display
« Reply #4 on: February 15, 2012 »
My English is quite bad too.

Good to hear that you have found a solution to the problem.

This might not be what you're looking for this time, but I have been developing some animations of chemical reactions in Flash. I have attached the file. If you want me to, I can translate the labels into Spanish.
You are our 9001st visitor.
Challenge Trophies Won:

Offline jose gonzalez

  • ZX 81
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: molecular display
« Reply #5 on: February 16, 2012 »
 combatking0 gracias por tus ideas, de hecho estoy "trabajando" (para mi esto es un pasatiempo ) en este momento en un simulador de los estados fisicos de la materia y tu programa me ha dado una nueva manera de presentarlo. 
El programa display molecular que hice lo estoy mejorando para que tambien abra o lea otros formados como cml y mol, y los enlaces quimicos ya nos los quiero mostrar con
       glBegin(GL_LINE_STRIP);
       glVertex3f(atoms[startindex].x+2*DBGAP,atoms[startindex].y+2*DBGAP,
                  atoms[startindex].z+2*DBGAP);
       glVertex3f(atoms[endindex].x+2*DBGAP,atoms[endindex].y+2*DBGAP,
              atoms[endindex].z+2*DBGAP);
    glEnd();

sino con un cilindro que una dos puntos en el espacio

Offline jose gonzalez

  • ZX 81
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: molecular display
« Reply #6 on: February 16, 2012 »
this is the exe of my program display molecular.  I tried it in my computer in win 7 and works well but i would like to know how work in others computer and windows.    I'll appreciate your help. 
Thanks!!!


    >>>>> mas adelante ya subi la version mejorada que incluye el uso de gluCylinder    !!!!!!!!
« Last Edit: February 27, 2012 by jose gonzalez »

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: molecular display
« Reply #7 on: February 16, 2012 »
That's an impressive program. It runs well on my Windows XP laptop, with a 2.6GHz P4 Processor and 512MB of RAM.

It runs faster in Sticks Only mode, but my laptop is old. It will run faster on a newer computer, I'm sure.

I'm afraid I don't know anything about Freebasic, but your code looks like it works.

With your permission, I would like to show your program to our Science department - I work in a school, but I am not a teacher.

If you would like me to add any reactions to my program, please let me know, and I will update it.
You are our 9001st visitor.
Challenge Trophies Won:

Offline jose gonzalez

  • ZX 81
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: molecular display
« Reply #8 on: February 17, 2012 »
My program was made in C++ , not in Freebasic

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: molecular display
« Reply #9 on: February 18, 2012 »
My fault - I hadn't read the third post fully.

Either way, it's a nice program which illustrates molecules in an easy to understand way.
You are our 9001st visitor.
Challenge Trophies Won:

Offline jose gonzalez

  • ZX 81
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: molecular display
« Reply #10 on: February 20, 2012 »
this is the exe of my program display molecular.  I tried it in my computer in win 7 and works well but i would like to know how work in others computer and windows.    I'll appreciate your help. 
Thanks!!!


    >>>>> mas adelante ya subi la version mejorada que incluye el uso de gluCylinder    !!!!!!!!

>>>> captured images of my progam DisplayMolecular in http://www.prepafdza1.com/jngv/jngv.html
« Last Edit: February 27, 2012 by jose gonzalez »

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1217
  • Karma: 230
    • View Profile
    • Homepage
Re: molecular display
« Reply #11 on: February 20, 2012 »
Cool program Jose, looks great!  :clap:

It would be cool to visualise some reactions as well like CK0's program.
www.kirl.nl
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: molecular display
« Reply #12 on: February 20, 2012 »
3D reactions would be amazing :o
You are our 9001st visitor.
Challenge Trophies Won:

Offline jose gonzalez

  • ZX 81
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: molecular display
« Reply #13 on: February 21, 2012 »
I would like to build 3D reactions but I must to consider that theory of colisions and of the activate complex to know a reaction mechanism  of inorganic compounds.
And for for biochemical reaction like respiration, we must to understand the steps to convert glucose in CO2   (glucose->hexosaphosphate->triosephosphate->piruvate->CO2)

And the last step to build a 3D model of the reactions.

(I am sorry for my ugly english  I only speak spanish)

I am working in that direction (I am a Chemist).


Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: molecular display
« Reply #14 on: February 21, 2012 »
My program is very simplified, but I could add more detail.

Don't worry about your English - my Spanish is a lot worse by comparison.
You are our 9001st visitor.
Challenge Trophies Won:

Offline jose gonzalez

  • ZX 81
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: molecular display
« Reply #15 on: February 27, 2012 »
This is the new version of my program DisplayMolecular.

Now you can see the links between atoms in two colors
« Last Edit: February 29, 2012 by jose gonzalez »

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: molecular display
« Reply #16 on: February 27, 2012 »
That's quite a difference - may I show this to my Science department?
You are our 9001st visitor.
Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1217
  • Karma: 230
    • View Profile
    • Homepage
Re: molecular display
« Reply #17 on: February 28, 2012 »
Very nice work!
Looks like the pivot point/ center axis for the Cholesterol molecule is a bit off though.

Also the camera rotation is a bit confusing, instead of rotating the model itself, I'd prefer the camera to rotate around it. Meaby you can make it so that the camera rotates around a selected point of the molecule?
www.kirl.nl
Challenge Trophies Won:

Offline jose gonzalez

  • ZX 81
  • *
  • Posts: 13
  • Karma: 1
    • View Profile
Re: molecular display
« Reply #18 on: February 28, 2012 »
There is a problem with the cholesterol molecule, I am trying to fix it. I Downloaded this and the others molecules of internet and I have found (i think ) that there is not a standard about the position of the molecule (with  respect at the center of axis).

And about of rotating the model itself, I'd not prefer the camera to rotate around it because I am building a program about reaction mechanisms and this program is only one part.  Electrophilic addition,
electrophilic substitution and nucleophilic substitution (unimolecular and bimolecular) are the Reaction Mechanisms that i am trying to animate in 3D (It is a project for some weeks).

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1217
  • Karma: 230
    • View Profile
    • Homepage
Re: molecular display
« Reply #19 on: February 28, 2012 »
Looking forward to see it, good luck! :)
www.kirl.nl
Challenge Trophies Won: