Question
2a: Molecular dynamics The data from the simulations (provided by Daniel Spngberg) are stored in three files: coordinates.txt contains 3D coordinates of a number of
2a: Molecular dynamics
The data from the simulations (provided by Daniel Spngberg) are stored in three files: coordinates.txt contains 3D coordinates of a number of atoms, radii.txt contains the radii of these atoms, and connections.txt defines how the atoms are connected to each other.
One way to visualize the molecules is to represent each atom with a sphere with a radius corresponding to the radius of the atom. Some of the atoms have quite similar radii, so to make it easier to distinguish between these we can color-map the spheres depending on their radius. Finally, the connections between the atoms can be made with cylinders. The image to the right show an example of how the result can look (OBS! this is a solution, not the correct solution).
The files we have available is not in a standard format, so we either have to convert our data into the VTK file format or create our own functions for reading the data. Such functions are provided for you in the Python script ReadPoints.py. If you want, you can also download the file molecules.py that contain some hints on how to read the data. When you have read the data you have a vtkPolyData with points/vertices/cells and it is time to start working.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started