I need to rotate the protein structure(from PDB) using java and the result can be seen via Jmol visualizer.
Also, I need to open 2 structures in the same visualizer to see the rotation of one structure on top of one another to calculate the RMSD. How do I get about to that?
You can automatically rotate the proteins on a JMol applet embedded in your web page using the "spin" command which renders a continuous rotation. You can implement this easily by using the Jmol.js JavaScript library
To visualized the superimposed structures on JMol you have two options:
Load 2 structures to JMol and perform RMSD calculation for your structures and provide the results. I heard RMSD calculation is possible using JMol, but I have not yet tried this option. You could take a look at the JMol scripting options for more information about the RMSD calculation using JMol.
Use an external program (there are many programs available, you can write on your own using BioJava or for an example you could look at a python implementation here)to calculate the RMSD and load the superposed structures to your JMol window.
I think the second option is more feasible, as I am afraid the performance of JMol depends upon the JVM settings and it may not be a good idea to superimpose structures at the client-side.
Thank you for your comment! I'm using an external program(jcreator) to write my own program and I'm having problems writing it because I'm very new to the world of Java.
AFAIK, JCreator is a IDE for Java. Not sure how this is affecting the integration with JMol. Please post specific issues, so that some of us can provide feedback.
Is Biojava a software by itself? What does it do? Because when I run it with Jcreator, it doesn't exists. Thank you for the link!
Biojava is a library that is used to build programs, not an application in itself.