Skip to content
Snippets Groups Projects
Commit 4cc0754f authored by Alexander Rose's avatar Alexander Rose
Browse files

add isNonStandard atom prop, use polymer repr preset

parent cd30caa1
No related branches found
No related tags found
No related merge requests found
...@@ -100,6 +100,7 @@ const residue = { ...@@ -100,6 +100,7 @@ const residue = {
const id = compId(l) const id = compId(l)
return l.unit.model.properties.modifiedResidues.parentId.get(id) || id return l.unit.model.properties.modifiedResidues.parentId.get(id) || id
}), }),
isNonStandard: p(l => !Unit.isAtomic(l.unit) ? notAtomic() : l.unit.model.properties.chemicalComponentMap.get(compId(l))!.mon_nstd_flag[0] !== 'y'),
hasMicroheterogeneity: p(hasMicroheterogeneity), hasMicroheterogeneity: p(hasMicroheterogeneity),
microheterogeneityCompIds: p(microheterogeneityCompIds), microheterogeneityCompIds: p(microheterogeneityCompIds),
secondary_structure_type: p(l => !Unit.isAtomic(l.unit) ? notAtomic() : l.unit.model.properties.secondaryStructure.type[l.unit.residueIndex[l.element]]), secondary_structure_type: p(l => !Unit.isAtomic(l.unit) ? notAtomic() : l.unit.model.properties.secondaryStructure.type[l.unit.residueIndex[l.element]]),
......
...@@ -205,6 +205,7 @@ async function polymerAndLigand(r: StructureRepresentationHelper) { ...@@ -205,6 +205,7 @@ async function polymerAndLigand(r: StructureRepresentationHelper) {
MS.struct.combinator.merge([ MS.struct.combinator.merge([
Q.ligandPlusConnected.expression, Q.ligandPlusConnected.expression,
Q.branchedConnectedOnly.expression, Q.branchedConnectedOnly.expression,
Q.nonStandardPolymer.expression,
Q.water.expression Q.water.expression
]) ])
])) ]))
......
...@@ -188,6 +188,14 @@ const modified = StructureSelectionQuery('Modified Residues', MS.struct.modifier ...@@ -188,6 +188,14 @@ const modified = StructureSelectionQuery('Modified Residues', MS.struct.modifier
}) })
])) ]))
const nonStandardPolymer = StructureSelectionQuery('Non-standard Residues in Polymers', MS.struct.modifier.union([
MS.struct.generator.atomGroups({
'entity-test': MS.core.rel.eq([MS.ammp('entityType'), 'polymer']),
'chain-test': MS.core.rel.eq([MS.ammp('objectPrimitive'), 'atomistic']),
'residue-test': MS.ammp('isNonStandard')
})
]))
const coarse = StructureSelectionQuery('Coarse Elements', MS.struct.modifier.union([ const coarse = StructureSelectionQuery('Coarse Elements', MS.struct.modifier.union([
MS.struct.generator.atomGroups({ MS.struct.generator.atomGroups({
'chain-test': MS.core.set.has([ 'chain-test': MS.core.set.has([
...@@ -230,6 +238,7 @@ export const StructureSelectionQueries = { ...@@ -230,6 +238,7 @@ export const StructureSelectionQueries = {
ligandConnectedOnly, ligandConnectedOnly,
connectedOnly, connectedOnly,
modified, modified,
nonStandardPolymer,
coarse, coarse,
surroundings, surroundings,
complement, complement,
......
...@@ -303,8 +303,9 @@ const atomProperty = { ...@@ -303,8 +303,9 @@ const atomProperty = {
secondaryStructureKey: atomProp(Type.AnyValue, 'Unique value for each secondary structure element.'), secondaryStructureKey: atomProp(Type.AnyValue, 'Unique value for each secondary structure element.'),
secondaryStructureFlags: atomProp(Types.SecondaryStructureFlags), secondaryStructureFlags: atomProp(Types.SecondaryStructureFlags),
isModified: atomProp(Type.Bool, 'True if the atom bolongs to modification of a standard residue.'), isModified: atomProp(Type.Bool, 'True if the atom belongs to modification of a standard residue.'),
modifiedParentName: atomProp(Type.Str, `'3-letter' code of the modifed parent residue.`), modifiedParentName: atomProp(Type.Str, `'3-letter' code of the modifed parent residue.`),
isNonStandard: atomProp(Type.Bool, 'True if this is a non-standard residue.'),
chemCompType: atomProp(Type.Str, `Type of the chemical component as defined in mmCIF.`), chemCompType: atomProp(Type.Str, `Type of the chemical component as defined in mmCIF.`),
} }
} }
......
...@@ -314,6 +314,7 @@ const symbols = [ ...@@ -314,6 +314,7 @@ const symbols = [
D(MolScript.structureQuery.atomProperty.macromolecular.isModified, atomProp(StructureProperties.residue.isModified)), D(MolScript.structureQuery.atomProperty.macromolecular.isModified, atomProp(StructureProperties.residue.isModified)),
D(MolScript.structureQuery.atomProperty.macromolecular.modifiedParentName, atomProp(StructureProperties.residue.modifiedParentName)), D(MolScript.structureQuery.atomProperty.macromolecular.modifiedParentName, atomProp(StructureProperties.residue.modifiedParentName)),
D(MolScript.structureQuery.atomProperty.macromolecular.isNonStandard, atomProp(StructureProperties.residue.isNonStandard)),
D(MolScript.structureQuery.atomProperty.macromolecular.secondaryStructureKey, atomProp(StructureProperties.residue.secondary_structure_key)), D(MolScript.structureQuery.atomProperty.macromolecular.secondaryStructureKey, atomProp(StructureProperties.residue.secondary_structure_key)),
D(MolScript.structureQuery.atomProperty.macromolecular.secondaryStructureFlags, atomProp(StructureProperties.residue.secondary_structure_type)), D(MolScript.structureQuery.atomProperty.macromolecular.secondaryStructureFlags, atomProp(StructureProperties.residue.secondary_structure_type)),
D(MolScript.structureQuery.atomProperty.macromolecular.chemCompType, atomProp(StructureProperties.residue.chem_comp_type)), D(MolScript.structureQuery.atomProperty.macromolecular.chemCompType, atomProp(StructureProperties.residue.chem_comp_type)),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment