visualizing a normal mode vibration of a molecule in mathematica
up vote
9
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
9
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.
2 days ago
add a comment |
up vote
9
down vote
favorite
up vote
9
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 2 days ago
sravankumar perumalla
823
823
What software makes the.mode
file? Is there a standard file format for vibrational modes?
– Jason B.
2 days ago
add a comment |
What software makes the.mode
file? Is there a standard file format for vibrational modes?
– Jason B.
2 days ago
What software makes the
.mode
file? Is there a standard file format for vibrational modes?– Jason B.
2 days ago
What software makes the
.mode
file? Is there a standard file format for vibrational modes?– Jason B.
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
19
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
yesterday
1
You should be able to give anImageSize
option to the plotting function.
– Jason B.
yesterday
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
19
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
yesterday
1
You should be able to give anImageSize
option to the plotting function.
– Jason B.
yesterday
add a comment |
up vote
19
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
yesterday
1
You should be able to give anImageSize
option to the plotting function.
– Jason B.
yesterday
add a comment |
up vote
19
down vote
accepted
up vote
19
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 2 days ago
answered 2 days ago
Jason B.
47.3k387185
47.3k387185
Is there any way to make the List Animate window larger so the image is larger in the simulation?
– Moo
yesterday
1
You should be able to give anImageSize
option to the plotting function.
– Jason B.
yesterday
add a comment |
Is there any way to make the List Animate window larger so the image is larger in the simulation?
– Moo
yesterday
1
You should be able to give anImageSize
option to the plotting function.
– Jason B.
yesterday
Is there any way to make the List Animate window larger so the image is larger in the simulation?
– Moo
yesterday
Is there any way to make the List Animate window larger so the image is larger in the simulation?
– Moo
yesterday
1
1
You should be able to give an
ImageSize
option to the plotting function.– Jason B.
yesterday
You should be able to give an
ImageSize
option to the plotting function.– Jason B.
yesterday
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.
2 days ago