visualizing a normal mode vibration of a molecule in mathematica
up vote
10
down vote
favorite
How can I visualize the normal mode vibrations of a molecule in Mathematica?
Something like the gif shown in the following link.benzene b_2u vibrational mode.
I have the XYZ fileben-xyz-file of the benzene molecule and the normal mode coordinates normal-mode.
graphics3d
add a comment |
up vote
10
down vote
favorite
How can I visualize the normal mode vibrations of a molecule in Mathematica?
Something like the gif shown in the following link.benzene b_2u vibrational mode.
I have the XYZ fileben-xyz-file of the benzene molecule and the normal mode coordinates normal-mode.
graphics3d
What software makes the.mode
file? Is there a standard file format for vibrational modes?
– Jason B.
Nov 30 at 21:26
add a comment |
up vote
10
down vote
favorite
up vote
10
down vote
favorite
How can I visualize the normal mode vibrations of a molecule in Mathematica?
Something like the gif shown in the following link.benzene b_2u vibrational mode.
I have the XYZ fileben-xyz-file of the benzene molecule and the normal mode coordinates normal-mode.
graphics3d
How can I visualize the normal mode vibrations of a molecule in Mathematica?
Something like the gif shown in the following link.benzene b_2u vibrational mode.
I have the XYZ fileben-xyz-file of the benzene molecule and the normal mode coordinates normal-mode.
graphics3d
graphics3d
asked Nov 30 at 19:42
sravankumar perumalla
874
874
What software makes the.mode
file? Is there a standard file format for vibrational modes?
– Jason B.
Nov 30 at 21:26
add a comment |
What software makes the.mode
file? Is there a standard file format for vibrational modes?
– Jason B.
Nov 30 at 21:26
What software makes the
.mode
file? Is there a standard file format for vibrational modes?– Jason B.
Nov 30 at 21:26
What software makes the
.mode
file? Is there a standard file format for vibrational modes?– Jason B.
Nov 30 at 21:26
add a comment |
1 Answer
1
active
oldest
votes
up vote
21
down vote
accepted
Using a few undocumented functions that have been discussed here on the stack exchange before,
{atoms, coords} = Import[
"https://www.dropbox.com/s/q3rwpedngv5wbqi/ben.xyz?dl=1",
{"XYZ", {"VertexTypes", "VertexCoordinates"}}
];
mode = Most @ Import[
"https://www.dropbox.com/s/3pjxams7ndr0l7h/19.mode?dl=1", "Table"
];
mode = 100 * mode;
bonds = Graphics`MoleculePlotDump`InferBonds[atoms, coords, 40, 25];
range = Range[-0.5, 0.5, 0.025];
range = Join[range, Reverse @ range];
plot[v_] := ImportExport`MoleculePlot3D[
{
"VertexCoordinates" -> (coords + v * mode),
"VertexTypes" -> atoms, "EdgeRules" -> bonds
}
];
ListAnimate @ Map[plot, range]
When importing the mode file, it returns an empty list as the last element so I need to use Most
to make it a matrix. Then I multiplied it by 100 to convert to picometers. Finally I had to precompute the bonds, because as the molecule moves along the normal coordinate, the atoms could get far enough apart that the bonds wouldn't be detected by MoleculePlot3D
.
Sources:
- Connectivity in a molecule and permutations
- How can I access the internal function that plots a molecule from a formatted XYZ file?
- Visualizing .xyz file in Mathematica
Is there any way to make the List Animate window larger so the image is larger in the simulation?
– Moo
Dec 1 at 13:24
1
You should be able to give anImageSize
option to the plotting function.
– Jason B.
Dec 1 at 14:36
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
21
down vote
accepted
Using a few undocumented functions that have been discussed here on the stack exchange before,
{atoms, coords} = Import[
"https://www.dropbox.com/s/q3rwpedngv5wbqi/ben.xyz?dl=1",
{"XYZ", {"VertexTypes", "VertexCoordinates"}}
];
mode = Most @ Import[
"https://www.dropbox.com/s/3pjxams7ndr0l7h/19.mode?dl=1", "Table"
];
mode = 100 * mode;
bonds = Graphics`MoleculePlotDump`InferBonds[atoms, coords, 40, 25];
range = Range[-0.5, 0.5, 0.025];
range = Join[range, Reverse @ range];
plot[v_] := ImportExport`MoleculePlot3D[
{
"VertexCoordinates" -> (coords + v * mode),
"VertexTypes" -> atoms, "EdgeRules" -> bonds
}
];
ListAnimate @ Map[plot, range]
When importing the mode file, it returns an empty list as the last element so I need to use Most
to make it a matrix. Then I multiplied it by 100 to convert to picometers. Finally I had to precompute the bonds, because as the molecule moves along the normal coordinate, the atoms could get far enough apart that the bonds wouldn't be detected by MoleculePlot3D
.
Sources:
- Connectivity in a molecule and permutations
- How can I access the internal function that plots a molecule from a formatted XYZ file?
- Visualizing .xyz file in Mathematica
Is there any way to make the List Animate window larger so the image is larger in the simulation?
– Moo
Dec 1 at 13:24
1
You should be able to give anImageSize
option to the plotting function.
– Jason B.
Dec 1 at 14:36
add a comment |
up vote
21
down vote
accepted
Using a few undocumented functions that have been discussed here on the stack exchange before,
{atoms, coords} = Import[
"https://www.dropbox.com/s/q3rwpedngv5wbqi/ben.xyz?dl=1",
{"XYZ", {"VertexTypes", "VertexCoordinates"}}
];
mode = Most @ Import[
"https://www.dropbox.com/s/3pjxams7ndr0l7h/19.mode?dl=1", "Table"
];
mode = 100 * mode;
bonds = Graphics`MoleculePlotDump`InferBonds[atoms, coords, 40, 25];
range = Range[-0.5, 0.5, 0.025];
range = Join[range, Reverse @ range];
plot[v_] := ImportExport`MoleculePlot3D[
{
"VertexCoordinates" -> (coords + v * mode),
"VertexTypes" -> atoms, "EdgeRules" -> bonds
}
];
ListAnimate @ Map[plot, range]
When importing the mode file, it returns an empty list as the last element so I need to use Most
to make it a matrix. Then I multiplied it by 100 to convert to picometers. Finally I had to precompute the bonds, because as the molecule moves along the normal coordinate, the atoms could get far enough apart that the bonds wouldn't be detected by MoleculePlot3D
.
Sources:
- Connectivity in a molecule and permutations
- How can I access the internal function that plots a molecule from a formatted XYZ file?
- Visualizing .xyz file in Mathematica
Is there any way to make the List Animate window larger so the image is larger in the simulation?
– Moo
Dec 1 at 13:24
1
You should be able to give anImageSize
option to the plotting function.
– Jason B.
Dec 1 at 14:36
add a comment |
up vote
21
down vote
accepted
up vote
21
down vote
accepted
Using a few undocumented functions that have been discussed here on the stack exchange before,
{atoms, coords} = Import[
"https://www.dropbox.com/s/q3rwpedngv5wbqi/ben.xyz?dl=1",
{"XYZ", {"VertexTypes", "VertexCoordinates"}}
];
mode = Most @ Import[
"https://www.dropbox.com/s/3pjxams7ndr0l7h/19.mode?dl=1", "Table"
];
mode = 100 * mode;
bonds = Graphics`MoleculePlotDump`InferBonds[atoms, coords, 40, 25];
range = Range[-0.5, 0.5, 0.025];
range = Join[range, Reverse @ range];
plot[v_] := ImportExport`MoleculePlot3D[
{
"VertexCoordinates" -> (coords + v * mode),
"VertexTypes" -> atoms, "EdgeRules" -> bonds
}
];
ListAnimate @ Map[plot, range]
When importing the mode file, it returns an empty list as the last element so I need to use Most
to make it a matrix. Then I multiplied it by 100 to convert to picometers. Finally I had to precompute the bonds, because as the molecule moves along the normal coordinate, the atoms could get far enough apart that the bonds wouldn't be detected by MoleculePlot3D
.
Sources:
- Connectivity in a molecule and permutations
- How can I access the internal function that plots a molecule from a formatted XYZ file?
- Visualizing .xyz file in Mathematica
Using a few undocumented functions that have been discussed here on the stack exchange before,
{atoms, coords} = Import[
"https://www.dropbox.com/s/q3rwpedngv5wbqi/ben.xyz?dl=1",
{"XYZ", {"VertexTypes", "VertexCoordinates"}}
];
mode = Most @ Import[
"https://www.dropbox.com/s/3pjxams7ndr0l7h/19.mode?dl=1", "Table"
];
mode = 100 * mode;
bonds = Graphics`MoleculePlotDump`InferBonds[atoms, coords, 40, 25];
range = Range[-0.5, 0.5, 0.025];
range = Join[range, Reverse @ range];
plot[v_] := ImportExport`MoleculePlot3D[
{
"VertexCoordinates" -> (coords + v * mode),
"VertexTypes" -> atoms, "EdgeRules" -> bonds
}
];
ListAnimate @ Map[plot, range]
When importing the mode file, it returns an empty list as the last element so I need to use Most
to make it a matrix. Then I multiplied it by 100 to convert to picometers. Finally I had to precompute the bonds, because as the molecule moves along the normal coordinate, the atoms could get far enough apart that the bonds wouldn't be detected by MoleculePlot3D
.
Sources:
- Connectivity in a molecule and permutations
- How can I access the internal function that plots a molecule from a formatted XYZ file?
- Visualizing .xyz file in Mathematica
edited Nov 30 at 21:59
answered Nov 30 at 20:05
Jason B.
47.4k387185
47.4k387185
Is there any way to make the List Animate window larger so the image is larger in the simulation?
– Moo
Dec 1 at 13:24
1
You should be able to give anImageSize
option to the plotting function.
– Jason B.
Dec 1 at 14:36
add a comment |
Is there any way to make the List Animate window larger so the image is larger in the simulation?
– Moo
Dec 1 at 13:24
1
You should be able to give anImageSize
option to the plotting function.
– Jason B.
Dec 1 at 14:36
Is there any way to make the List Animate window larger so the image is larger in the simulation?
– Moo
Dec 1 at 13:24
Is there any way to make the List Animate window larger so the image is larger in the simulation?
– Moo
Dec 1 at 13:24
1
1
You should be able to give an
ImageSize
option to the plotting function.– Jason B.
Dec 1 at 14:36
You should be able to give an
ImageSize
option to the plotting function.– Jason B.
Dec 1 at 14:36
add a comment |
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f187054%2fvisualizing-a-normal-mode-vibration-of-a-molecule-in-mathematica%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What software makes the
.mode
file? Is there a standard file format for vibrational modes?– Jason B.
Nov 30 at 21:26