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

avoid standard polymers misqualified as ligands

- overrule erroneous chem comp type in some files
parent 176f80ea
No related branches found
No related tags found
No related merge requests found
...@@ -29,6 +29,11 @@ ...@@ -29,6 +29,11 @@
* Long linear sugar chain (4HG6) * Long linear sugar chain (4HG6)
* Anisotropic B-factors/Ellipsoids (1EJG) * Anisotropic B-factors/Ellipsoids (1EJG)
* NOS bridges (LYS-CSO in 7B0L, 6ZWJ, 6ZWH) * NOS bridges (LYS-CSO in 7B0L, 6ZWJ, 6ZWH)
* Non-polymer components in polymer entities
* PN2 in 1F80
* ACE (many, e.g. 5AGU, 1E1X)
* ACY in 7ABY
* NH2 (many, e.g. 6Y13)
Assembly symmetries Assembly symmetries
* 5M30 (Assembly 1, C3 local and pseudo) * 5M30 (Assembly 1, C3 local and pseudo)
......
...@@ -321,6 +321,12 @@ export function getMoleculeType(compType: string, compId: string): MoleculeType ...@@ -321,6 +321,12 @@ export function getMoleculeType(compType: string, compId: string): MoleculeType
if (SaccharideCompIdMap.has(compId)) { if (SaccharideCompIdMap.has(compId)) {
// trust our saccharide table more than given 'non-polymer' or 'other' component type // trust our saccharide table more than given 'non-polymer' or 'other' component type
return MoleculeType.Saccharide; return MoleculeType.Saccharide;
} else if (AminoAcidNames.has(compId)) {
return MoleculeType.Protein;
} else if (RnaBaseNames.has(compId)) {
return MoleculeType.RNA;
} else if (DnaBaseNames.has(compId)) {
return MoleculeType.DNA;
} else { } else {
return MoleculeType.Other; return MoleculeType.Other;
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
import { CustomProperty } from '../../mol-model-props/common/custom-property'; import { CustomProperty } from '../../mol-model-props/common/custom-property';
import { QueryContext, Structure, StructureQuery, StructureSelection, StructureProperties, StructureElement } from '../../mol-model/structure'; import { QueryContext, Structure, StructureQuery, StructureSelection, StructureProperties, StructureElement } from '../../mol-model/structure';
import { BondType, NucleicBackboneAtoms, ProteinBackboneAtoms, SecondaryStructureType, AminoAcidNamesL, RnaBaseNames, DnaBaseNames, WaterNames, ElementSymbol } from '../../mol-model/structure/model/types'; import { BondType, NucleicBackboneAtoms, ProteinBackboneAtoms, SecondaryStructureType, AminoAcidNamesL, RnaBaseNames, DnaBaseNames, WaterNames, ElementSymbol, PolymerNames } from '../../mol-model/structure/model/types';
import { PluginContext } from '../../mol-plugin/context'; import { PluginContext } from '../../mol-plugin/context';
import { MolScriptBuilder as MS } from '../../mol-script/language/builder'; import { MolScriptBuilder as MS } from '../../mol-script/language/builder';
import { Expression } from '../../mol-script/language/expression'; import { Expression } from '../../mol-script/language/expression';
...@@ -320,6 +320,8 @@ const branchedConnectedOnly = StructureSelectionQuery('Connected to Carbohydrate ...@@ -320,6 +320,8 @@ const branchedConnectedOnly = StructureSelectionQuery('Connected to Carbohydrate
]), { category: StructureSelectionCategory.Internal, isHidden: true }); ]), { category: StructureSelectionCategory.Internal, isHidden: true });
const ligand = StructureSelectionQuery('Ligand', MS.struct.modifier.union([ const ligand = StructureSelectionQuery('Ligand', MS.struct.modifier.union([
MS.struct.modifier.exceptBy({
0: MS.struct.modifier.union([
MS.struct.combinator.merge([ MS.struct.combinator.merge([
MS.struct.modifier.union([ MS.struct.modifier.union([
MS.struct.generator.atomGroups({ MS.struct.generator.atomGroups({
...@@ -347,6 +349,17 @@ const ligand = StructureSelectionQuery('Ligand', MS.struct.modifier.union([ ...@@ -347,6 +349,17 @@ const ligand = StructureSelectionQuery('Ligand', MS.struct.modifier.union([
}) })
]) ])
]), ]),
]),
by: 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.core.set.has([
MS.set(...SetUtils.toArray(PolymerNames)), MS.ammp('label_comp_id')
])
})
])
})
]), { category: StructureSelectionCategory.Type }); ]), { category: StructureSelectionCategory.Type });
// don't include branched entities as they have their own link representation // don't include branched entities as they have their own link representation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment