Select Git revision
keywords.ts
keywords.ts 17.65 KiB
/**
* Copyright (c) 2017-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
* @author Alexander Rose <alexander.rose@weirdbyte.de> * @author Panagiotis Tourlas <panagiot_tourlov@hotmail.com> *
* @author Koya Sakuma * This module was taken from MolQL and modified in similar manner as pymol and vmd tranpilers.
**/
import { MolScriptBuilder } from '../../../mol-script/language/builder';
const B = MolScriptBuilder;
import * as h from '../helper';
import { KeywordDict } from '../types';
function nucleicExpr() {
return B.struct.combinator.merge([
B.struct.generator.atomGroups({
'residue-test': B.core.set.has([
B.set(...['G', 'C', 'A', 'T', 'U', 'I', 'DG', 'DC', 'DA', 'DT', 'DU', 'DI', '+G', '+C', '+A', '+T', '+U', '+I']),
B.ammp('label_comp_id')
])
}),
B.struct.filter.pick({
0: B.struct.generator.atomGroups({
'group-by': B.ammp('residueKey')
}),
test: B.core.logic.and([
B.core.rel.eq([ B.struct.atomSet.atomCount(), 1 ]),
B.core.rel.eq([ B.ammp('label_atom_id'), B.atomName('P') ]),
])
}),
B.struct.filter.pick({
0: B.struct.generator.atomGroups({
'group-by': B.ammp('residueKey')
}),
test: B.core.logic.or([
B.core.set.isSubset([
h.atomNameSet([ "C1'", "C2'", "O3'", "C3'", "C4'", "C5'", "O5'" ]),
B.ammpSet('label_atom_id')
]),
B.core.set.isSubset([
h.atomNameSet([ 'C1*', 'C2*', 'O3*', 'C3*', 'C4*', 'C5*', 'O5*' ]),
B.ammpSet('label_atom_id')
])
])
})
])
}
const ResDict = {
acidic: ['ASP', 'GLU'],
aliphatic: ['ALA', 'GLY', 'ILE', 'LEU', 'VAL'],
amino: ['ALA', 'ARG', 'ASN', 'ASP', 'CYS', 'GLN', 'GLU', 'GLY', 'HIS', 'ILE', 'LEU', 'LYS', 'MET', 'PHE', 'PRO', 'SER', 'THR', 'TRP', 'TYR', 'VAL', 'ASX', 'GLX', 'UNK', ],
aromatic: ['HIS', 'PHE', 'TRP', 'TYR'],
basic: ['ARG', 'HIS', 'LYS'],
buried: ['ALA','CYS', 'ILE', 'LEU', 'MET', 'PHE', 'TRP', 'VAL'],
cg: ['CYT', 'C', 'GUA', 'G'],
cyclic: ['HIS', 'PHE', 'PRO', 'TRP', 'TYR'],
hydrophobic: ['ALA', 'GLY', 'ILE', 'LEU', 'MET', 'PHE', 'PRO', 'TRP', 'TYR', 'VAL'],
large: ['ARG', 'GLU', 'GLN', 'HIS', 'ILE', 'LEU', 'LYS', 'MET', 'PHE', 'TRP', 'TYR'],
medium: ['ASN', 'ASP', 'CYS', 'PRO', 'THR', 'VAL'],
small: ['ALA', 'GLY', 'SER'],
}
export const keywords: KeywordDict = {
// general terms
all: {
'@desc': 'all atoms; same as *',
abbr: ['*'],
map: () => B.struct.generator.atomGroups()
},