properties.ts 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. /*
  2. * Copyright (c) 2017-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. * @author Alexander Rose <alexander.rose@weirdbyte.de>
  4. * @author Panagiotis Tourlas <panagiot_tourlov@hotmail.com>
  5. *
  6. * @author Koya Sakuma
  7. * This module was taken from jmol transpiler from MolQL and modified in similar manner as pymol and vmd tranpilers. \
  8. */
  9. import { MolScriptBuilder } from '../../../mol-script/language/builder';
  10. const B = MolScriptBuilder;
  11. import { PropertyDict } from '../types';
  12. const reFloat = /[-+]?[0-9]*\.?[0-9]+/
  13. const rePosInt = /[0-9]+/
  14. function str(x: string) { return x }
  15. const structureDict: {[key: string]: string} = {
  16. none: 'none',
  17. turn: 'turn',
  18. sheet: 'beta',
  19. helix: 'helix',
  20. dna: 'dna',
  21. rna: 'rna',
  22. 0: 'none',
  23. 1: 'turn',
  24. 2: 'beta',
  25. 3: 'helix',
  26. 4: 'dna',
  27. 5: 'rna',
  28. 6: 'carbohydrate',
  29. 7: '3-10',
  30. 8: 'alpha',
  31. 9: 'pi',
  32. }
  33. export function structureMap(x: any) {
  34. if (x.head && x.head === 'core.type.regex') x = x.args[0].replace(/^\^|\$$/g, '')
  35. x = structureDict[x.toString().toLowerCase()] || 'none'
  36. if (['dna', 'rna', 'carbohydrate'].indexOf(x) !== -1) {
  37. throw new Error("values 'dna', 'rna', 'carbohydrate' not yet supported for 'structure' property")
  38. } else {
  39. return B.struct.type.secondaryStructureFlags([x])
  40. }
  41. }
  42. export const properties: PropertyDict = {
  43. altloc: {
  44. '@desc': 'PDB alternate location identifier',
  45. '@examples': ['altloc = A'],
  46. regex: /[a-zA-Z0-9]/, map: str,
  47. level: 'atom-test', property: B.ammp('label_alt_id')
  48. },
  49. atomID: {
  50. '@desc': 'special atom IDs for PDB atoms assigned by Jmol',
  51. '@examples': [''],
  52. isUnsupported: true,
  53. regex: rePosInt, map: x => parseInt(x),
  54. level: 'atom-test'
  55. },
  56. atomIndex: {
  57. '@desc': 'atom 0-based index; a unique number for each atom regardless of the number of models loaded',
  58. '@examples': [''],
  59. isUnsupported: true,
  60. regex: rePosInt, map: x => parseInt(x),
  61. level: 'atom-test'
  62. },
  63. atomName: {
  64. '@desc': 'atom name',
  65. '@examples': ['atomName = CA'],
  66. regex: /[a-zA-Z0-9]+/, map: v => B.atomName(v),
  67. level: 'atom-test', property: B.ammp('label_atom_id')
  68. },
  69. atomno: {
  70. '@desc': 'sequential number; you can use "@" instead of "atomno=" -- for example, select @33 or Var x = @33 or @35',
  71. '@examples': [''],
  72. isNumeric: true,
  73. regex: rePosInt, map: x => parseInt(x),
  74. level: 'atom-test', property: B.ammp('id')
  75. },
  76. atomType: {
  77. '@desc': 'atom type (mol2, AMBER files) or atom name (other file types)',
  78. '@examples': ['atomType = OH'],
  79. regex: /[a-zA-Z0-9]+/, map: v => B.atomName(v),
  80. level: 'atom-test', property: B.ammp('label_atom_id')
  81. },
  82. atomX: {
  83. '@desc': 'Cartesian X coordinate (or just X)',
  84. '@examples': ['x = 4.2'],
  85. abbr: ['X'],
  86. isNumeric: true,
  87. regex: reFloat, map: x => parseFloat(x),
  88. level: 'atom-test', property: B.acp('x')
  89. },
  90. atomY: {
  91. '@desc': 'Cartesian Y coordinate (or just Y)',
  92. '@examples': ['y < 42'],
  93. abbr: ['Y'],
  94. isNumeric: true,
  95. regex: reFloat, map: x => parseFloat(x),
  96. level: 'atom-test', property: B.acp('y')
  97. },
  98. atomZ: {
  99. '@desc': 'Cartesian Z coordinate (or just Z)',
  100. '@examples': ['Z > 10'],
  101. abbr: ['Z'],
  102. isNumeric: true,
  103. regex: reFloat, map: x => parseFloat(x),
  104. level: 'atom-test', property: B.acp('z')
  105. },
  106. bondcount: {
  107. '@desc': 'covalent bond count',
  108. '@examples': ['bondcount = 0'],
  109. isNumeric: true,
  110. regex: rePosInt, map: x => parseInt(x),
  111. level: 'atom-test', property: B.acp('bondCount')
  112. },
  113. bondingRadius: {
  114. '@desc': 'radius used for auto bonding; synonymous with ionic and ionicRadius',
  115. '@examples': [''],
  116. abbr: ['ionic', 'ionicRadius'],
  117. isUnsupported: true,
  118. regex: reFloat, map: x => parseFloat(x),
  119. level: 'atom-test'
  120. },
  121. cell: {
  122. '@desc': 'crystallographic unit cell, expressed either in lattice integer notation (111-999) or as a coordinate in ijk space, where {1 1 1} is the same as 555. ANDing two cells, for example select cell=555 and cell=556, selects the atoms on the common face. (Note: in the specifc case of CELL, only "=" is allowed as a comparator.)',
  123. '@examples': [''],
  124. isUnsupported: true,
  125. regex: /[0-9\s{}-]+/, map: str,
  126. level: 'atom-test'
  127. },
  128. configuration: {
  129. '@desc': 'Only in the context {configuration=n}, this option selects the set of atoms with either no ALTLOC specified or those atoms having this index into the array of altlocs within its model. So, for example, if the model has altloc "A" and "B", select configuration=1 is equivalent to select altloc="" or altloc="A", and print {configuration=2} is equivalent to print {altloc="" or altloc="B"}. Configuration 0 is "all atoms in a model having configurations", and an invalid configuration number gives no atoms. (Note: in the specifc case of CONFIGURATION, only "=" is allowed as a comparator.)',
  130. '@examples': [''],
  131. isUnsupported: true,
  132. regex: rePosInt, map: x => parseInt(x),
  133. level: 'atom-test'
  134. },
  135. chain: {
  136. '@desc': 'protein chain. For newer CIF files allowing multicharacter chain specifications, use quotations marks: select chain="AA". For these multicharacter desigations, case is not checked unless the CIF file has lower-case chain designations.',
  137. '@examples': ['chain = A', 'chain = "AA"'],
  138. regex: /[a-zA-Z0-9]+/, map: str,
  139. level: 'chain-test', property: B.ammp('auth_asym_id')
  140. },
  141. chainNo: {
  142. '@desc': 'chain number; sequentially counted from 1 for each model; chainNo == 0 means"no chain" or PDB chain identifier indicated as a blank (Jmol 14.0).',
  143. '@examples': [''],
  144. isUnsupported: true,
  145. regex: /[0-9\s{}-]+/, map: str,
  146. level: 'atom-test'
  147. },
  148. color: {
  149. '@desc': 'the atom color',
  150. '@examples': [''],
  151. isUnsupported: true,
  152. regex: /[0-9\s{}-]+/, map: str,
  153. level: 'atom-test'
  154. },
  155. covalentRadius: {
  156. '@desc': 'covalent bonding radius, synonymous with covalent. Not used by Jmol, but could be used, for example, in {*}.spacefill={*}.covalentRadius.all.',
  157. '@examples': [''],
  158. abbr: ['covalent'],
  159. isUnsupported: true,
  160. regex: /[0-9\s{}-]+/, map: str,
  161. level: 'atom-test'
  162. },
  163. cs: {
  164. '@desc': 'chemical shift calculated using computational results that include magnetic shielding tensors.',
  165. '@examples': [''],
  166. isUnsupported: true,
  167. regex: /[0-9\s{}-]+/, map: str,
  168. level: 'atom-test'
  169. },
  170. element: {
  171. '@desc': 'element symbol. The value of this parameter depends upon the context. Used with select structure=x, x can be either the quoted element symbol, "H", "He", "Li", etc. or atomic number. In all other contexts, the value is the element symbol. When the atom is a specific isotope, the string will contain the isotope number -- "13C", for example.',
  172. '@examples': ['element=Fe'],
  173. regex: /[a-zA-Z]+/, map: x => B.es(x),
  174. level: 'atom-test', property: B.acp('elementSymbol')
  175. },
  176. elemno: {
  177. '@desc': 'atomic element number',
  178. '@examples': ['elemno=8'],
  179. isNumeric: true,
  180. regex: /[0-9\s{}-]+/, map: x => parseInt(x),
  181. level: 'atom-test', property: B.acp('atomicNumber')
  182. },
  183. eta: {
  184. '@desc': 'Based on Carlos M. Duarte, Leven M. Wadley, and Anna Marie Pyle, RNA structure comparison, motif search and discovery using a reduced representation of RNA conformational space, Nucleic Acids Research, 2003, Vol. 31, No. 16 4755-4761. The parameter eta is the C4\'[i-1]-P[i]-C4\'[i]-P[i+1] dihedral angle; theta is the P[i]-C4\'[i]-P[i+1]-C4\'[i+1] dihedral angle. Both are measured on a 0-360 degree scale because they are commonly near 180 degrees. Using the commands plot PROPERTIES eta theta resno; select visible;wireframe only one can create these authors\' "RNA worm" graph.',
  185. '@examples': [''],
  186. isUnsupported: true,
  187. regex: /[0-9\s{}-]+/, map: str,
  188. level: 'atom-test'
  189. },
  190. theta: {
  191. '@desc': 'Based on Carlos M. Duarte, Leven M. Wadley, and Anna Marie Pyle, RNA structure comparison, motif search and discovery using a reduced representation of RNA conformational space, Nucleic Acids Research, 2003, Vol. 31, No. 16 4755-4761. The parameter eta is the C4\'[i-1]-P[i]-C4\'[i]-P[i+1] dihedral angle; theta is the P[i]-C4\'[i]-P[i+1]-C4\'[i+1] dihedral angle. Both are measured on a 0-360 degree scale because they are commonly near 180 degrees. Using the commands plot PROPERTIES eta theta resno; select visible;wireframe only one can create these authors\' "RNA worm" graph.',
  192. '@examples': [''],
  193. isUnsupported: true,
  194. regex: /[0-9\s{}-]+/, map: str,
  195. level: 'atom-test'
  196. },
  197. file: {
  198. '@desc': 'file number containing this atom',
  199. '@examples': [''],
  200. isUnsupported: true,
  201. regex: /[0-9\s{}-]+/, map: str,
  202. level: 'atom-test'
  203. },
  204. formalCharge: {
  205. '@desc': 'formal charge',
  206. '@examples': ['formalCharge=1'],
  207. regex: reFloat, map: x => parseFloat(x),
  208. level: 'atom-test', property: B.ammp('pdbx_formal_charge')
  209. },
  210. format: {
  211. '@desc': 'format (label) of the atom.',
  212. '@examples': [''],
  213. isUnsupported: true,
  214. regex: /[0-9\s{}-]+/, map: str,
  215. level: 'atom-test'
  216. },
  217. fXyz: {
  218. '@desc': 'fractional XYZ coordinates',
  219. '@examples': [''],
  220. isUnsupported: true,
  221. regex: /[0-9\s{}-]+/, map: str,
  222. level: 'atom-test'
  223. },
  224. fX: {
  225. '@desc': 'fractional X coordinate',
  226. '@examples': [''],
  227. isUnsupported: true,
  228. regex: /[0-9\s{}-]+/, map: str,
  229. level: 'atom-test'
  230. },
  231. fY: {
  232. '@desc': 'fractional Y coordinate',
  233. '@examples': [''],
  234. isUnsupported: true,
  235. regex: /[0-9\s{}-]+/, map: str,
  236. level: 'atom-test'
  237. },
  238. fZ: {
  239. '@desc': 'fractional Z coordinate',
  240. '@examples': [''],
  241. isUnsupported: true,
  242. regex: /[0-9\s{}-]+/, map: str,
  243. level: 'atom-test'
  244. },
  245. fuxyz: {
  246. '@desc': 'fractional XYZ coordinates in the unitcell coordinate system',
  247. '@examples': [''],
  248. isUnsupported: true,
  249. regex: /[0-9\s{}-]+/, map: str,
  250. level: 'atom-test'
  251. },
  252. fux: {
  253. '@desc': 'fractional X coordinate in the unitcell coordinate system',
  254. '@examples': [''],
  255. isUnsupported: true,
  256. regex: /[0-9\s{}-]+/, map: str,
  257. level: 'atom-test'
  258. },
  259. fuy: {
  260. '@desc': 'fractional Y coordinate in the unitcell coordinate system',
  261. '@examples': [''],
  262. isUnsupported: true,
  263. regex: /[0-9\s{}-]+/, map: str,
  264. level: 'atom-test'
  265. },
  266. fuz: {
  267. '@desc': 'fractional Z coordinate in the unit cell coordinate system',
  268. '@examples': [''],
  269. isUnsupported: true,
  270. regex: /[0-9\s{}-]+/, map: str,
  271. level: 'atom-test'
  272. },
  273. group: {
  274. '@desc': '3-letter residue code',
  275. '@examples': ['group = ALA'],
  276. regex: /[a-zA-Z0-9]{1,3}/, map: str,
  277. level: 'residue-test', property: B.ammp('label_comp_id')
  278. },
  279. group1: {
  280. '@desc': 'single-letter residue code (amino acids only)',
  281. '@examples': ['group1 = G'],
  282. regex: /[a-zA-Z]/, map: str,
  283. level: 'residue-test', property: B.ammp('label_comp_id')
  284. },
  285. groupID: {
  286. '@desc': 'group ID number: A unique ID for each amino acid or nucleic acid residue in a PDB file. 0 noGroup 1-5 ALA, ARG, ASN, ASP, CYS 6-10 GLN, GLU, GLY, HIS, ILE 11-15 LEU, LYS, MET, PHE, PRO 16-20 SER, THR, TRP, TYR, VAL 21-23 ASX, GLX, UNK 24-29 A, +A, G, +G, I, +I 30-35 C, +C, T, +T, U, +U Additional unique numbers are assigned arbitrarily by Jmol and cannot be used reproducibly.',
  287. '@examples': [''],
  288. isUnsupported: true,
  289. regex: /[0-9\s{}-]+/, map: str,
  290. level: 'atom-test'
  291. },
  292. groupindex: {
  293. '@desc': 'overall group index',
  294. '@examples': [''],
  295. isUnsupported: true,
  296. regex: /[0-9\s{}-]+/, map: str,
  297. level: 'atom-test'
  298. },
  299. hydrophobicity: {
  300. '@desc': 'Aminoacid residue scale of hydrophobicity based on Rose, G. D., Geselowitz, A. R., Lesser, G. J., Lee, R. H., and Zehfus, M. H. (1985). Hydrophobicity of amino acid residues in globular proteins, Science, 229(4716):834-838.',
  301. '@examples': [''],
  302. isUnsupported: true,
  303. regex: /[0-9\s{}-]+/, map: str,
  304. level: 'atom-test'
  305. },
  306. identify: {
  307. '@desc': 'for a PDB/mmCIF file, a label such as [ILE]7^1:A.CD1%A/3 #47, which includes the group ([ILE]), residue number with optional insertion code (7^1), chain (:A), atom name (CD1), alternate location if present (%A), PDB model number (/3, for NMR models when one file is loaded; /file.model such as /2.3 if more than one file is loaded), and atom number (#47). For non-PDB data, the information is shorter -- for example, H15/2.1 #6, indicating atom name (H15), full file.model number (/2.1), and atom number (#6). If only a single model is loaded, %[identify] does not include the model number.',
  308. '@examples': [''],
  309. isUnsupported: true,
  310. regex: /[0-9\s{}-]+/, map: str,
  311. level: 'atom-test'
  312. },
  313. insertion: {
  314. '@desc': 'protein residue insertion code',
  315. '@examples': ['insertion=A'],
  316. regex: /[a-zA-Z0-9]/, map: str,
  317. level: 'atom-test', property: B.ammp('pdbx_PDB_ins_code')
  318. },
  319. label: {
  320. '@desc': 'current atom label (same as format)',
  321. '@examples': [''],
  322. isUnsupported: true,
  323. regex: /[0-9\s{}-]+/, map: str,
  324. level: 'atom-test'
  325. },
  326. mass: {
  327. '@desc': 'atomic mass -- especially useful with appended .max or .sum',
  328. '@examples': ['mass > 13'],
  329. regex: reFloat, map: x => parseFloat(x),
  330. level: 'atom-test', property: B.acp('mass')
  331. },
  332. model: {
  333. '@desc': 'model number',
  334. '@examples': [''],
  335. isUnsupported: true,
  336. regex: /[0-9\s{}-]+/, map: str,
  337. level: 'atom-test'
  338. },
  339. modelindex: {
  340. '@desc': 'a unique number for each model, starting with 0 and spanning all models in all files',
  341. '@examples': [''],
  342. isUnsupported: true,
  343. regex: /[0-9\s{}-]+/, map: str,
  344. level: 'atom-test'
  345. },
  346. modO: {
  347. '@desc': 'currently calculated occupancy from modulation (0 to 100; NaN if atom has no occupancy modulation)',
  348. '@examples': [''],
  349. isUnsupported: true,
  350. regex: /[0-9\s{}-]+/, map: str,
  351. level: 'atom-test'
  352. },
  353. modXYZ: {
  354. '@desc': 'currently calculated displacement modulation (for incommensurately modulated structures). Also modX, modY, modZ for individual components. For atoms without modultion, {xx}.modXYZ is -1 and {xx}.modX is NaN, and in a label %[modXYZ] and %[modX] are blank.',
  355. '@examples': [''],
  356. isUnsupported: true,
  357. regex: /[0-9\s{}-]+/, map: str,
  358. level: 'atom-test'
  359. },
  360. molecule: {
  361. '@desc': 'molecule number',
  362. '@examples': [''],
  363. isUnsupported: true,
  364. regex: /[0-9\s{}-]+/, map: str,
  365. level: 'atom-test'
  366. },
  367. monomer: {
  368. '@desc': 'monomer number (group number) in a polymer (usually a chain), starting with 1, or 0 if not part of a biopolymer -- that is, not a connected carbohydrate, amino acid, or nucleic acid (Jmol 14.3.15)',
  369. '@examples': [''],
  370. isUnsupported: true,
  371. regex: /[0-9\s{}-]+/, map: str,
  372. level: 'atom-test'
  373. },
  374. ms: {
  375. '@desc': 'magnetic shielding calculated from file-loaded tensors.',
  376. '@examples': [''],
  377. isUnsupported: true,
  378. regex: /[0-9\s{}-]+/, map: str,
  379. level: 'atom-test'
  380. },
  381. occupancy: {
  382. '@desc': 'CIF file site occupancy. In SELECT command comparisons ("select occupancy < 90"), an integer n implies measurement on a 0-100 scale; also, in the context %[occupancy] or %q for a label, the reported number is a percentage. In all other cases, such as when %Q is used in a label or when a decimal number is used in a comparison, the scale is 0.0 - 1.0.',
  383. '@examples': ['occupancy < 1'],
  384. regex: reFloat, map: x => parseFloat(x),
  385. level: 'atom-test', property: B.ammp('occupancy')
  386. },
  387. partialCharge: {
  388. '@desc': 'partial charge',
  389. '@examples': [''],
  390. isUnsupported: true,
  391. regex: reFloat, map: x => parseFloat(x),
  392. level: 'atom-test'
  393. },
  394. phi: {
  395. '@desc': 'protein group PHI angle for atom\'s residue',
  396. '@examples': [''],
  397. isUnsupported: true,
  398. regex: /[0-9\s{}-]+/, map: str,
  399. level: 'atom-test'
  400. },
  401. polymer: {
  402. '@desc': 'sequential polymer number in a model, starting with 1.',
  403. '@examples': [''],
  404. isUnsupported: true,
  405. regex: /[0-9\s{}-]+/, map: str,
  406. level: 'atom-test'
  407. },
  408. polymerLength: {
  409. '@desc': 'polymer length',
  410. '@examples': [''],
  411. isUnsupported: true,
  412. regex: /[0-9\s{}-]+/, map: str,
  413. level: 'atom-test'
  414. },
  415. property_xx: {
  416. '@desc': 'a property created using the DATA command',
  417. '@examples': [''],
  418. isUnsupported: true,
  419. regex: /[0-9\s{}-]+/, map: str,
  420. level: 'atom-test'
  421. },
  422. psi: {
  423. '@desc': 'protein group PSI angle for the atom\'s residue',
  424. '@examples': [''],
  425. isUnsupported: true,
  426. regex: /[0-9\s{}-]+/, map: str,
  427. level: 'atom-test'
  428. },
  429. radius: {
  430. '@desc': 'currently displayed radius -- In SELECT command comparisons ("select radius=n"), integer n implies Rasmol units 1/250 Angstroms; in all other cases or when a decimal number is used, the units are Angstroms.',
  431. '@examples': [''],
  432. isUnsupported: true,
  433. regex: /[0-9\s{}-]+/, map: str,
  434. level: 'atom-test'
  435. },
  436. resno: {
  437. '@desc': 'PDB residue number, not including insertion code (see also seqcode, below)',
  438. '@examples': ['resno = 100'],
  439. isNumeric: true,
  440. regex: /-?[0-9]+/, map: x => parseInt(x),
  441. level: 'residue-test', property: B.ammp('auth_seq_id')
  442. },
  443. selected: {
  444. '@desc': '1.0 if atom is selected; 0.0 if not',
  445. '@examples': [''],
  446. isUnsupported: true,
  447. regex: /[0-9\s{}-]+/, map: str,
  448. level: 'atom-test'
  449. },
  450. sequence: {
  451. '@desc': 'PDB one-character sequence code, as a string of characters, with "?" indicated where single-character codes are not available',
  452. '@examples': [''],
  453. isUnsupported: true,
  454. regex: /[0-9\s{}-]+/, map: str,
  455. level: 'atom-test'
  456. },
  457. seqcode: {
  458. '@desc': 'PDB residue number, including insertion code (for example, 234^2; "seqcode" option added in Jmol 14.3.16)',
  459. '@examples': [''],
  460. isUnsupported: true,
  461. regex: /[0-9\s{}-]+/, map: str,
  462. level: 'atom-test'
  463. },
  464. seqid: {
  465. '@desc': '(mmCIF only) the value from _atom_site.label_seq_id; a pointer to _entity_poly_seq.num in the ENTITY_POLY_SEQ category specifying the sequence of monomers in a polymer. Allowance is made for the possibility of microheterogeneity in a sample by allowing a given sequence number to be correlated with more than one monomer id. (Jmol 14.2.3)',
  466. '@examples': [''],
  467. isUnsupported: true,
  468. regex: /[0-9\s{}-]+/, map: str,
  469. level: 'atom-test'
  470. },
  471. shape: {
  472. '@desc': 'hybridization geometry such as "tetrahedral"',
  473. '@examples': [''],
  474. isUnsupported: true,
  475. regex: /[0-9\s{}-]+/, map: str,
  476. level: 'atom-test'
  477. },
  478. site: {
  479. '@desc': 'crystallographic site number',
  480. '@examples': [''],
  481. isUnsupported: true,
  482. regex: /[0-9\s{}-]+/, map: str,
  483. level: 'atom-test'
  484. },
  485. spacefill: {
  486. '@desc': 'currently displayed radius',
  487. '@examples': [''],
  488. isUnsupported: true,
  489. regex: /[0-9\s{}-]+/, map: str,
  490. level: 'atom-test'
  491. },
  492. straightness: {
  493. '@desc': 'quaternion-derived straightness (second derivative of the quaternion describing the orientation of the residue. This quantity will have different values depending upon the setting of quaternionFrame as "A" (alpha-carbon/phosphorus atom only), "C" (alpha-carbon/pyrimidine or purine base based), "P" (carbonyl-carbon peptide plane/phosphorus tetrahedron based), or "N" (amide-nitrogen based). The default is alpha-carbon based, which corresponds closely to the following combination of Ramachandran angles involving three consecutive residues i-1, i, and i+1: -psii-1 - phii + psii + phii+1.',
  494. '@examples': [''],
  495. isUnsupported: true,
  496. regex: /[0-9\s{}-]+/, map: str,
  497. level: 'atom-test'
  498. },
  499. strucno: {
  500. '@desc': 'a unique number for each helix, sheet, or turn in a model, starting with 1.',
  501. '@examples': [''],
  502. isUnsupported: true,
  503. regex: /[0-9\s{}-]+/, map: str,
  504. level: 'atom-test'
  505. },
  506. structure: {
  507. '@desc': 'The value of this parameter depends upon the context. Used with select structure=x, x can be either the quoted keyword "none", "turn", "sheet", "helix", "dna", "rna", or "carbohydrate" or a respective number 0-6. In the context {*}.structure, the return value is a number; in the context label %[structure], the return is one of the six keywords.',
  508. '@examples': ['structure="helix"', 'structure=3'],
  509. regex: /none|turn|sheet|helix|dna|rna|carbohydrate|[0-6]/i, map: str,
  510. level: 'residue-test', property: 'structure'
  511. },
  512. substructure: {
  513. '@desc': 'like structure, the value of this parameter depends upon the context. Used with select substructure=x, x can be either the quoted keyword "none", "turn", "sheet", "helix", "dna", "rna", "carbohydrate", "helix310", "helixalpha", or "helixpi", or the respective number 0-9. In the context {*}.substructure, the return value is a number; in the context label %[substructure], the return is one of the nine keywords.',
  514. '@examples': ['substructure = "alphahelix"', 'substructure =9'],
  515. regex: /none|turn|sheet|helix|dna|rna|carbohydrate|helix310|helixalpha|helixpi|[0-9]/i, map: str,
  516. level: 'residue-test', property: 'structure'
  517. },
  518. surfacedistance: {
  519. '@desc': 'A value related to the distance of an atom to a nominal molecular surface. 0 indicates at the surface. Positive numbers are minimum distances in Angstroms from the given atom to the surface.',
  520. '@examples': [''],
  521. isUnsupported: true,
  522. regex: /[0-9\s{}-]+/, map: str,
  523. level: 'atom-test'
  524. },
  525. symop: {
  526. '@desc': 'the first symmetry operation code that generated this atom by Jmol; an integer starting with 1. See also symmetry, below. This operator is only present if the file contains space group information and the file was loaded using the {i, j, k} option so as to generate symmetry-based atoms. To select only the original atoms prior to application of symmetry, you can either use "SYMOP=n", where n is the symmetry operator corresponding to "x,y,z", or you can specify instead simply "NOT symmetry" the way you might specify "NOT hydrogen". Note that atoms in special positions will have multiple operator matches. These atoms can be selected using the keyword SPECIALPOSITION. The special form select SYMOP=nijk selects a specific translation of atoms from the given crystallographic symmetry operation. Comparators <, <=, >, >=, and != can be used and only apply to the ijk part of the designation. The ijk are relative, not absolute. Thus, symop=2555 selects for atoms that have been transformed by symop=2 but not subjected to any further translation. select symop=1555 is identical to select not symmetry. All other ijk are relative to these selections for 555. If the model was loaded using load "filename.cif" {444 666 1}, where the 1 indicates that all symmetry-generated atoms are to be packed within cell 555 and then translated to fill the other 26 specified cells, then select symop=3555 is nearly the same as select symop=3 and cell=555. (The difference being that cell=555 selects for all atoms that are on any edge of the cell, while symop=3555 does not.) However, the situation is different if instead the model was loaded using load "filename.cif" {444 666 0}, where the 0 indicates that symmetry-generated atoms are to be placed exactly where their symmetry operator would put them (x,-y,z being different then from x, 1-y, z). In that case, select symop=3555 is for all atoms that have been generated using symmetry operation 3 but have not had any additional translations applied to the x,y,z expression found in the CIF file. If, for example, symmetry operation 3 is -x,-y,-z, then load "filename.cif" {444 666 0} will place an atom originally at {1/2, 1/2, 1/2} at positions {-1/2, -1/2, -1/2} (symop=3555) and {-3/2, -3/2, -3/2} (symop=3444) and 24 other sites.',
  527. '@examples': [''],
  528. isUnsupported: true,
  529. regex: /[0-9\s{}-]+/, map: str,
  530. level: 'atom-test'
  531. },
  532. symmetry: {
  533. '@desc': 'as "symmetry" or in a label as lower-case "o" gives list of crystallographic symmetry operators generating this atom with lattice designations,such as 3555; upper-case "%O" in a label gives a list without the lattice designations. See also symop, above.',
  534. '@examples': [''],
  535. isUnsupported: true,
  536. regex: /[0-9\s{}-]+/, map: str,
  537. level: 'atom-test'
  538. },
  539. temperature: {
  540. '@desc': 'yes yes temperature factor (B-factor)',
  541. '@examples': ['temperature >= 20'],
  542. regex: reFloat, map: x => parseFloat(x),
  543. level: 'atom-test', property: B.ammp('B_iso_or_equiv')
  544. },
  545. unitXyz: {
  546. '@desc': 'unit cell XYZ coordinates',
  547. '@examples': [''],
  548. isUnsupported: true,
  549. regex: /[0-9\s{}-]+/, map: str,
  550. level: 'atom-test'
  551. },
  552. uX: {
  553. '@desc': 'unit cell X coordinate normalized to [0,1)',
  554. '@examples': [''],
  555. isUnsupported: true,
  556. regex: /[0-9\s{}-]+/, map: str,
  557. level: 'atom-test'
  558. },
  559. uY: {
  560. '@desc': 'unit cell Y coordinate normalized to [0,1)',
  561. '@examples': [''],
  562. isUnsupported: true,
  563. regex: /[0-9\s{}-]+/, map: str,
  564. level: 'atom-test'
  565. },
  566. uZ: {
  567. '@desc': 'unit cell Z coordinate normalized to [0,1)',
  568. '@examples': [''],
  569. isUnsupported: true,
  570. regex: /[0-9\s{}-]+/, map: str,
  571. level: 'atom-test'
  572. },
  573. valence: {
  574. '@desc': 'the valence of an atom (sum of bonds, where double bond counts as 2 and triple bond counts as 3',
  575. '@examples': [''],
  576. isUnsupported: true,
  577. regex: /[0-9\s{}-]+/, map: str,
  578. level: 'atom-test'
  579. },
  580. vanderwaals: {
  581. '@desc': 'van der Waals radius',
  582. '@examples': ['vanderwaals >2'],
  583. regex: reFloat, map: x => parseFloat(x),
  584. level: 'atom-test', property: B.acp('vdw')
  585. },
  586. vectorScale: {
  587. '@desc': 'vibration vector scale',
  588. '@examples': [''],
  589. isUnsupported: true,
  590. regex: /[0-9\s{}-]+/, map: str,
  591. level: 'atom-test'
  592. },
  593. volume: {
  594. '@desc': 'approximate van der Waals volume for this atom. Note, {*}.volume gives an average; use {*}.volume.sum to get total volume.',
  595. '@examples': [''],
  596. isUnsupported: true,
  597. regex: /[0-9\s{}-]+/, map: str,
  598. level: 'atom-test'
  599. },
  600. vXyz: {
  601. '@desc': 'vibration vector, or individual components as %vx %vy %vz. For atoms without vibration vectors, {xx}.vXyz is -1; in a label, %[vxyz] is blank.',
  602. '@examples': [''],
  603. isUnsupported: true,
  604. regex: /[0-9\s{}-]+/, map: str,
  605. level: 'atom-test'
  606. },
  607. vX: {
  608. '@desc': 'vibration vector X coordinate; for atoms without vibration vector, {xx}.vX is NaN (same for vY and vZ)',
  609. '@examples': [''],
  610. isUnsupported: true,
  611. regex: /[0-9\s{}-]+/, map: str,
  612. level: 'atom-test'
  613. },
  614. vY: {
  615. '@desc': 'vibration vector Y coordinate',
  616. '@examples': [''],
  617. isUnsupported: true,
  618. regex: /[0-9\s{}-]+/, map: str,
  619. level: 'atom-test'
  620. },
  621. vZ: {
  622. '@desc': 'vibration vector Z coordinate',
  623. '@examples': [''],
  624. isUnsupported: true,
  625. regex: /[0-9\s{}-]+/, map: str,
  626. level: 'atom-test'
  627. },
  628. xyz: {
  629. '@desc': 'Cartesian XYZ coordinates; select xyz > 1.0 selects atoms more than one Angstrom from the origin.',
  630. '@examples': [''],
  631. isUnsupported: true,
  632. regex: /[0-9\s{}-]+/, map: str,
  633. level: 'atom-test'
  634. },
  635. }