Source code:
@Grab(group='org.openscience.cdk', module='cdk-bundle', version='2.9')
import org.openscience.cdk.interfaces.*;
import org.openscience.cdk.io.*;
import org.openscience.cdk.tools.manipulator.*;
import org.openscience.cdk.io.IChemObjectReader.Mode;
import org.openscience.cdk.*;
import java.io.File;
import java.util.zip.GZIPInputStream;
try {
reader = new PDBReader(
new GZIPInputStream(
new URL(
"http://files.rcsb.org/download/1CRN.pdb.gz"
).openStream()
)
);
crambin = reader.read(new ChemFile());
for (container in
ChemFileManipulator.getAllAtomContainers(
crambin
)) {
for (atom in container.atoms()) {
println atom.point3d;
}
}
} catch (UnknownHostException exception) {
println "FIXME: compiled without internet connection"
}
Output:
(17.047, 14.099, 3.625)
(16.967, 12.784, 4.338)
(15.685, 12.755, 5.133)
(15.268, 13.825, 5.594)
(18.17, 12.703, 5.337)
(19.334, 12.829, 4.463)
(18.15, 11.546, 6.304)
(15.115, 11.555, 5.265)
(13.856, 11.469, 6.066)
(14.164, 10.785, 7.379)
(14.993, 9.862, 7.443)
(12.732, 10.711, 5.261)
(13.308, 9.439, 4.926)
(12.484, 11.442, 3.895)
(13.488, 11.241, 8.417)
(13.66, 10.707, 9.787)
(12.269, 10.431, 10.323)
(11.393, 11.308, 10.185)
(14.368, 11.748, 10.691)
(15.885, 12.426, 10.016)
(12.019, 9.272, 10.928)
(10.646, 8.991, 11.408)
(10.654, 8.793, 12.919)
(11.659, 8.296, 13.491)
(10.057, 7.752, 10.682)
(9.837, 8.018, 8.904)
(9.561, 9.108, 13.563)
(9.448, 9.034, 15.012)
(9.288, 7.67, 15.606)
(9.49, 7.519, 16.819)
(8.23, 9.957, 15.345)
(7.338, 9.786, 14.114)
(8.366, 9.804, 12.958)
(8.875, 6.686, 14.796)
(8.673, 5.314, 15.279)
(8.753, 4.376, 14.083)
(8.726, 4.858, 12.923)
(7.34, 5.121, 15.996)
(6.274, 5.22, 15.031)
(8.881, 3.075, 14.358)
(8.912, 2.083, 13.258)
(7.581, 2.09, 12.506)
(7.67, 2.031, 11.245)
(9.207, 0.677, 13.924)
(10.714, 0.702, 14.312)
(8.811, -0.477, 12.969)
(11.185, -0.516, 15.142)
(6.458, 2.162, 13.159)
(5.145, 2.209, 12.453)
(5.115, 3.379, 11.461)
(4.664, 3.268, 10.343)
(3.995, 2.354, 13.478)
(2.716, 2.891, 12.869)
(3.758, 1.032, 14.208)
(5.606, 4.546, 11.941)
(5.598, 5.767, 11.082)
(6.441, 5.527, 9.85)
(6.052, 5.933, 8.744)
(6.022, 6.977, 11.891)
(7.647, 4.909, 10.005)
(8.496, 4.609, 8.837)
(7.798, 3.609, 7.876)
(7.878, 3.778, 6.651)
(9.847, 4.02, 9.305)
(10.752, 3.607, 8.149)
(11.226, 4.699, 7.244)
(12.143, 5.571, 8.035)
(12.758, 6.609, 7.443)
(12.539, 6.932, 6.158)
(13.601, 7.322, 8.202)
(7.186, 2.582, 8.445)
(6.5, 1.584, 7.565)
(5.382, 2.313, 6.773)
(5.213, 2.016, 5.557)
(5.908, 0.462, 8.4)
(6.99, -0.272, 9.012)
(4.648, 3.182, 7.446)
(3.545, 3.935, 6.751)
(4.107, 4.851, 5.691)
(3.536, 5.001, 4.617)
(2.663, 4.677, 7.748)
(1.802, 3.735, 8.61)
(1.567, 2.613, 8.165)
(1.394, 4.252, 9.767)
(5.259, 5.498, 6.005)
(5.929, 6.358, 5.055)
(6.304, 5.578, 3.799)
(6.136, 6.072, 2.653)
(7.183, 6.994, 5.754)
(7.884, 8.006, 4.883)
(8.906, 7.586, 4.027)
(7.532, 9.373, 4.983)
(9.56, 8.539, 3.194)
(8.176, 10.281, 4.145)
(9.141, 9.845, 3.292)
(6.9, 4.39, 3.989)
(7.331, 3.607, 2.791)
(6.116, 3.21, 1.915)
(6.24, 3.144, 0.684)
(8.145, 2.404, 3.24)
(9.555, 2.856, 3.73)
(10.013, 3.895, 3.323)
(10.12, 1.956, 4.539)
(4.993, 2.927, 2.571)
(3.782, 2.599, 1.742)
(3.296, 3.871, 1.004)
(2.947, 3.817, -0.189)
(2.698, 1.953, 2.608)
(1.384, 1.826, 1.806)
(3.174, 0.533, 3.005)
(3.321, 4.987, 1.72)
(2.89, 6.285, 1.126)
(3.687, 6.597, -0.111)
(3.2, 7.147, -1.103)
(3.039, 7.369, 2.24)
(2.559, 9.014, 1.649)
(4.997, 6.227, -0.1)
(5.895, 6.489, -1.213)
(5.738, 5.56, -2.409)
(6.228, 5.901, -3.507)
(7.37, 6.507, -0.731)
(7.717, 7.687, 0.206)
(7.949, 8.947, -0.615)
(9.212, 8.856, -1.337)
(9.537, 9.533, -2.431)
(8.659, 10.35, -3.032)
(10.793, 9.491, -2.899)
(5.051, 4.411, -2.204)
(4.933, 3.431, -3.326)
(4.397, 4.014, -4.62)
(4.988, 3.755, -5.687)
(4.196, 2.184, -2.863)
(4.96, 1.178, -1.991)
(3.907, 0.097, -1.634)
(6.129, 0.606, -2.768)
(3.329, 4.795, -4.543)
(2.792, 5.376, -5.797)
(3.573, 6.54, -6.322)
(3.26, 7.045, -7.422)
(1.358, 5.766, -5.472)
(1.223, 5.694, -3.993)
(2.421, 4.941, -3.408)
(4.565, 7.047, -5.559)
(5.366, 8.191, -6.018)
(5.007, 9.481, -5.28)
(5.535, 10.51, -5.73)
(4.181, 9.438, -4.262)
(3.767, 10.609, -3.513)
(5.017, 11.397, -3.042)
(5.947, 10.757, -2.523)
(2.992, 10.188, -2.225)
(2.051, 9.144, -2.623)
(2.26, 11.349, -1.551)
(4.971, 12.703, -3.176)
(6.143, 13.513, -2.696)
(6.4, 13.233, -1.225)
(5.485, 13.061, -0.382)
(5.703, 14.969, -2.92)
(4.676, 14.893, -3.996)
(3.964, 13.567, -3.811)
(7.728, 13.297, -0.921)
(8.114, 13.103, 0.5)
(7.427, 14.073, 1.41)
(7.036, 13.682, 2.54)
(9.648, 13.285, 0.66)
(10.44, 12.093, 0.063)
(11.941, 12.17, 0.391)
(12.416, 13.225, 0.681)
(12.539, 11.07, 0.292)
(7.212, 15.334, 0.966)
(6.614, 16.317, 1.913)
(5.212, 15.936, 2.35)
(4.782, 16.166, 3.495)
(6.605, 17.695, 1.246)
(4.445, 15.318, 1.405)
(3.074, 14.894, 1.756)
(3.085, 13.643, 2.645)
(2.315, 13.523, 3.578)
(2.204, 14.637, 0.462)
(1.815, 16.048, -0.129)
(0.903, 13.864, 0.811)
(0.756, 16.761, 0.757)
(4.032, 12.764, 2.313)
(4.18, 11.549, 3.187)
(4.632, 11.944, 4.596)
(4.227, 11.252, 5.547)
(5.038, 10.518, 2.539)
(4.349, 9.794, 1.022)
(5.408, 13.012, 4.694)
(5.879, 13.502, 6.026)
(4.696, 13.908, 6.882)
(4.528, 13.422, 8.025)
(6.88, 14.615, 5.83)
(3.827, 14.802, 6.358)
(2.691, 15.221, 7.194)
(1.672, 14.132, 7.434)
(0.947, 14.112, 8.468)
(1.986, 16.52, 6.614)
(1.664, 16.221, 5.23)
(2.914, 17.739, 6.7)
(1.621, 13.19, 6.511)
(0.715, 12.045, 6.657)
(1.125, 11.125, 7.815)
(0.286, 10.632, 8.545)
(0.755, 11.229, 5.322)
(-0.203, 10.044, 5.354)
(-1.547, 10.337, 5.645)
(0.193, 8.75, 5.1)
(-2.496, 9.329, 5.673)
(-0.801, 7.705, 5.156)
(-2.079, 8.031, 5.43)
(-3.097, 7.057, 5.458)
(2.47, 10.984, 7.995)
(2.986, 9.994, 8.95)
(3.609, 10.505, 10.23)
(3.766, 9.715, 11.186)
(4.076, 9.103, 8.225)
(5.125, 10.027, 7.824)
(3.493, 8.324, 7.035)
(3.984, 11.764, 10.241)
(4.769, 12.336, 11.36)
(6.255, 12.243, 11.106)
(7.037, 12.75, 11.954)
(6.71, 11.631, 9.992)
(8.14, 11.694, 9.635)
(8.5, 13.141, 9.206)
(7.581, 13.949, 8.944)
(8.504, 10.686, 8.53)
(8.048, 8.987, 8.881)
(9.793, 13.41, 9.173)
(10.28, 14.76, 8.823)
(11.346, 14.658, 7.743)
(11.971, 13.583, 7.552)
(10.79, 15.535, 10.085)
(12.059, 14.803, 10.671)
(9.684, 15.686, 11.138)
(12.733, 15.676, 11.781)
(11.49, 15.773, 7.038)
(12.552, 15.877, 6.036)
(13.59, 16.917, 6.56)
(13.168, 18.006, 6.945)
(11.987, 16.36, 4.681)
(10.914, 15.338, 4.163)
(13.131, 16.517, 3.629)
(10.151, 16.024, 2.938)
(14.856, 16.493, 6.536)
(15.93, 17.454, 6.941)
(16.913, 17.55, 5.819)
(17.097, 16.66, 4.97)
(16.622, 16.995, 8.285)
(17.36, 15.651, 8.067)
(15.592, 16.974, 9.434)
(18.298, 15.206, 9.219)
(17.664, 18.669, 5.806)
(18.635, 18.861, 4.738)
(19.925, 18.042, 4.949)
(20.593, 17.742, 3.945)
(18.945, 20.364, 4.783)
(18.238, 20.937, 5.908)
(17.371, 19.9, 6.596)
(20.172, 17.73, 6.217)
(21.452, 16.969, 6.513)
(21.143, 15.478, 6.427)
(20.138, 15.023, 5.878)
(22.055, 14.701, 7.032)
(22.019, 13.242, 7.02)
(21.944, 12.628, 8.396)
(21.869, 11.387, 8.435)
(23.246, 12.697, 6.275)
(21.894, 13.435, 9.436)
(21.936, 12.911, 10.809)
(20.615, 13.191, 11.521)
(20.357, 14.317, 11.948)
(23.131, 13.601, 11.593)
(24.284, 13.401, 10.709)
(23.34, 12.935, 12.962)
(19.827, 12.11, 11.642)
(18.504, 12.312, 12.298)
(18.684, 12.451, 13.784)
(19.533, 11.718, 14.362)
(17.582, 11.117, 11.996)
(17.199, 10.929, 10.237)
(17.88, 13.266, 14.426)
(17.924, 13.421, 15.877)
(17.392, 12.206, 16.594)
(16.652, 11.368, 16.033)
(17.076, 14.658, 16.145)
(16.098, 14.689, 14.997)
(16.859, 14.15, 13.779)
(17.728, 12.124, 17.884)
(17.334, 10.956, 18.691)
(15.875, 10.688, 18.871)
(15.434, 9.55, 19.166)
(15.036, 11.747, 18.715)
(13.564, 11.573, 18.836)
(12.936, 11.227, 17.47)
(11.72, 11.04, 17.428)
(12.933, 12.737, 19.58)
(13.14, 14.094, 18.958)
(14.109, 14.303, 18.212)
(12.267, 14.963, 19.265)
(13.725, 11.174, 16.425)
(13.257, 10.745, 15.081)
(14.275, 9.687, 14.612)
(14.93, 9.862, 13.568)
(13.2, 11.914, 14.071)
(12.0, 12.819, 14.399)
(12.119, 13.853, 15.332)
(10.775, 12.617, 13.762)
(11.045, 14.675, 15.61)
(9.676, 13.433, 14.048)
(9.802, 14.456, 14.996)
(8.74, 15.265, 15.269)
(14.342, 8.64, 15.422)
(15.445, 7.667, 15.246)
(15.171, 6.533, 14.28)
(16.093, 5.705, 14.039)
(15.68, 7.099, 16.682)
(13.966, 6.502, 13.739)
(13.512, 5.395, 12.878)
(13.311, 5.853, 11.455)
(13.733, 6.929, 11.026)
(12.266, 4.769, 13.501)
(12.538, 4.304, 14.922)
(11.982, 4.849, 15.886)
(13.407, 3.298, 15.015)
(12.703, 4.973, 10.746)