|
@@ -10,6 +10,7 @@ import { SaccharideCompIdMap } from '../structure/carbohydrates/constants';
|
|
|
import { mmCIF_Schema } from '../../../mol-io/reader/cif/schema/mmcif';
|
|
|
import { SetUtils } from '../../../mol-util/set';
|
|
|
import { EntitySubtype, ChemicalComponent } from './properties/common';
|
|
|
+import { LipidNames } from './types/lipids';
|
|
|
|
|
|
const _esCache = (function () {
|
|
|
const cache = Object.create(null);
|
|
@@ -57,6 +58,8 @@ export const enum MoleculeType {
|
|
|
Water,
|
|
|
/** Small ionic molecule */
|
|
|
Ion,
|
|
|
+ /** Lipid molecule */
|
|
|
+ Lipid,
|
|
|
/** Protein, e.g. component type included in `ProteinComponentTypeNames` */
|
|
|
Protein,
|
|
|
/** RNA, e.g. component type included in `RNAComponentTypeNames` */
|
|
@@ -224,7 +227,7 @@ export const OtherComponentTypeNames = new Set([
|
|
|
|
|
|
/** Common names for water molecules */
|
|
|
export const WaterNames = new Set([
|
|
|
- 'SOL', 'WAT', 'HOH', 'H2O', 'W', 'DOD', 'D3O', 'TIP3', 'TIP4', 'SPC'
|
|
|
+ 'SOL', 'WAT', 'HOH', 'H2O', 'W', 'DOD', 'D3O', 'TIP', 'TIP3', 'TIP4', 'SPC'
|
|
|
]);
|
|
|
|
|
|
export const AminoAcidNamesL = new Set([
|
|
@@ -293,6 +296,8 @@ export function getMoleculeType(compType: string, compId: string): MoleculeType
|
|
|
return MoleculeType.Water;
|
|
|
} else if (IonNames.has(compId)) {
|
|
|
return MoleculeType.Ion;
|
|
|
+ } else if (LipidNames.has(compId)) {
|
|
|
+ return MoleculeType.Lipid;
|
|
|
} else if (OtherComponentTypeNames.has(compType)) {
|
|
|
if (SaccharideCompIdMap.has(compId)) {
|
|
|
// trust our saccharide table more than given 'non-polymer' or 'other' component type
|
|
@@ -395,6 +400,10 @@ export function getEntitySubtype(compId: string, compType: string): EntitySubtyp
|
|
|
return 'polyribonucleotide';
|
|
|
} else if (DnaBaseNames.has(compId)) {
|
|
|
return 'polydeoxyribonucleotide';
|
|
|
+ } else if (IonNames.has(compId)) {
|
|
|
+ return 'ion';
|
|
|
+ } else if (LipidNames.has(compId)) {
|
|
|
+ return 'lipid';
|
|
|
} else {
|
|
|
return 'other';
|
|
|
}
|