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

handle mononucleotides when guessing component type

parent 2df145aa
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,11 @@ const DnaAtomIdsList = [
new Set(['O2\'', 'O2*', 'F2\'', 'F2*'])
];
/** Used to reduce false positives for atom name-based type guessing */
const NonPolymerNames = new Set([
'FMN', 'NCN', 'FNS', 'FMA' // Mononucleotides
]);
const StandardComponents = (function() {
const map = new Map<string, Component>();
const components: Component[] = [
......@@ -151,9 +156,11 @@ export class ComponentBuilder {
this.set(StandardComponents.get(compId)!);
} else if (WaterNames.has(compId)) {
this.set({ id: compId, name: 'WATER', type: 'non-polymer' });
} else if (NonPolymerNames.has(compId)) {
this.set({ id: compId, name: this.namesMap.get(compId) || compId, type: 'non-polymer' });
} else {
const atomIds = this.getAtomIds(index);
if (CharmmIonComponents.has(compId) && atomIds.size === 1) {
if (atomIds.size === 1 && CharmmIonComponents.has(compId)) {
this.set(CharmmIonComponents.get(compId)!);
} else {
const type = this.getType(atomIds);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment