index.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  6. <link rel="icon" href="./favicon.ico" type="image/x-icon">
  7. <title>RCSB PDB Mol* Viewer</title>
  8. <style>
  9. * {
  10. margin: 0;
  11. padding: 0;
  12. box-sizing: border-box;
  13. }
  14. #viewer {
  15. position: absolute;
  16. left: 5%;
  17. top: 100px;
  18. min-width: 90%;
  19. height: 85%;
  20. }
  21. .msp-layout-expanded {
  22. z-index: 10;
  23. }
  24. #menu {
  25. position: absolute;
  26. left: 5%;
  27. top: 20px;
  28. }
  29. #menu > select {
  30. width: 200px;
  31. }
  32. </style>
  33. <link rel="stylesheet" type="text/css" href="rcsb-molstar.css" />
  34. <script type="text/javascript" src="./rcsb-molstar.js"></script>
  35. </head>
  36. <body>
  37. <div id="viewer"></div>
  38. <script>
  39. function getQueryParam(id) {
  40. const a = new RegExp(id + '=([^&#=]*)', 'i')
  41. const m = a.exec(window.location.search)
  42. return m ? decodeURIComponent(m[1]) : undefined
  43. }
  44. const isEmbedded = getQueryParam('embedded') === '1';
  45. const pdbId = getQueryParam('pdbId')
  46. const url = getQueryParam('url')
  47. const _config = getQueryParam('config')
  48. const config = _config && JSON.parse(_config)
  49. const _loadPdbIds = getQueryParam('loadPdbIds')
  50. const loadPdbIds = _loadPdbIds && JSON.parse(_loadPdbIds)
  51. // create an instance of the plugin
  52. const viewer = new rcsbMolstar.Viewer('viewer', {
  53. showImportControls: !pdbId,
  54. showExportControls: true,
  55. showSessionControls: !pdbId,
  56. layoutShowLog: !pdbId,
  57. layoutShowControls: !isEmbedded,
  58. showMembraneOrientationPreset: true,
  59. detachedFromSierra: true // needed when running without sierra
  60. })
  61. // load pdbId or url
  62. if (pdbId) viewer.loadPdbId(pdbId, config)
  63. else if (loadPdbIds) viewer.loadPdbIds(loadPdbIds);
  64. else if (url) viewer.loadStructureFromUrl(url, config)
  65. </script>
  66. <div id="menu">
  67. <h2> RCSB PDB Mol* Viewer - Test Page</h2>
  68. <label for="examples">Examples</label>
  69. <select id="examples" onchange="loadExample(parseInt(this.value))">
  70. <option value=''></option>
  71. </select>
  72. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  73. Clear
  74. <button style="padding: 3px;" onclick="viewer.clear()">all</button>
  75. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  76. <button style="padding: 3px;" onclick="superposed()">Superposed</button>
  77. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  78. <button style="padding: 3px;" onclick="motifs1()">Motifs 1</button>
  79. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  80. <button style="padding: 3px;" onclick="motifs2()">Motifs 2</button>
  81. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  82. <button style="padding: 3px;" onclick="motifsAlphaFold()">Motifs AF</button>
  83. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  84. <button style="padding: 3px" onclick="propset()">Propset</button>
  85. </div>
  86. <script>
  87. function loadExample(index) {
  88. const e = examples[index];
  89. // let URL, if specified, take precedence over ID
  90. if (e.url) return viewer.loadStructureFromUrl(e.url, e.format ?? 'mmcif', e.isBinary ?? false, e.config)
  91. if (e.id) return viewer.loadPdbId(e.id, e.config)
  92. }
  93. const examples = [
  94. {
  95. id: '1CRN',
  96. info: 'small: only polymer',
  97. config: {
  98. props: {
  99. kind: 'validation'
  100. }
  101. }
  102. },
  103. {
  104. id: '3CUP',
  105. info: 'small',
  106. config: {
  107. props: {
  108. kind: 'density'
  109. }
  110. }
  111. },
  112. // {
  113. // id: '6JI7',
  114. // info: 'small: NMR structure with RCI'
  115. // },
  116. {
  117. id: '3PQR',
  118. info: 'medium: polymer, carbs, ligands',
  119. config: {
  120. props: {
  121. kind: 'feature',
  122. assemblyId: '2',
  123. target: {
  124. labelCompId: 'RET'
  125. }
  126. }
  127. }
  128. },
  129. {
  130. id: '1NMR',
  131. info: 'medium: nmr models',
  132. config: {
  133. props: {
  134. kind: 'standard',
  135. modelIndex: 2
  136. }
  137. }
  138. },
  139. {
  140. id: '4HHB',
  141. info: 'medium: classic, lots of validation geometry problems',
  142. config: {
  143. props: {
  144. kind: 'standard',
  145. assemblyId: '1'
  146. }
  147. }
  148. },
  149. {
  150. id: '1A6D',
  151. info: 'medium: dihedral symmetry (D8)',
  152. config: {
  153. props: {
  154. kind: 'symmetry',
  155. assemblyId: '1',
  156. symmetryIndex: 1
  157. }
  158. }
  159. },
  160. {
  161. id: '1LTI',
  162. info: 'medium: local symmetry (C5)',
  163. config: {
  164. props: {
  165. assemblyId: '1'
  166. }
  167. }
  168. },
  169. {
  170. id: '1QO1',
  171. info: 'medium: C-alpha only, local symmetries (C10, C3)',
  172. config: {
  173. props: {
  174. assemblyId: '1'
  175. }
  176. }
  177. },
  178. {
  179. id: '6V9Q',
  180. info: 'medium: local symmetries (H, C2)',
  181. config: {
  182. props: {
  183. assemblyId: '1'
  184. }
  185. }
  186. },
  187. {
  188. id: '6R6B',
  189. info: 'medium: local symmetries (H x2)',
  190. config: {
  191. props: {
  192. assemblyId: '1'
  193. }
  194. }
  195. },
  196. {
  197. id: '2VTU',
  198. info: 'medium: octahedral symmetry (O)',
  199. config: {
  200. props: {
  201. assemblyId: '1'
  202. }
  203. }
  204. },
  205. {
  206. id: '4NWP',
  207. info: 'medium: tetrahedral symmetry (T)',
  208. config: {
  209. props: {
  210. assemblyId: '1'
  211. }
  212. }
  213. },
  214. {
  215. id: '1RB8',
  216. info: 'medium-large: small virus capsid, icosahedral symmetry (I)',
  217. config: {
  218. props: {
  219. assemblyId: '1'
  220. }
  221. }
  222. },
  223. {
  224. id: '6QVK',
  225. info: 'large: The cryo-EM structure of bacteriophage phi29 prohead (C5)',
  226. config: {
  227. props: {
  228. assemblyId: '1'
  229. }
  230. }
  231. },
  232. {
  233. id: '5Y6P',
  234. info: 'large: Structure of the phycobilisome from the red alga Griffithsia pacifica',
  235. config: {
  236. props: {
  237. assemblyId: '1'
  238. }
  239. }
  240. },
  241. {
  242. id: '6O2S',
  243. info: 'large: Deacetylated Microtubules (H)',
  244. config: {
  245. props: {
  246. assemblyId: '1'
  247. }
  248. }
  249. },
  250. {
  251. id: '5MQ7',
  252. info: 'large: Structure of AaLS-13',
  253. config: {
  254. props: {
  255. assemblyId: '1'
  256. }
  257. }
  258. },
  259. {
  260. id: '5IV5',
  261. info: 'large: Cryo-electron microscopy structure of the hexagonal pre-attachment T4 baseplate-tail tube complex',
  262. config: {
  263. props: {
  264. assemblyId: '1'
  265. }
  266. }
  267. },
  268. {
  269. id: '3JC8',
  270. info: 'large: Architectural model of the type IVa pilus machine in a piliated state',
  271. config: {
  272. props: {
  273. assemblyId: '1'
  274. }
  275. }
  276. },
  277. {
  278. id: '4V99',
  279. info: 'large: The Crystallographic Structure of Panicum Mosaic Virus',
  280. config: {
  281. props: {
  282. assemblyId: '1'
  283. }
  284. }
  285. },
  286. {
  287. id: '3J3Q',
  288. info: 'large: Atomic-level structure of the entire HIV-1 capsid',
  289. config: {
  290. props: {
  291. assemblyId: '1'
  292. }
  293. }
  294. },
  295. {
  296. id: '6NCL',
  297. info: 'large: Near-atomic structure of icosahedrally averaged PBCV-1 capsid',
  298. config: {
  299. props: {
  300. assemblyId: '1'
  301. }
  302. }
  303. },
  304. {
  305. id: '6EKC',
  306. info: 'large: Crystal structure of the BSD2 homolog of Arabidopsis thaliana bound to the octameric assembly of RbcL from Thermosynechococcus elongatus',
  307. props: {
  308. assemblyId: '1'
  309. }
  310. },
  311. {
  312. id: '1M4X',
  313. info: 'large: PBCV-1 virus capsid, quasi-atomic model',
  314. config: {
  315. props: {
  316. assemblyId: '1'
  317. }
  318. }
  319. },
  320. {
  321. id: '4V5A',
  322. info: 'large: Structure of the Ribosome Recycling Factor bound to the Thermus thermophilus 70S ribosome with mRNA, ASL-Phe and tRNA-fMet',
  323. config: {
  324. props: {
  325. assemblyId: '1'
  326. }
  327. }
  328. },
  329. {
  330. id: '4UDF',
  331. info: 'large: STRUCTURAL BASIS OF HUMAN PARECHOVIRUS NEUTRALIZATION BY HUMAN MONOCLONAL ANTIBODIES',
  332. config: {
  333. props: {
  334. assemblyId: '1'
  335. }
  336. }
  337. },
  338. {
  339. id: '6J5K',
  340. info: 'Cryo-EM structure of the mammalian ATP synthase tetramer bound with inhibitory protein IF1',
  341. config: {
  342. props: {
  343. assemblyId: '1'
  344. }
  345. }
  346. },
  347. {
  348. id: '6RVV',
  349. info: 'Structure of left-handed protein cage consisting of 24 eleven-membered ring proteins held together by gold (I) bridges.',
  350. config: {
  351. props: {
  352. assemblyId: '1'
  353. }
  354. }
  355. },
  356. {
  357. id: '6EK5',
  358. info: 'Near-atomic resolution structure of a plant geminivirus determined by electron cryo-microscopy',
  359. config: {
  360. props: {
  361. assemblyId: '1'
  362. }
  363. }
  364. },
  365. {
  366. id: '4V93',
  367. info: 'Fitted coordinates for Lumbricus terrestris hemoglobin cryo-EM complex',
  368. config: {
  369. props: {
  370. assemblyId: '1'
  371. }
  372. }
  373. },
  374. {
  375. id: '5VLZ',
  376. info: 'Backbone model for phage Qbeta capsid',
  377. config: {
  378. props: {
  379. assemblyId: '1'
  380. }
  381. }
  382. },
  383. {
  384. id: '5XTI',
  385. info: 'Cryo-EM architecture of human respiratory chain megacomplex-I2III2IV2',
  386. config: {
  387. props: {
  388. assemblyId: '1'
  389. }
  390. }
  391. },
  392. {
  393. id: '6BY7',
  394. info: 'Folding DNA into a lipid-conjugated nano-barrel for controlled reconstitution of membrane proteins',
  395. config: {
  396. props: {
  397. assemblyId: '1'
  398. }
  399. }
  400. },
  401. {
  402. id: '6C50',
  403. info: 'Cross-alpha Amyloid-like Structure alphaAmS',
  404. config: {
  405. props: {
  406. assemblyId: '1'
  407. }
  408. }
  409. },
  410. {
  411. id: '6K3I',
  412. info: 'Salmonella hook in curved state - 66 subunit models',
  413. props: {
  414. assemblyId: '1'
  415. }
  416. },
  417. {
  418. id: '1UNO',
  419. info: 'Crystal structure of a d,l-alternating peptide. Double-starnded helix from beta-sheets.',
  420. config: {
  421. props: {
  422. assemblyId: '1'
  423. }
  424. }
  425. },
  426. {
  427. id: '1GRM',
  428. info: 'REFINEMENT OF THE SPATIAL STRUCTURE OF THE GRAMICIDIN A TRANSMEMBRANE ION-CHANNEL. Single-starnded helix from beta-sheet. NMR structure.',
  429. config: {
  430. props: {
  431. assemblyId: '1'
  432. }
  433. }
  434. },
  435. {
  436. id: '1B5F',
  437. info: 'oligosaccharide: NATIVE CARDOSIN A FROM CYNARA CARDUNCULUS L.',
  438. config: {
  439. props: {
  440. kind: 'feature',
  441. target: {
  442. labelAsymId: 'E',
  443. extendToChain: true
  444. }
  445. }
  446. }
  447. },
  448. {
  449. id: '1BCS',
  450. // this should focus on 1 of 2 (!) ARGs in chain G
  451. info: 'ligand: COMPLEX OF THE WHEAT SERINE CARBOXYPEPTIDASE, CPDW-II, WITH THE MICROBIAL PEPTIDE ALDEHYDE INHIBITOR, CHYMOSTATIN, AND ARGININE AT 100 DEGREES KELVIN\n',
  452. config: {
  453. props: {
  454. kind: 'feature',
  455. assemblyId: '1',
  456. target: {
  457. labelAsymId: 'F'
  458. }
  459. }
  460. }
  461. },
  462. {
  463. id: '1BRR',
  464. info: 'membrane: X-RAY STRUCTURE OF THE BACTERIORHODOPSIN TRIMER/LIPID COMPLEX with ANVIL membrane prediction',
  465. config: {
  466. props: {
  467. kind: 'membrane'
  468. }
  469. }
  470. },
  471. {
  472. id: '3SN6',
  473. info: 'membrane: Crystal structure of the beta2 adrenergic receptor-Gs protein complex with ANVIL membrane prediction',
  474. config: {
  475. props: {
  476. kind: 'membrane'
  477. }
  478. }
  479. },
  480. {
  481. id: '1SQX',
  482. info: 'membrane + assembly: Crystal Structure Analysis of Bovine Bc1 with Stigmatellin A',
  483. config: {
  484. props: {
  485. kind: 'membrane',
  486. assemblyId: '1'
  487. }
  488. }
  489. },
  490. {
  491. id: '5XES',
  492. // this will fail membrane calculation due to tiny size but should still show default representation
  493. info: 'failing membrane: TK9 NMR structure in SDS micelle',
  494. config: {
  495. props: {
  496. kind: 'membrane',
  497. assemblyId: '1'
  498. }
  499. }
  500. },
  501. {
  502. id: '6WJC',
  503. info: 'ligand validation: Muscarinic acetylcholine receptor 1 - muscarinic toxin 7 complex: Focus + Density',
  504. config: {
  505. props: {
  506. kind: 'feature-density',
  507. target: {
  508. labelAsymId: 'D',
  509. authSeqId: 502
  510. },
  511. // radius: 0,
  512. // hiddenChannels: ['fo-fc(+ve)', 'fo-fc(-ve)']
  513. }
  514. }
  515. },
  516. {
  517. id: '5RL9',
  518. info: 'ligand focus on wrong assembly: Crystal Structure of SARS-CoV-2 helicase in complex with Z1703168683',
  519. config: {
  520. props: {
  521. kind: 'feature',
  522. assemblyId: '1',
  523. // UR7 is not present in assembly 1
  524. target: {
  525. labelCompId: 'UR7'
  526. }
  527. }
  528. }
  529. },
  530. {
  531. id: '5VL5',
  532. info: 'motif selection with operator: Coordination Chemistry within a Protein Host: Regulation of the Secondary Coordination Sphere',
  533. config: {
  534. props: {
  535. kind: 'motif',
  536. assemblyId: '1',
  537. targets: [
  538. { labelAsymId: 'A', labelSeqId: 61, operatorName: 'ASM_1' },
  539. { labelAsymId: 'A', labelSeqId: 69, operatorName: 'ASM_1' },
  540. { labelAsymId: 'A', labelSeqId: 87, operatorName: 'ASM_4' }
  541. ],
  542. }
  543. }
  544. },
  545. {
  546. id: '5VL5',
  547. info: 'motif selection with strucmotif-expression: Coordination Chemistry within a Protein Host: Regulation of the Secondary Coordination Sphere',
  548. config: {
  549. props: {
  550. kind: 'motif',
  551. assemblyId: '1',
  552. targets: [
  553. { labelAsymId: 'A', labelSeqId: 61, structOperId: '1' },
  554. { labelAsymId: 'A', labelSeqId: 69, structOperId: '1' },
  555. { labelAsymId: 'A', labelSeqId: 87, structOperId: '4' }
  556. ],
  557. }
  558. }
  559. },
  560. {
  561. id: '2BFU',
  562. info: 'motif selection with strucmotif-expression: X-ray structure of CPMV top component',
  563. config: {
  564. props: {
  565. kind: 'motif',
  566. assemblyId: '6',
  567. targets: [
  568. { labelAsymId: 'A', labelSeqId: 46, structOperId: 'X0x5' },
  569. { labelAsymId: 'A', labelSeqId: 49, structOperId: 'X0x5' },
  570. { labelAsymId: 'A', labelSeqId: 145, structOperId: 'X0x5' }
  571. ],
  572. }
  573. }
  574. },
  575. {
  576. id: '1G2F',
  577. info: 'motif selection with strucmotif-expression & chain: STRUCTURE OF A CYS2HIS2 ZINC FINGER/TATA BOX COMPLEX (TATAZF;CLONE #6)',
  578. config: {
  579. props: {
  580. kind: 'motif',
  581. targets: [
  582. { labelAsymId: 'F', labelSeqId: 7 },
  583. { labelAsymId: 'F', labelSeqId: 25 },
  584. { labelAsymId: 'F', labelSeqId: 29 }
  585. ],
  586. }
  587. }
  588. },
  589. {
  590. id: 'AF-Q8W3K0-F1',
  591. url: 'https://alphafold.ebi.ac.uk/files/AF-Q8W3K0-F1-model_v2.cif',
  592. info: 'confidence coloring: Probable disease resistance protein At1g58602'
  593. },
  594. {
  595. id: 'ma-bak-cepc-0003',
  596. url: 'https://www.modelarchive.org/doi/10.5452/ma-bak-cepc-0003.cif',
  597. info: 'confidence coloring: Predicted interaction between Ribosome biogenesis protein ERB1 (Eukaryotic ribosome biogenesis protein 1) and Ribosome biogenesis protein BRX1'
  598. }
  599. ];
  600. const examplesSelect = document.getElementById('examples');
  601. for (let i = 0, il = examples.length; i < il; ++i) {
  602. const e = examples[i]
  603. const option = document.createElement('option')
  604. Object.assign(option, { text: '[' + e.id + '] ' + e.info, value: i })
  605. examplesSelect.appendChild(option)
  606. }
  607. //
  608. function superposed() {
  609. viewer.clear()
  610. .then(function() {
  611. return viewer.loadPdbId('3pqr', { props: { kind: 'standard', assemblyId: '1' } })
  612. })
  613. .then(function() {
  614. return viewer.loadPdbId('1u19', { props: { kind: 'standard', assemblyId: '1' }, matrix: [
  615. -0.67160917400372, 0.28222298510688404, 0.6850488398834855, 0,
  616. 0.13262098666685063, 0.9554691407700946, -0.26361033961856695, 0,
  617. -0.7289399153866256, -0.08619120567473626, -0.6791305379047228, 0,
  618. -7.602670654900173, -30.317901981509067, 24.605855585357773, 1
  619. ] })
  620. })
  621. .then(function() {
  622. viewer.resetCamera(0)
  623. });
  624. }
  625. function motifs1() {
  626. viewer.clear()
  627. .then(function() {
  628. return viewer.loadPdbIds([
  629. {
  630. pdbId: '4CHA',
  631. config: {
  632. props: {
  633. kind: 'motif',
  634. label: '4CHA',
  635. targets: [
  636. { labelAsymId: 'B', structOperId: '1', labelSeqId: 42 },
  637. { labelAsymId: 'B', structOperId: '1', labelSeqId: 87 },
  638. { labelAsymId: 'C', structOperId: '1', labelSeqId: 47 }
  639. ]
  640. }
  641. }
  642. }, {
  643. pdbId: '3RU4',
  644. config: {
  645. props: {
  646. kind: 'motif',
  647. assemblyId: '1',
  648. label: '3RU4 #2: 0.26 Å',
  649. targets: [
  650. { labelAsymId: 'D', structOperId: '2', labelSeqId: 42 },
  651. { labelAsymId: 'D', structOperId: '2', labelSeqId: 87 },
  652. { labelAsymId: 'E', structOperId: '2', labelSeqId: 46 }
  653. ]
  654. },
  655. matrix: [
  656. -0.049396686, -0.99700946, -0.059431925, 0.0,
  657. -0.7568329, 0.076193266, -0.6491522, 0.0,
  658. 0.6517392, 0.012914069, -0.7583332, 0.0,
  659. 20.371853, 11.498471, 45.705563, 1.0
  660. ]
  661. }
  662. }
  663. ]);
  664. });
  665. }
  666. function motifs2() {
  667. viewer.clear()
  668. .then(function() {
  669. return viewer.loadPdbIds([{
  670. pdbId: '1M4X',
  671. config: {
  672. props: {
  673. label: '1M4X',
  674. kind: 'motif',
  675. // assemblyId: '7', // library should be able to infer assemblyId of the query
  676. targets: [
  677. { labelAsymId: 'C', labelSeqId: 161, structOperId: 'Px81' },
  678. { labelAsymId: 'C', labelSeqId: 165, structOperId: 'Px81' },
  679. { labelAsymId: 'C', labelSeqId: 170, structOperId: 'Px81' }
  680. ],
  681. // color: 13203230
  682. }
  683. }
  684. }, {
  685. pdbId: '6KIN',
  686. config: {
  687. props: {
  688. label: '6KIN @ 1.88 RMSD',
  689. kind: 'motif',
  690. assemblyId: '1',
  691. targets: [
  692. { labelAsymId: 'B', labelSeqId: 160 },
  693. { labelAsymId: 'B', labelSeqId: 163 },
  694. { labelAsymId: 'B', labelSeqId: 167 }
  695. ],
  696. // color: 13203230
  697. },
  698. matrix: [
  699. -0.8175763932146345, -0.5719837107806522, 0.0663586909134339, 0,
  700. -0.4927708198934652, 0.7546183669143351, 0.43327593907008527, 0,
  701. -0.29790226638894773, 0.32153655300313416, -0.8988150448024284, 0,
  702. 340.5134831570596, -107.81055538151446, 774.3972821273203, 1.0
  703. ]
  704. }
  705. }]);
  706. })
  707. .then(function() {
  708. viewer.resetCamera(0)
  709. });
  710. }
  711. function motifsAlphaFold() {
  712. viewer.clear()
  713. .then(function() {
  714. return viewer.loadPdbId('1LAP', {
  715. props: {
  716. label: '1LAP',
  717. kind: 'motif',
  718. targets: [
  719. { labelAsymId: 'A', labelSeqId: 332, structOperId: '1' },
  720. { labelAsymId: 'A', labelSeqId: 334, structOperId: '1' },
  721. { labelAsymId: 'A', labelSeqId: 255, structOperId: '1' },
  722. { labelAsymId: 'A', labelSeqId: 273, structOperId: '1' },
  723. { labelAsymId: 'A', labelSeqId: 250, structOperId: '1' }
  724. ],
  725. }
  726. });
  727. })
  728. .then(function() {
  729. const url = 'https://alphafold.ebi.ac.uk/files/AF-F1Q6S1-F1-model_v1.cif';
  730. const label = 'AF-F1Q6S1-F1 @ 0.23 RMSD';
  731. const targets = [
  732. // AF target must be devoid of struct_oper_id
  733. { labelAsymId: 'A', labelSeqId: 260 },
  734. { labelAsymId: 'A', labelSeqId: 265 },
  735. { labelAsymId: 'A', labelSeqId: 283 },
  736. { labelAsymId: 'A', labelSeqId: 342 },
  737. { labelAsymId: 'A', labelSeqId: 344 }
  738. ];
  739. const matrix = [-0.471, 0.856, 0.215, 0, 0.405, -0.007, 0.914, 0, 0.784, 0.518, -0.343, 0, 54.981, 65.575, 12.287, 1];
  740. return viewer.loadStructureFromUrl(url, 'mmcif', false, { props: { kind: 'motif', label, targets }, matrix });
  741. })
  742. .then(function() {
  743. viewer.resetCamera(0)
  744. });
  745. }
  746. function propset() {
  747. viewer.clear()
  748. .then(function () {
  749. return viewer.loadPdbIds([{
  750. pdbId: '4HHB',
  751. config: {
  752. props: {
  753. kind: 'prop-set',
  754. representation: [{
  755. name: 'color',
  756. targets: [{
  757. labelAsymId: 'A',
  758. labelSeqRange: { beg: 4, end: 141 }
  759. }],
  760. value: 13203230
  761. }],
  762. targets: [{
  763. labelAsymId: 'A',
  764. labelSeqRange: { beg: 4, end: 141 }
  765. }]
  766. }
  767. }
  768. }, {
  769. pdbId: '1OJ6',
  770. config: {
  771. props: {
  772. kind: 'prop-set',
  773. representation: [{
  774. name: 'color',
  775. targets: [{
  776. labelAsymId: 'A',
  777. labelSeqRange: { beg: 3, end: 44 }
  778. }, {
  779. labelAsymId: 'A',
  780. labelSeqRange: { beg: 48, end: 49 }
  781. }, {
  782. labelAsymId: 'A',
  783. labelSeqRange: { beg: 54, end: 95 }
  784. }, {
  785. labelAsymId: 'A',
  786. labelSeqRange: { beg: 98, end: 149 }
  787. }],
  788. value: 4947916
  789. }],
  790. targets: [{
  791. labelAsymId: 'A',
  792. labelSeqRange: { beg: 3, end: 44 }
  793. }, {
  794. labelAsymId: 'A',
  795. labelSeqRange: { beg: 48, end: 49 }
  796. }, {
  797. labelAsymId: 'A',
  798. labelSeqRange: { beg: 54, end: 95 }
  799. }, {
  800. labelAsymId: 'A',
  801. labelSeqRange: { beg: 98, end: 149 }
  802. }]
  803. },
  804. matrix: [
  805. -0.6263111483773867, -0.38259812283613237, -0.6792297268380318, 0.0,
  806. 0.3014888059527303, 0.6846150421427817, -0.6636314820418288, 0.0,
  807. 0.7189150473480135, -0.6204199549290021, -0.313432982027257, 0.0,
  808. -30.829713890311414, 24.04442469172666, 55.437150645037654, 1.0
  809. ]
  810. }
  811. }]);
  812. })
  813. .then(function () {
  814. viewer.resetCamera(0)
  815. });
  816. }
  817. </script>
  818. </body>
  819. </html>