Wolfram.com
WolframAlpha.com
WolframCloud.com
Wolfram Language
Example Repository
Ready-to-use examples for the Wolfram Language
Primary Navigation
Categories
Astronomy
Audio Processing
Calculus
Cellular Automata
Chemistry
Complex Systems
Computer Science
Computer Vision
Control Systems
Creative Arts
Data Science
Engineering
Finance & Economics
Finite Element Method
Food & Nutrition
Geography
Geometry
Graphs & Networks
Image Processing
Life Sciences
Machine Learning
Mathematics
Optimization
Physics
Puzzles and Recreation
Quantum Computation
Signal Processing
Social Sciences
System Modeling
Text & Language Processing
Time-Related Computation
Video Processing
Visualization & Graphics
Alphabetical List
Submit a New Resource
Learn More about
Wolfram Language
Related Pages
Related Symbols
Molecule
MoleculePlot3D
Related Categories
Chemistry
Random Chain Molecule
Construct a molecule from a random sequence of atoms
Example Notebook
Open in Cloud
Download Notebook
Random pick a sequence of 40 atoms of four kinds:
I
n
[
1
]
:
=
R
a
n
d
o
m
C
h
o
i
c
e
[
{
"
C
"
,
"
N
"
,
"
O
"
,
"
P
"
}
,
4
0
]
O
u
t
[
1
]
=
{
C
,
O
,
C
,
N
,
O
,
P
,
O
,
C
,
N
,
C
,
N
,
P
,
O
,
O
,
O
,
N
,
P
,
O
,
C
,
N
,
O
,
C
,
P
,
N
,
N
,
N
,
O
,
O
,
C
,
P
,
C
,
P
,
P
,
O
,
N
,
C
,
C
,
N
,
O
,
P
}
Join the name to make a SMILES string:
I
n
[
2
]
:
=
s
t
r
=
S
t
r
i
n
g
J
o
i
n
[
%
]
O
u
t
[
2
]
=
C
O
C
N
O
P
O
C
N
C
N
P
O
O
O
N
P
O
C
N
O
C
P
N
N
N
O
O
C
P
C
P
P
O
N
C
C
N
O
P
Compute an approximation to the structure of the molecule:
I
n
[
3
]
:
=
M
o
l
e
c
u
l
e
P
l
o
t
3
D
[
M
o
l
e
c
u
l
e
[
s
t
r
]
,
I
m
a
g
e
S
i
z
e
3
0
0
]
O
u
t
[
3
]
=
Related Symbols
Molecule
MoleculePlot3D
Publisher Information
Contributed by:
Stephen Wolfram