Browse Source

mmcif schema: use lowercase instead of uppercase

Alexander Rose 3 years ago
parent
commit
4b9009216b

+ 2 - 2
src/cli/cifschema/util/cif-dic.ts

@@ -22,8 +22,8 @@ export function getFieldType(type: string, description: string, values?: string[
         case 'uline':
         case 'uchar3':
         case 'uchar1':
-            // only force upper-case for enums
-            return values && values.length ? EnumCol(values.map(x => x.toUpperCase()), 'ustr', description) : StrCol(description);
+            // only force lower-case for enums
+            return values && values.length ? EnumCol(values.map(x => x.toLowerCase()), 'lstr', description) : StrCol(description);
         case 'aliasname':
         case 'name':
         case 'idname':

+ 1 - 0
src/cli/cifschema/util/generate.ts

@@ -45,6 +45,7 @@ function getTypeShorthands(schema: Database, fields?: Filter) {
         switch (type) {
             case 'str': shorthands.push('const str = Schema.str;'); break;
             case 'ustr': shorthands.push('const ustr = Schema.ustr;'); break;
+            case 'lstr': shorthands.push('const lstr = Schema.lstr;'); break;
             case 'int': shorthands.push('const int = Schema.int;'); break;
             case 'float': shorthands.push('const float = Schema.float;'); break;
             case 'coord': shorthands.push('const coord = Schema.coord;'); break;

+ 2 - 2
src/cli/cifschema/util/schema.ts

@@ -29,8 +29,8 @@ export function FloatCol(description: string): FloatCol { return { type: 'float'
 export type CoordCol = { type: 'coord' } & BaseCol
 export function CoordCol(description: string): CoordCol { return { type: 'coord', description }; }
 
-export type EnumCol = { type: 'enum', subType: 'int' | 'str' | 'ustr', values: string[] } & BaseCol
-export function EnumCol(values: string[], subType: 'int' | 'str' | 'ustr', description: string): EnumCol {
+export type EnumCol = { type: 'enum', subType: 'int' | 'str' | 'ustr' | 'lstr', values: string[] } & BaseCol
+export function EnumCol(values: string[], subType: 'int' | 'str' | 'ustr' | 'lstr', description: string): EnumCol {
     return { type: 'enum', description, values, subType };
 }
 

+ 1 - 1
src/examples/proteopedia-wrapper/helpers.ts

@@ -56,7 +56,7 @@ export namespace ModelInfo {
             const cI = chainIndex[residueOffsets[rI]];
             const eI = model.atomicHierarchy.index.getEntityFromChain(cI);
             const entityType = model.entities.data.type.value(eI);
-            if (entityType !== 'NON-POLYMER' && entityType !== 'BRANCHED') continue;
+            if (entityType !== 'non-polymer' && entityType !== 'branched') continue;
 
             const comp_id = model.atomicHierarchy.atoms.label_comp_id.value(residueOffsets[rI]);
 

+ 10 - 10
src/mol-io/reader/cif/schema/bird.ts

@@ -12,7 +12,7 @@ import Schema = Column.Schema;
 
 const str = Schema.str;
 const float = Schema.float;
-const ustr = Schema.ustr;
+const lstr = Schema.lstr;
 const Aliased = Schema.Aliased;
 const int = Schema.int;
 
@@ -59,7 +59,7 @@ export const BIRD_Schema = {
         /**
          * Defines the structural classification of the entity.
          */
-        type: Aliased<'AMINO ACID' | 'AMINOGLYCOSIDE' | 'ANTHRACYCLINE' | 'ANTHRAQUINONE' | 'ANSAMYCIN' | 'CHALKOPHORE' | 'CHROMOPHORE' | 'GLYCOPEPTIDE' | 'CYCLIC DEPSIPEPTIDE' | 'CYCLIC LIPOPEPTIDE' | 'CYCLIC PEPTIDE' | 'HETEROCYCLIC' | 'IMINO SUGAR' | 'KETO ACID' | 'LIPOGLYCOPEPTIDE' | 'LIPOPEPTIDE' | 'MACROLIDE' | 'NON-POLYMER' | 'NUCLEOSIDE' | 'OLIGOPEPTIDE' | 'OLIGOSACCHARIDE' | 'PEPTAIBOL' | 'PEPTIDE-LIKE' | 'POLYCYCLIC' | 'POLYPEPTIDE' | 'POLYSACCHARIDE' | 'QUINOLONE' | 'THIOLACTONE' | 'THIOPEPTIDE' | 'SIDEROPHORE' | 'UNKNOWN' | 'CHALKOPHORE, POLYPEPTIDE'>(ustr),
+        type: Aliased<'amino acid' | 'aminoglycoside' | 'anthracycline' | 'anthraquinone' | 'ansamycin' | 'chalkophore' | 'chromophore' | 'glycopeptide' | 'cyclic depsipeptide' | 'cyclic lipopeptide' | 'cyclic peptide' | 'heterocyclic' | 'imino sugar' | 'keto acid' | 'lipoglycopeptide' | 'lipopeptide' | 'macrolide' | 'non-polymer' | 'nucleoside' | 'oligopeptide' | 'oligosaccharide' | 'peptaibol' | 'peptide-like' | 'polycyclic' | 'polypeptide' | 'polysaccharide' | 'quinolone' | 'thiolactone' | 'thiopeptide' | 'siderophore' | 'unknown' | 'chalkophore, polypeptide'>(lstr),
         /**
          * Evidence for the assignment of _pdbx_reference_molecule.type
          */
@@ -67,7 +67,7 @@ export const BIRD_Schema = {
         /**
          * Broadly defines the function of the entity.
          */
-        class: Aliased<'ANTAGONIST' | 'ANTIBIOTIC' | 'ANTICANCER' | 'ANTICOAGULANT' | 'ANTIFUNGAL' | 'ANTIGEN' | 'ANTIINFLAMMATORY' | 'ANTIMICROBIAL' | 'ANTINEOPLASTIC' | 'ANTIPARASITIC' | 'ANTIRETROVIRAL' | 'ANTHELMINTIC' | 'ANTITHROMBOTIC' | 'ANTITUMOR' | 'ANTIVIRAL' | 'CASPASE INHIBITOR' | 'CHAPERONE BINDING' | 'ENZYME INHIBITOR' | 'DRUG DELIVERY' | 'GLYCAN COMPONENT' | 'GROWTH FACTOR' | 'IMMUNOSUPPRESSANT' | 'INDUCER' | 'INHIBITOR' | 'LANTIBIOTIC' | 'METABOLISM' | 'METAL TRANSPORT' | 'NUTRIENT' | 'OXIDATION-REDUCTION' | 'PROTEIN BINDING' | 'RECEPTOR' | 'SUBSTRATE ANALOG' | 'SYNTHETIC OPIOID' | 'THROMBIN INHIBITOR' | 'TRANSITION STATE MIMETIC' | 'TRANSPORT ACTIVATOR' | 'TRYPSIN INHIBITOR' | 'TOXIN' | 'UNKNOWN' | 'WATER RETENTION' | 'ANTICOAGULANT, ANTITHROMBOTIC' | 'ANTIBIOTIC, ANTIMICROBIAL' | 'ANTIBIOTIC, ANTHELMINTIC' | 'ANTIBIOTIC, ANTINEOPLASTIC' | 'ANTIMICROBIAL, ANTIRETROVIRAL' | 'ANTIMICROBIAL, ANTITUMOR' | 'ANTIMICROBIAL, ANTIPARASITIC, ANTIBIOTIC' | 'THROMBIN INHIBITOR, TRYPSIN INHIBITOR'>(ustr),
+        class: Aliased<'antagonist' | 'antibiotic' | 'anticancer' | 'anticoagulant' | 'antifungal' | 'antigen' | 'antiinflammatory' | 'antimicrobial' | 'antineoplastic' | 'antiparasitic' | 'antiretroviral' | 'anthelmintic' | 'antithrombotic' | 'antitumor' | 'antiviral' | 'caspase inhibitor' | 'chaperone binding' | 'enzyme inhibitor' | 'drug delivery' | 'glycan component' | 'growth factor' | 'immunosuppressant' | 'inducer' | 'inhibitor' | 'lantibiotic' | 'metabolism' | 'metal transport' | 'nutrient' | 'oxidation-reduction' | 'protein binding' | 'receptor' | 'substrate analog' | 'synthetic opioid' | 'thrombin inhibitor' | 'transition state mimetic' | 'transport activator' | 'trypsin inhibitor' | 'toxin' | 'unknown' | 'water retention' | 'anticoagulant, antithrombotic' | 'antibiotic, antimicrobial' | 'antibiotic, anthelmintic' | 'antibiotic, antineoplastic' | 'antimicrobial, antiretroviral' | 'antimicrobial, antitumor' | 'antimicrobial, antiparasitic, antibiotic' | 'thrombin inhibitor, trypsin inhibitor'>(lstr),
         /**
          * Evidence for the assignment of _pdbx_reference_molecule.class
          */
@@ -79,7 +79,7 @@ export const BIRD_Schema = {
         /**
          * Defines how this entity is represented in PDB data files.
          */
-        represent_as: Aliased<'POLYMER' | 'SINGLE MOLECULE' | 'BRANCHED'>(ustr),
+        represent_as: Aliased<'polymer' | 'single molecule' | 'branched'>(lstr),
         /**
          * For entities represented as single molecules, the identifier
          * corresponding to the chemical definition for the molecule.
@@ -100,7 +100,7 @@ export const BIRD_Schema = {
         /**
          * Defines the current PDB release status for this molecule definition.
          */
-        release_status: Aliased<'REL' | 'HOLD' | 'OBS' | 'WAIT'>(ustr),
+        release_status: Aliased<'rel' | 'hold' | 'obs' | 'wait'>(lstr),
         /**
          * Assigns the identifier for the reference molecule which have been replaced
          * by this reference molecule.
@@ -130,7 +130,7 @@ export const BIRD_Schema = {
         /**
          * Defines the polymer characteristic of the entity.
          */
-        type: Aliased<'POLYMER' | 'POLYMER-LIKE' | 'NON-POLYMER' | 'BRANCHED'>(ustr),
+        type: Aliased<'polymer' | 'polymer-like' | 'non-polymer' | 'branched'>(lstr),
         /**
          * Additional details about this entity.
          */
@@ -250,7 +250,7 @@ export const BIRD_Schema = {
         /**
          * The bond order target for the chemical linkage.
          */
-        value_order: Aliased<'SING' | 'DOUB' | 'TRIP' | 'QUAD' | 'AROM' | 'POLY' | 'DELO' | 'PI'>(ustr),
+        value_order: Aliased<'sing' | 'doub' | 'trip' | 'quad' | 'arom' | 'poly' | 'delo' | 'pi'>(lstr),
         /**
          * The entity component identifier for the first of two entities containing the linkage.
          */
@@ -336,7 +336,7 @@ export const BIRD_Schema = {
         /**
          * The bond order target for the non-standard linkage.
          */
-        value_order: Aliased<'SING' | 'DOUB' | 'TRIP' | 'QUAD' | 'AROM' | 'POLY' | 'DELO' | 'PI'>(ustr),
+        value_order: Aliased<'sing' | 'doub' | 'trip' | 'quad' | 'arom' | 'poly' | 'delo' | 'pi'>(lstr),
     },
     /**
      * Data items in the PDBX_REFERENCE_ENTITY_POLY category record details about
@@ -401,11 +401,11 @@ export const BIRD_Schema = {
         /**
          * A flag to indicate that this monomer is observed in the instance example.
          */
-        observed: Aliased<'Y' | 'N'>(ustr),
+        observed: Aliased<'y' | 'n'>(lstr),
         /**
          * A flag to indicate that sequence heterogeneity at this monomer position.
          */
-        hetero: Aliased<'Y' | 'N'>(ustr),
+        hetero: Aliased<'y' | 'n'>(lstr),
     },
     /**
      * Additional features associated with the reference entity.

+ 11 - 11
src/mol-io/reader/cif/schema/ccd.ts

@@ -13,7 +13,7 @@ import Schema = Column.Schema;
 const str = Schema.str;
 const float = Schema.float;
 const List = Schema.List;
-const ustr = Schema.ustr;
+const lstr = Schema.lstr;
 const Aliased = Schema.Aliased;
 const int = Schema.int;
 const coord = Schema.coord;
@@ -104,7 +104,7 @@ export const CCD_Schema = {
          * linking monomers, monomers with some type of N-terminal (or 5')
          * cap and monomers with some type of C-terminal (or 3') cap.
          */
-        type: Aliased<'D-PEPTIDE LINKING' | 'L-PEPTIDE LINKING' | 'D-PEPTIDE NH3 AMINO TERMINUS' | 'L-PEPTIDE NH3 AMINO TERMINUS' | 'D-PEPTIDE COOH CARBOXY TERMINUS' | 'L-PEPTIDE COOH CARBOXY TERMINUS' | 'DNA LINKING' | 'RNA LINKING' | 'L-RNA LINKING' | 'L-DNA LINKING' | 'DNA OH 5 PRIME TERMINUS' | 'RNA OH 5 PRIME TERMINUS' | 'DNA OH 3 PRIME TERMINUS' | 'RNA OH 3 PRIME TERMINUS' | 'D-SACCHARIDE, BETA LINKING' | 'D-SACCHARIDE, ALPHA LINKING' | 'L-SACCHARIDE, BETA LINKING' | 'L-SACCHARIDE, ALPHA LINKING' | 'L-SACCHARIDE' | 'D-SACCHARIDE' | 'SACCHARIDE' | 'NON-POLYMER' | 'PEPTIDE LINKING' | 'PEPTIDE-LIKE' | 'L-GAMMA-PEPTIDE, C-DELTA LINKING' | 'D-GAMMA-PEPTIDE, C-DELTA LINKING' | 'L-BETA-PEPTIDE, C-GAMMA LINKING' | 'D-BETA-PEPTIDE, C-GAMMA LINKING' | 'OTHER'>(ustr),
+        type: Aliased<'d-peptide linking' | 'l-peptide linking' | 'd-peptide nh3 amino terminus' | 'l-peptide nh3 amino terminus' | 'd-peptide cooh carboxy terminus' | 'l-peptide cooh carboxy terminus' | 'dna linking' | 'rna linking' | 'l-rna linking' | 'l-dna linking' | 'dna oh 5 prime terminus' | 'rna oh 5 prime terminus' | 'dna oh 3 prime terminus' | 'rna oh 3 prime terminus' | 'd-saccharide, beta linking' | 'd-saccharide, alpha linking' | 'l-saccharide, beta linking' | 'l-saccharide, alpha linking' | 'l-saccharide' | 'd-saccharide' | 'saccharide' | 'non-polymer' | 'peptide linking' | 'peptide-like' | 'l-gamma-peptide, c-delta linking' | 'd-gamma-peptide, c-delta linking' | 'l-beta-peptide, c-gamma linking' | 'd-beta-peptide, c-gamma linking' | 'other'>(lstr),
         /**
          * Synonym list for the component.
          */
@@ -155,11 +155,11 @@ export const CCD_Schema = {
         /**
          * This data item identifies if ideal coordinates are missing in this definition.
          */
-        pdbx_ideal_coordinates_missing_flag: Aliased<'Y' | 'N'>(ustr),
+        pdbx_ideal_coordinates_missing_flag: Aliased<'y' | 'n'>(lstr),
         /**
          * This data item identifies if model coordinates are missing in this definition.
          */
-        pdbx_model_coordinates_missing_flag: Aliased<'Y' | 'N'>(ustr),
+        pdbx_model_coordinates_missing_flag: Aliased<'y' | 'n'>(lstr),
         /**
          * Date component was added to database.
          */
@@ -280,15 +280,15 @@ export const CCD_Schema = {
         /**
          * The chiral configuration of the atom that is a chiral center.
          */
-        pdbx_stereo_config: Aliased<'R' | 'S' | 'N'>(ustr),
+        pdbx_stereo_config: Aliased<'r' | 's' | 'n'>(lstr),
         /**
          * A flag indicating an aromatic atom.
          */
-        pdbx_aromatic_flag: Aliased<'Y' | 'N'>(ustr),
+        pdbx_aromatic_flag: Aliased<'y' | 'n'>(lstr),
         /**
          * A flag indicating a leaving atom.
          */
-        pdbx_leaving_atom_flag: Aliased<'Y' | 'N'>(ustr),
+        pdbx_leaving_atom_flag: Aliased<'y' | 'n'>(lstr),
     },
     /**
      * Data items in the CHEM_COMP_BOND category record details about
@@ -321,7 +321,7 @@ export const CCD_Schema = {
          * bond associated with the specified atoms, expressed as a bond
          * order.
          */
-        value_order: Aliased<'SING' | 'DOUB' | 'TRIP' | 'QUAD' | 'AROM' | 'POLY' | 'DELO' | 'PI'>(ustr),
+        value_order: Aliased<'sing' | 'doub' | 'trip' | 'quad' | 'arom' | 'poly' | 'delo' | 'pi'>(lstr),
         /**
          * Ordinal index for the component bond list.
          */
@@ -329,11 +329,11 @@ export const CCD_Schema = {
         /**
          * Stereochemical configuration across a double bond.
          */
-        pdbx_stereo_config: Aliased<'E' | 'Z' | 'N'>(ustr),
+        pdbx_stereo_config: Aliased<'e' | 'z' | 'n'>(lstr),
         /**
          * A flag indicating an aromatic bond.
          */
-        pdbx_aromatic_flag: Aliased<'Y' | 'N'>(ustr),
+        pdbx_aromatic_flag: Aliased<'y' | 'n'>(lstr),
     },
     /**
      * Data items in the CHEM_COMP_DESCRIPTOR category provide
@@ -353,7 +353,7 @@ export const CCD_Schema = {
         /**
          * This data item contains the descriptor type.
          */
-        type: Aliased<'SMILES_CANNONICAL' | 'SMILES_CANONICAL' | 'SMILES' | 'INCHI' | 'INCHI_MAIN' | 'INCHI_MAIN_FORMULA' | 'INCHI_MAIN_CONNECT' | 'INCHI_MAIN_HATOM' | 'INCHI_CHARGE' | 'INCHI_STEREO' | 'INCHI_ISOTOPE' | 'INCHI_FIXEDH' | 'INCHI_RECONNECT' | 'INCHIKEY'>(ustr),
+        type: Aliased<'smiles_cannonical' | 'smiles_canonical' | 'smiles' | 'inchi' | 'inchi_main' | 'inchi_main_formula' | 'inchi_main_connect' | 'inchi_main_hatom' | 'inchi_charge' | 'inchi_stereo' | 'inchi_isotope' | 'inchi_fixedh' | 'inchi_reconnect' | 'inchikey'>(lstr),
         /**
          * This data item contains the name of the program
          * or library used to compute the descriptor.

+ 1 - 1
src/mol-io/reader/cif/schema/mmcif-extras.ts

@@ -28,6 +28,6 @@ export const mmCIF_chemCompBond_schema = {
 /** Has `type` extended with 'ION' and 'LIPID' */
 export const mmCIF_chemComp_schema = {
     ...mmCIF_Schema.chem_comp,
-    type: Column.Schema.Aliased<mmCIF_Schema['chem_comp']['type']['T'] | 'ION' | 'LIPID'>(Column.Schema.str)
+    type: Column.Schema.Aliased<mmCIF_Schema['chem_comp']['type']['T'] | 'ion' | 'lipid'>(Column.Schema.str)
 };
 export type mmCIF_chemComp_schema = typeof mmCIF_chemComp_schema;

+ 38 - 38
src/mol-io/reader/cif/schema/mmcif.ts

@@ -17,7 +17,7 @@ const coord = Schema.coord;
 const Aliased = Schema.Aliased;
 const Matrix = Schema.Matrix;
 const Vector = Schema.Vector;
-const ustr = Schema.ustr;
+const lstr = Schema.lstr;
 const List = Schema.List;
 
 export const mmCIF_Schema = {
@@ -513,7 +513,7 @@ export const mmCIF_Schema = {
          * _chem_comp.mon_nstd_parent, _chem_comp.mon_nstd_class and
          * _chem_comp.mon_nstd_details data items.
          */
-        mon_nstd_flag: Aliased<'NO' | 'N' | 'YES' | 'Y'>(ustr),
+        mon_nstd_flag: Aliased<'no' | 'n' | 'yes' | 'y'>(lstr),
         /**
          * The full name of the component.
          */
@@ -524,7 +524,7 @@ export const mmCIF_Schema = {
          * linking monomers, monomers with some type of N-terminal (or 5')
          * cap and monomers with some type of C-terminal (or 3') cap.
          */
-        type: Aliased<'D-PEPTIDE LINKING' | 'L-PEPTIDE LINKING' | 'D-PEPTIDE NH3 AMINO TERMINUS' | 'L-PEPTIDE NH3 AMINO TERMINUS' | 'D-PEPTIDE COOH CARBOXY TERMINUS' | 'L-PEPTIDE COOH CARBOXY TERMINUS' | 'DNA LINKING' | 'RNA LINKING' | 'L-RNA LINKING' | 'L-DNA LINKING' | 'DNA OH 5 PRIME TERMINUS' | 'RNA OH 5 PRIME TERMINUS' | 'DNA OH 3 PRIME TERMINUS' | 'RNA OH 3 PRIME TERMINUS' | 'D-SACCHARIDE, BETA LINKING' | 'D-SACCHARIDE, ALPHA LINKING' | 'L-SACCHARIDE, BETA LINKING' | 'L-SACCHARIDE, ALPHA LINKING' | 'L-SACCHARIDE' | 'D-SACCHARIDE' | 'SACCHARIDE' | 'NON-POLYMER' | 'PEPTIDE LINKING' | 'PEPTIDE-LIKE' | 'L-GAMMA-PEPTIDE, C-DELTA LINKING' | 'D-GAMMA-PEPTIDE, C-DELTA LINKING' | 'L-BETA-PEPTIDE, C-GAMMA LINKING' | 'D-BETA-PEPTIDE, C-GAMMA LINKING' | 'OTHER'>(ustr),
+        type: Aliased<'d-peptide linking' | 'l-peptide linking' | 'd-peptide nh3 amino terminus' | 'l-peptide nh3 amino terminus' | 'd-peptide cooh carboxy terminus' | 'l-peptide cooh carboxy terminus' | 'dna linking' | 'rna linking' | 'l-rna linking' | 'l-dna linking' | 'dna oh 5 prime terminus' | 'rna oh 5 prime terminus' | 'dna oh 3 prime terminus' | 'rna oh 3 prime terminus' | 'd-saccharide, beta linking' | 'd-saccharide, alpha linking' | 'l-saccharide, beta linking' | 'l-saccharide, alpha linking' | 'l-saccharide' | 'd-saccharide' | 'saccharide' | 'non-polymer' | 'peptide linking' | 'peptide-like' | 'l-gamma-peptide, c-delta linking' | 'd-gamma-peptide, c-delta linking' | 'l-beta-peptide, c-gamma linking' | 'd-beta-peptide, c-gamma linking' | 'other'>(lstr),
         /**
          * Synonym list for the component.
          */
@@ -561,7 +561,7 @@ export const mmCIF_Schema = {
          * bond associated with the specified atoms, expressed as a bond
          * order.
          */
-        value_order: Aliased<'SING' | 'DOUB' | 'TRIP' | 'QUAD' | 'AROM' | 'POLY' | 'DELO' | 'PI'>(ustr),
+        value_order: Aliased<'sing' | 'doub' | 'trip' | 'quad' | 'arom' | 'poly' | 'delo' | 'pi'>(lstr),
         /**
          * Ordinal index for the component bond list.
          */
@@ -569,11 +569,11 @@ export const mmCIF_Schema = {
         /**
          * Stereochemical configuration across a double bond.
          */
-        pdbx_stereo_config: Aliased<'E' | 'Z' | 'N'>(ustr),
+        pdbx_stereo_config: Aliased<'e' | 'z' | 'n'>(lstr),
         /**
          * A flag indicating an aromatic bond.
          */
-        pdbx_aromatic_flag: Aliased<'Y' | 'N'>(ustr),
+        pdbx_aromatic_flag: Aliased<'y' | 'n'>(lstr),
     },
     /**
      * Data items in the CITATION category record details about the
@@ -705,7 +705,7 @@ export const mmCIF_Schema = {
         /**
          * An abbreviation that identifies the database.
          */
-        database_id: Aliased<'ALPHAFOLDDB' | 'CAS' | 'CSD' | 'EMDB' | 'ICSD' | 'MODELARCHIVE' | 'MDF' | 'MODBASE' | 'NDB' | 'NBS' | 'PDB' | 'PDF' | 'RCSB' | 'SWISS-MODEL_REPOSITORY' | 'EBI' | 'PDBE' | 'BMRB' | 'WWPDB' | 'PDB_ACC'>(ustr),
+        database_id: Aliased<'alphafolddb' | 'cas' | 'csd' | 'emdb' | 'icsd' | 'modelarchive' | 'mdf' | 'modbase' | 'ndb' | 'nbs' | 'pdb' | 'pdf' | 'rcsb' | 'swiss-model_repository' | 'ebi' | 'pdbe' | 'bmrb' | 'wwpdb' | 'pdb_acc'>(lstr),
         /**
          * The code assigned by the database identified in
          * _database_2.database_id.
@@ -768,7 +768,7 @@ export const mmCIF_Schema = {
          * manipulated sources are expected to have further information in
          * the ENTITY_SRC_GEN category.
          */
-        src_method: Aliased<'NAT' | 'MAN' | 'SYN'>(ustr),
+        src_method: Aliased<'nat' | 'man' | 'syn'>(lstr),
         /**
          * Defines the type of the entity.
          *
@@ -781,7 +781,7 @@ export const mmCIF_Schema = {
          * Water entities are not expected to have corresponding
          * entries in the ENTITY category.
          */
-        type: Aliased<'POLYMER' | 'NON-POLYMER' | 'MACROLIDE' | 'WATER' | 'BRANCHED'>(ustr),
+        type: Aliased<'polymer' | 'non-polymer' | 'macrolide' | 'water' | 'branched'>(lstr),
         /**
          * A description of the entity.
          *
@@ -821,12 +821,12 @@ export const mmCIF_Schema = {
          * one monomer-to-monomer link different from that implied by
          * _entity_poly.type.
          */
-        nstd_linkage: Aliased<'NO' | 'N' | 'YES' | 'Y'>(ustr),
+        nstd_linkage: Aliased<'no' | 'n' | 'yes' | 'y'>(lstr),
         /**
          * A flag to indicate whether the polymer contains at least
          * one monomer that is not considered standard.
          */
-        nstd_monomer: Aliased<'NO' | 'N' | 'YES' | 'Y'>(ustr),
+        nstd_monomer: Aliased<'no' | 'n' | 'yes' | 'y'>(lstr),
         /**
          * The type of the polymer.
          */
@@ -924,7 +924,7 @@ export const mmCIF_Schema = {
          * A flag to indicate whether this monomer in the polymer is
          * heterogeneous in sequence.
          */
-        hetero: Aliased<'NO' | 'N' | 'YES' | 'Y'>(ustr),
+        hetero: Aliased<'no' | 'n' | 'yes' | 'y'>(lstr),
         /**
          * This data item is a pointer to _chem_comp.id in the CHEM_COMP
          * category.
@@ -1001,7 +1001,7 @@ export const mmCIF_Schema = {
          * The classification of the software according to the most
          * common types.
          */
-        type: Aliased<'PROGRAM' | 'LIBRARY' | 'PACKAGE' | 'FILTER' | 'JIFFY' | 'OTHER'>(ustr),
+        type: Aliased<'program' | 'library' | 'package' | 'filter' | 'jiffy' | 'other'>(lstr),
         /**
          * The version of the software.
          */
@@ -1124,7 +1124,7 @@ export const mmCIF_Schema = {
          * This data item is a pointer to _struct_conf_type.id in the
          * STRUCT_CONF_TYPE category.
          */
-        conf_type_id: Aliased<'BEND' | 'HELX_P' | 'HELX_OT_P' | 'HELX_RH_P' | 'HELX_RH_OT_P' | 'HELX_RH_AL_P' | 'HELX_RH_GA_P' | 'HELX_RH_OM_P' | 'HELX_RH_PI_P' | 'HELX_RH_27_P' | 'HELX_RH_3T_P' | 'HELX_RH_PP_P' | 'HELX_LH_P' | 'HELX_LH_OT_P' | 'HELX_LH_AL_P' | 'HELX_LH_GA_P' | 'HELX_LH_OM_P' | 'HELX_LH_PI_P' | 'HELX_LH_27_P' | 'HELX_LH_3T_P' | 'HELX_LH_PP_P' | 'HELX_N' | 'HELX_OT_N' | 'HELX_RH_N' | 'HELX_RH_OT_N' | 'HELX_RH_A_N' | 'HELX_RH_B_N' | 'HELX_RH_Z_N' | 'HELX_LH_N' | 'HELX_LH_OT_N' | 'HELX_LH_A_N' | 'HELX_LH_B_N' | 'HELX_LH_Z_N' | 'TURN_P' | 'TURN_OT_P' | 'TURN_TY1_P' | 'TURN_TY1P_P' | 'TURN_TY2_P' | 'TURN_TY2P_P' | 'TURN_TY3_P' | 'TURN_TY3P_P' | 'STRN' | 'OTHER'>(ustr),
+        conf_type_id: Aliased<'bend' | 'helx_p' | 'helx_ot_p' | 'helx_rh_p' | 'helx_rh_ot_p' | 'helx_rh_al_p' | 'helx_rh_ga_p' | 'helx_rh_om_p' | 'helx_rh_pi_p' | 'helx_rh_27_p' | 'helx_rh_3t_p' | 'helx_rh_pp_p' | 'helx_lh_p' | 'helx_lh_ot_p' | 'helx_lh_al_p' | 'helx_lh_ga_p' | 'helx_lh_om_p' | 'helx_lh_pi_p' | 'helx_lh_27_p' | 'helx_lh_3t_p' | 'helx_lh_pp_p' | 'helx_n' | 'helx_ot_n' | 'helx_rh_n' | 'helx_rh_ot_n' | 'helx_rh_a_n' | 'helx_rh_b_n' | 'helx_rh_z_n' | 'helx_lh_n' | 'helx_lh_ot_n' | 'helx_lh_a_n' | 'helx_lh_b_n' | 'helx_lh_z_n' | 'turn_p' | 'turn_ot_p' | 'turn_ty1_p' | 'turn_ty1p_p' | 'turn_ty2_p' | 'turn_ty2p_p' | 'turn_ty3_p' | 'turn_ty3p_p' | 'strn' | 'other'>(lstr),
         /**
          * A description of special aspects of the conformation assignment.
          */
@@ -1224,7 +1224,7 @@ export const mmCIF_Schema = {
          * This data item is a pointer to _struct_conn_type.id in the
          * STRUCT_CONN_TYPE category.
          */
-        conn_type_id: Aliased<'COVALE' | 'DISULF' | 'METALC' | 'HYDROG'>(ustr),
+        conn_type_id: Aliased<'covale' | 'disulf' | 'metalc' | 'hydrog'>(lstr),
         /**
          * A description of special aspects of the connection.
          */
@@ -1444,7 +1444,7 @@ export const mmCIF_Schema = {
          * The chemical bond order associated with the specified atoms in
          * this contact.
          */
-        pdbx_value_order: Aliased<'SING' | 'DOUB' | 'TRIP' | 'QUAD'>(ustr),
+        pdbx_value_order: Aliased<'sing' | 'doub' | 'trip' | 'quad'>(lstr),
     },
     /**
      * Data items in the STRUCT_CONN_TYPE category record details
@@ -1459,7 +1459,7 @@ export const mmCIF_Schema = {
         /**
          * The chemical or structural type of the interaction.
          */
-        id: Aliased<'COVALE' | 'DISULF' | 'HYDROG' | 'METALC' | 'MISMAT' | 'SALTBR' | 'MODRES' | 'COVALE_BASE' | 'COVALE_SUGAR' | 'COVALE_PHOSPHATE'>(ustr),
+        id: Aliased<'covale' | 'disulf' | 'hydrog' | 'metalc' | 'mismat' | 'saltbr' | 'modres' | 'covale_base' | 'covale_sugar' | 'covale_phosphate'>(lstr),
         /**
          * A reference that specifies the criteria used to define the
          * interaction.
@@ -1813,7 +1813,7 @@ export const mmCIF_Schema = {
         /**
          * The cell settings for this space-group symmetry.
          */
-        cell_setting: Aliased<'TRICLINIC' | 'MONOCLINIC' | 'ORTHORHOMBIC' | 'TETRAGONAL' | 'RHOMBOHEDRAL' | 'TRIGONAL' | 'HEXAGONAL' | 'CUBIC'>(ustr),
+        cell_setting: Aliased<'triclinic' | 'monoclinic' | 'orthorhombic' | 'tetragonal' | 'rhombohedral' | 'trigonal' | 'hexagonal' | 'cubic'>(lstr),
         /**
          * Space-group number from International Tables for Crystallography
          * Vol. A (2002).
@@ -1873,7 +1873,7 @@ export const mmCIF_Schema = {
          * This code indicates whether the entry belongs to
          * Structural Genomics Project.
          */
-        SG_entry: Aliased<'Y' | 'N'>(ustr),
+        SG_entry: Aliased<'y' | 'n'>(lstr),
         /**
          * The site where the file was deposited.
          */
@@ -1897,7 +1897,7 @@ export const mmCIF_Schema = {
          * A value of 'N' indicates that the no PDB format data file is
          * corresponding to this entry is available in the PDB archive.
          */
-        pdb_format_compatible: Aliased<'Y' | 'N'>(ustr),
+        pdb_format_compatible: Aliased<'y' | 'n'>(lstr),
     },
     /**
      * The PDBX_NONPOLY_SCHEME category provides residue level nomenclature
@@ -2050,7 +2050,7 @@ export const mmCIF_Schema = {
          * The value of polymer flag indicates whether the unobserved or
          * zero occupancy residue is part of a polymer chain or not
          */
-        polymer_flag: Aliased<'Y' | 'N'>(ustr),
+        polymer_flag: Aliased<'y' | 'n'>(lstr),
         /**
          * The value of occupancy flag indicates whether the residue
          * is unobserved (= 1) or the coordinates have an occupancy of zero (=0)
@@ -2303,7 +2303,7 @@ export const mmCIF_Schema = {
         /**
          * Defines the polymer characteristic of the entity.
          */
-        type: Aliased<'POLYMER' | 'POLYMER-LIKE' | 'NON-POLYMER' | 'BRANCHED'>(ustr),
+        type: Aliased<'polymer' | 'polymer-like' | 'non-polymer' | 'branched'>(lstr),
         /**
          * Additional details about this entity.
          */
@@ -2398,7 +2398,7 @@ export const mmCIF_Schema = {
         /**
          * The bond order target for the chemical linkage.
          */
-        value_order: Aliased<'SING' | 'DOUB' | 'TRIP' | 'QUAD' | 'AROM' | 'POLY' | 'DELO' | 'PI'>(ustr),
+        value_order: Aliased<'sing' | 'doub' | 'trip' | 'quad' | 'arom' | 'poly' | 'delo' | 'pi'>(lstr),
         /**
          * The entity component identifier for the first of two entities containing the linkage.
          */
@@ -2484,7 +2484,7 @@ export const mmCIF_Schema = {
         /**
          * The bond order target for the non-standard linkage.
          */
-        value_order: Aliased<'SING' | 'DOUB' | 'TRIP' | 'QUAD' | 'AROM' | 'POLY' | 'DELO' | 'PI'>(ustr),
+        value_order: Aliased<'sing' | 'doub' | 'trip' | 'quad' | 'arom' | 'poly' | 'delo' | 'pi'>(lstr),
     },
     /**
      * Data items in the PDBX_MOLECULE category identify reference molecules
@@ -2519,11 +2519,11 @@ export const mmCIF_Schema = {
         /**
          * Broadly defines the function of the molecule.
          */
-        class: Aliased<'ANTAGONIST' | 'ANTIBIOTIC' | 'ANTICANCER' | 'ANTICOAGULANT' | 'ANTIFUNGAL' | 'ANTIGEN' | 'ANTIINFLAMMATORY' | 'ANTIMICROBIAL' | 'ANTINEOPLASTIC' | 'ANTIPARASITIC' | 'ANTIRETROVIRAL' | 'ANTHELMINTIC' | 'ANTITHROMBOTIC' | 'ANTITUMOR' | 'ANTIVIRAL' | 'CASPASE INHIBITOR' | 'CHAPERONE BINDING' | 'ENZYME INHIBITOR' | 'DRUG DELIVERY' | 'GLYCAN COMPONENT' | 'GROWTH FACTOR' | 'IMMUNOSUPPRESSANT' | 'INDUCER' | 'INHIBITOR' | 'LANTIBIOTIC' | 'METABOLISM' | 'METAL TRANSPORT' | 'NUTRIENT' | 'OXIDATION-REDUCTION' | 'PROTEIN BINDING' | 'RECEPTOR' | 'SUBSTRATE ANALOG' | 'SYNTHETIC OPIOID' | 'THROMBIN INHIBITOR' | 'TRANSITION STATE MIMETIC' | 'TRANSPORT ACTIVATOR' | 'TRYPSIN INHIBITOR' | 'TOXIN' | 'UNKNOWN' | 'WATER RETENTION' | 'ANTICOAGULANT, ANTITHROMBOTIC' | 'ANTIBIOTIC, ANTIMICROBIAL' | 'ANTIBIOTIC, ANTHELMINTIC' | 'ANTIBIOTIC, ANTINEOPLASTIC' | 'ANTIMICROBIAL, ANTIRETROVIRAL' | 'ANTIMICROBIAL, ANTITUMOR' | 'ANTIMICROBIAL, ANTIPARASITIC, ANTIBIOTIC' | 'THROMBIN INHIBITOR, TRYPSIN INHIBITOR'>(ustr),
+        class: Aliased<'antagonist' | 'antibiotic' | 'anticancer' | 'anticoagulant' | 'antifungal' | 'antigen' | 'antiinflammatory' | 'antimicrobial' | 'antineoplastic' | 'antiparasitic' | 'antiretroviral' | 'anthelmintic' | 'antithrombotic' | 'antitumor' | 'antiviral' | 'caspase inhibitor' | 'chaperone binding' | 'enzyme inhibitor' | 'drug delivery' | 'glycan component' | 'growth factor' | 'immunosuppressant' | 'inducer' | 'inhibitor' | 'lantibiotic' | 'metabolism' | 'metal transport' | 'nutrient' | 'oxidation-reduction' | 'protein binding' | 'receptor' | 'substrate analog' | 'synthetic opioid' | 'thrombin inhibitor' | 'transition state mimetic' | 'transport activator' | 'trypsin inhibitor' | 'toxin' | 'unknown' | 'water retention' | 'anticoagulant, antithrombotic' | 'antibiotic, antimicrobial' | 'antibiotic, anthelmintic' | 'antibiotic, antineoplastic' | 'antimicrobial, antiretroviral' | 'antimicrobial, antitumor' | 'antimicrobial, antiparasitic, antibiotic' | 'thrombin inhibitor, trypsin inhibitor'>(lstr),
         /**
          * Defines the structural classification of the molecule.
          */
-        type: Aliased<'AMINO ACID' | 'AMINOGLYCOSIDE' | 'ANTHRACYCLINE' | 'ANTHRAQUINONE' | 'ANSAMYCIN' | 'CHALKOPHORE' | 'CHROMOPHORE' | 'GLYCOPEPTIDE' | 'CYCLIC DEPSIPEPTIDE' | 'CYCLIC LIPOPEPTIDE' | 'CYCLIC PEPTIDE' | 'HETEROCYCLIC' | 'IMINO SUGAR' | 'KETO ACID' | 'LIPOGLYCOPEPTIDE' | 'LIPOPEPTIDE' | 'MACROLIDE' | 'NON-POLYMER' | 'NUCLEOSIDE' | 'OLIGOPEPTIDE' | 'OLIGOSACCHARIDE' | 'PEPTAIBOL' | 'PEPTIDE-LIKE' | 'POLYCYCLIC' | 'POLYPEPTIDE' | 'POLYSACCHARIDE' | 'QUINOLONE' | 'THIOLACTONE' | 'THIOPEPTIDE' | 'SIDEROPHORE' | 'UNKNOWN' | 'CHALKOPHORE, POLYPEPTIDE'>(ustr),
+        type: Aliased<'amino acid' | 'aminoglycoside' | 'anthracycline' | 'anthraquinone' | 'ansamycin' | 'chalkophore' | 'chromophore' | 'glycopeptide' | 'cyclic depsipeptide' | 'cyclic lipopeptide' | 'cyclic peptide' | 'heterocyclic' | 'imino sugar' | 'keto acid' | 'lipoglycopeptide' | 'lipopeptide' | 'macrolide' | 'non-polymer' | 'nucleoside' | 'oligopeptide' | 'oligosaccharide' | 'peptaibol' | 'peptide-like' | 'polycyclic' | 'polypeptide' | 'polysaccharide' | 'quinolone' | 'thiolactone' | 'thiopeptide' | 'siderophore' | 'unknown' | 'chalkophore, polypeptide'>(lstr),
         /**
          * A name of the molecule.
          */
@@ -2670,7 +2670,7 @@ export const mmCIF_Schema = {
         /**
          * This data item contains the descriptor type.
          */
-        type: Aliased<'LINUCS' | 'GLYCAM CONDENSED SEQUENCE' | 'GLYCAM CONDENSED CORE SEQUENCE' | 'WURCS'>(ustr),
+        type: Aliased<'linucs' | 'glycam condensed sequence' | 'glycam condensed core sequence' | 'wurcs'>(lstr),
         /**
          * This data item contains the name of the program
          * or library used to compute the descriptor.
@@ -2745,7 +2745,7 @@ export const mmCIF_Schema = {
          * A flag to indicate whether this monomer in the entity is
          * heterogeneous in sequence.
          */
-        hetero: Aliased<'NO' | 'N' | 'YES' | 'Y'>(ustr),
+        hetero: Aliased<'no' | 'n' | 'yes' | 'y'>(lstr),
         /**
          * This data item is a pointer to _chem_comp.id in the CHEM_COMP
          * category.
@@ -2817,7 +2817,7 @@ export const mmCIF_Schema = {
         /**
          * The chiral configuration of the first atom making the linkage.
          */
-        atom_stereo_config_1: Aliased<'R' | 'S' | 'N'>(ustr),
+        atom_stereo_config_1: Aliased<'r' | 's' | 'n'>(lstr),
         /**
          * The atom identifier/name for the second atom making the linkage.
          */
@@ -2829,11 +2829,11 @@ export const mmCIF_Schema = {
         /**
          * The chiral configuration of the second atom making the linkage.
          */
-        atom_stereo_config_2: Aliased<'R' | 'S' | 'N'>(ustr),
+        atom_stereo_config_2: Aliased<'r' | 's' | 'n'>(lstr),
         /**
          * The bond order target for the chemical linkage.
          */
-        value_order: Aliased<'SING' | 'DOUB' | 'TRIP' | 'QUAD' | 'AROM' | 'POLY' | 'DELO' | 'PI'>(ustr),
+        value_order: Aliased<'sing' | 'doub' | 'trip' | 'quad' | 'arom' | 'poly' | 'delo' | 'pi'>(lstr),
     },
     /**
      * Data items in the PDBX_ENTITY_BRANCH category specify the list
@@ -2864,7 +2864,7 @@ export const mmCIF_Schema = {
          * A flag to indicate whether this monomer in the entity is
          * heterogeneous in sequence.
          */
-        hetero: Aliased<'NO' | 'N' | 'YES' | 'Y'>(ustr),
+        hetero: Aliased<'no' | 'n' | 'yes' | 'y'>(lstr),
         /**
          * Pointer to _atom_site.label_asym_id.
          */
@@ -3337,15 +3337,15 @@ export const mmCIF_Schema = {
         /**
          * A flag to indicate if the modeling is multi scale.
          */
-        multi_scale_flag: Aliased<'YES' | 'NO'>(ustr),
+        multi_scale_flag: Aliased<'yes' | 'no'>(lstr),
         /**
          * A flag to indicate if the modeling is multi state.
          */
-        multi_state_flag: Aliased<'YES' | 'NO'>(ustr),
+        multi_state_flag: Aliased<'yes' | 'no'>(lstr),
         /**
          * A flag to indicate if the modeling involves an ensemble ordered by time or other order.
          */
-        ordered_flag: Aliased<'YES' | 'NO'>(ustr),
+        ordered_flag: Aliased<'yes' | 'no'>(lstr),
         /**
          * The file id corresponding to the script used in the modeling protocol step.
          * This data item is a pointer to _ihm_external_files.id in the IHM_EXTERNAL_FILES category.
@@ -3634,7 +3634,7 @@ export const mmCIF_Schema = {
          * A flag that indicates whether the dataset is archived in
          * an IHM related database or elsewhere.
          */
-        database_hosted: Aliased<'YES' | 'NO'>(ustr),
+        database_hosted: Aliased<'yes' | 'no'>(lstr),
     },
     /**
      * Category to define groups or collections of input datasets.
@@ -4241,7 +4241,7 @@ export const mmCIF_Schema = {
          * whether the whole image is used or only a portion of it is used (by masking
          * or by other means) as restraint in the modeling.
          */
-        image_segment_flag: Aliased<'YES' | 'NO'>(ustr),
+        image_segment_flag: Aliased<'yes' | 'no'>(lstr),
         /**
          * Number of 2D projections of the model used in the fitting.
          */
@@ -4394,7 +4394,7 @@ export const mmCIF_Schema = {
          * whether the whole SAS profile is used or only a portion of it is used
          * (by masking or by other means) as restraint in the modeling.
          */
-        profile_segment_flag: Aliased<'YES' | 'NO'>(ustr),
+        profile_segment_flag: Aliased<'yes' | 'no'>(lstr),
         /**
          * The type of atoms in the model fit to the SAS data.
          */

+ 1 - 1
src/mol-io/writer/mol/encoder.ts

@@ -42,7 +42,7 @@ export class MolEncoder extends LigandEncoder {
             StringBuilder.writeSafe(ctab, '  0');
             StringBuilder.writeIntegerPadLeft(ctab, this.mapCharge(charge), 3);
             StringBuilder.writeSafe(ctab, '  0  0  0  0  0  0  0  0  0  0\n');
-            if (stereo_config !== 'N') chiral = true;
+            if (stereo_config !== 'n') chiral = true;
 
             // no data for metal ions
             if (!bondMap?.map) return;

+ 3 - 3
src/mol-model-formats/structure/basic/entities.ts

@@ -38,7 +38,7 @@ export function getEntityData(data: BasicData): Entities {
             const entityId = sphere_entity_id.value(i);
             if (!entityIds.has(entityId)) {
                 ids.push(entityId);
-                types.push('POLYMER');
+                types.push('polymer');
                 entityIds.add(entityId);
             }
         }
@@ -48,7 +48,7 @@ export function getEntityData(data: BasicData): Entities {
             const entityId = gaussian_entity_id.value(i);
             if (!entityIds.has(entityId)) {
                 ids.push(entityId);
-                types.push('POLYMER');
+                types.push('polymer');
                 entityIds.add(entityId);
             }
         }
@@ -113,7 +113,7 @@ export function getEntityData(data: BasicData): Entities {
                 const entityId = label_entity_id.value(i);
                 if (!entityIds.has(entityId)) {
                     const compId = label_comp_id.value(i);
-                    const compType = chemCompType.get(compId) || 'OTHER';
+                    const compType = chemCompType.get(compId) || 'other';
                     subtypes[getEntityIndex(entityId)] = getEntitySubtype(compId, compType);
                     entityIds.add(entityId);
                 }

+ 56 - 56
src/mol-model-formats/structure/common/component.ts

@@ -37,48 +37,48 @@ const NonPolymerNames = new Set([
 const StandardComponents = (function () {
     const map = new Map<string, Component>();
     const components: Component[] = [
-        { id: 'HIS', name: 'HISTIDINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'ARG', name: 'ARGININE', type: 'L-PEPTIDE LINKING' },
-        { id: 'LYS', name: 'LYSINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'ILE', name: 'ISOLEUCINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'PHE', name: 'PHENYLALANINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'LEU', name: 'LEUCINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'TRP', name: 'TRYPTOPHAN', type: 'L-PEPTIDE LINKING' },
-        { id: 'ALA', name: 'ALANINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'MET', name: 'METHIONINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'CYS', name: 'CYSTEINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'ASN', name: 'ASPARAGINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'VAL', name: 'VALINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'GLY', name: 'GLYCINE', type: 'PEPTIDE LINKING' },
-        { id: 'SER', name: 'SERINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'GLN', name: 'GLUTAMINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'TYR', name: 'TYROSINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'ASP', name: 'ASPARTIC ACID', type: 'L-PEPTIDE LINKING' },
-        { id: 'GLU', name: 'GLUTAMIC ACID', type: 'L-PEPTIDE LINKING' },
-        { id: 'THR', name: 'THREONINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'PRO', name: 'PROLINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'SEC', name: 'SELENOCYSTEINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'PYL', name: 'PYRROLYSINE', type: 'L-PEPTIDE LINKING' },
-
-        { id: 'MSE', name: 'SELENOMETHIONINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'SEP', name: 'PHOSPHOSERINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'TPO', name: 'PHOSPHOTHREONINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'PTR', name: 'O-PHOSPHOTYROSINE', type: 'L-PEPTIDE LINKING' },
-        { id: 'PCA', name: 'PYROGLUTAMIC ACID', type: 'L-PEPTIDE LINKING' },
-
-        { id: 'A', name: 'ADENOSINE-5\'-MONOPHOSPHATE', type: 'RNA LINKING' },
-        { id: 'C', name: 'CYTIDINE-5\'-MONOPHOSPHATE', type: 'RNA LINKING' },
-        { id: 'T', name: 'THYMIDINE-5\'-MONOPHOSPHATE', type: 'RNA LINKING' },
-        { id: 'G', name: 'GUANOSINE-5\'-MONOPHOSPHATE', type: 'RNA LINKING' },
-        { id: 'I', name: 'INOSINIC ACID', type: 'RNA LINKING' },
-        { id: 'U', name: 'URIDINE-5\'-MONOPHOSPHATE', type: 'RNA LINKING' },
-
-        { id: 'DA', name: '2\'-DEOXYADENOSINE-5\'-MONOPHOSPHATE', type: 'DNA LINKING' },
-        { id: 'DC', name: '2\'-DEOXYCYTIDINE-5\'-MONOPHOSPHATE', type: 'DNA LINKING' },
-        { id: 'DT', name: 'THYMIDINE-5\'-MONOPHOSPHATE', type: 'DNA LINKING' },
-        { id: 'DG', name: '2\'-DEOXYGUANOSINE-5\'-MONOPHOSPHATE', type: 'DNA LINKING' },
-        { id: 'DI', name: '2\'-DEOXYINOSINE-5\'-MONOPHOSPHATE', type: 'DNA LINKING' },
-        { id: 'DU', name: '2\'-DEOXYURIDINE-5\'-MONOPHOSPHATE', type: 'DNA LINKING' },
+        { id: 'HIS', name: 'HISTIDINE', type: 'l-peptide linking' },
+        { id: 'ARG', name: 'ARGININE', type: 'l-peptide linking' },
+        { id: 'LYS', name: 'LYSINE', type: 'l-peptide linking' },
+        { id: 'ILE', name: 'ISOLEUCINE', type: 'l-peptide linking' },
+        { id: 'PHE', name: 'PHENYLALANINE', type: 'l-peptide linking' },
+        { id: 'LEU', name: 'LEUCINE', type: 'l-peptide linking' },
+        { id: 'TRP', name: 'TRYPTOPHAN', type: 'l-peptide linking' },
+        { id: 'ALA', name: 'ALANINE', type: 'l-peptide linking' },
+        { id: 'MET', name: 'METHIONINE', type: 'l-peptide linking' },
+        { id: 'CYS', name: 'CYSTEINE', type: 'l-peptide linking' },
+        { id: 'ASN', name: 'ASPARAGINE', type: 'l-peptide linking' },
+        { id: 'VAL', name: 'VALINE', type: 'l-peptide linking' },
+        { id: 'GLY', name: 'GLYCINE', type: 'peptide linking' },
+        { id: 'SER', name: 'SERINE', type: 'l-peptide linking' },
+        { id: 'GLN', name: 'GLUTAMINE', type: 'l-peptide linking' },
+        { id: 'TYR', name: 'TYROSINE', type: 'l-peptide linking' },
+        { id: 'ASP', name: 'ASPARTIC ACID', type: 'l-peptide linking' },
+        { id: 'GLU', name: 'GLUTAMIC ACID', type: 'l-peptide linking' },
+        { id: 'THR', name: 'THREONINE', type: 'l-peptide linking' },
+        { id: 'PRO', name: 'PROLINE', type: 'l-peptide linking' },
+        { id: 'SEC', name: 'SELENOCYSTEINE', type: 'l-peptide linking' },
+        { id: 'PYL', name: 'PYRROLYSINE', type: 'l-peptide linking' },
+
+        { id: 'MSE', name: 'SELENOMETHIONINE', type: 'l-peptide linking' },
+        { id: 'SEP', name: 'PHOSPHOSERINE', type: 'l-peptide linking' },
+        { id: 'TPO', name: 'PHOSPHOTHREONINE', type: 'l-peptide linking' },
+        { id: 'PTR', name: 'O-PHOSPHOTYROSINE', type: 'l-peptide linking' },
+        { id: 'PCA', name: 'PYROGLUTAMIC ACID', type: 'l-peptide linking' },
+
+        { id: 'A', name: 'ADENOSINE-5\'-MONOPHOSPHATE', type: 'rna linking' },
+        { id: 'C', name: 'CYTIDINE-5\'-MONOPHOSPHATE', type: 'rna linking' },
+        { id: 'T', name: 'THYMIDINE-5\'-MONOPHOSPHATE', type: 'rna linking' },
+        { id: 'G', name: 'GUANOSINE-5\'-MONOPHOSPHATE', type: 'rna linking' },
+        { id: 'I', name: 'INOSINIC ACID', type: 'rna linking' },
+        { id: 'U', name: 'URIDINE-5\'-MONOPHOSPHATE', type: 'rna linking' },
+
+        { id: 'DA', name: '2\'-DEOXYADENOSINE-5\'-MONOPHOSPHATE', type: 'dna linking' },
+        { id: 'DC', name: '2\'-DEOXYCYTIDINE-5\'-MONOPHOSPHATE', type: 'dna linking' },
+        { id: 'DT', name: 'THYMIDINE-5\'-MONOPHOSPHATE', type: 'dna linking' },
+        { id: 'DG', name: '2\'-DEOXYGUANOSINE-5\'-MONOPHOSPHATE', type: 'dna linking' },
+        { id: 'DI', name: '2\'-DEOXYINOSINE-5\'-MONOPHOSPHATE', type: 'dna linking' },
+        { id: 'DU', name: '2\'-DEOXYURIDINE-5\'-MONOPHOSPHATE', type: 'dna linking' },
     ];
     components.forEach(c => map.set(c.id, c));
     return map;
@@ -87,12 +87,12 @@ const StandardComponents = (function () {
 const CharmmIonComponents = (function () {
     const map = new Map<string, Component>();
     const components: Component[] = [
-        { id: 'ZN2', name: 'ZINC ION', type: 'ION' },
-        { id: 'SOD', name: 'SODIUM ION', type: 'ION' },
-        { id: 'CES', name: 'CESIUM ION', type: 'ION' },
-        { id: 'CLA', name: 'CHLORIDE ION', type: 'ION' },
-        { id: 'CAL', name: 'CALCIUM ION', type: 'ION' },
-        { id: 'POT', name: 'POTASSIUM ION', type: 'ION' },
+        { id: 'ZN2', name: 'ZINC ION', type: 'ion' },
+        { id: 'SOD', name: 'SODIUM ION', type: 'ion' },
+        { id: 'CES', name: 'CESIUM ION', type: 'ion' },
+        { id: 'CLA', name: 'CHLORIDE ION', type: 'ion' },
+        { id: 'CAL', name: 'CALCIUM ION', type: 'ion' },
+        { id: 'POT', name: 'POTASSIUM ION', type: 'ion' },
     ];
     components.forEach(c => map.set(c.id, c));
     return map;
@@ -111,7 +111,7 @@ export class ComponentBuilder {
         this.ids.push(c.id);
         this.names.push(c.name);
         this.types.push(c.type);
-        this.mon_nstd_flags.push(PolymerNames.has(c.id) ? 'Y' : 'N');
+        this.mon_nstd_flags.push(PolymerNames.has(c.id) ? 'y' : 'n');
     }
 
     private getAtomIds(index: number) {
@@ -138,13 +138,13 @@ export class ComponentBuilder {
 
     private getType(atomIds: Set<string>): Component['type'] {
         if (this.hasAtomIds(atomIds, ProteinAtomIdsList)) {
-            return 'PEPTIDE LINKING';
+            return 'peptide linking';
         } else if (this.hasAtomIds(atomIds, RnaAtomIdsList)) {
-            return 'RNA LINKING';
+            return 'rna linking';
         } else if (this.hasAtomIds(atomIds, DnaAtomIdsList)) {
-            return 'DNA LINKING';
+            return 'dna linking';
         } else {
-            return 'OTHER';
+            return 'other';
         }
     }
 
@@ -156,11 +156,11 @@ export class ComponentBuilder {
             if (StandardComponents.has(compId)) {
                 this.set(StandardComponents.get(compId)!);
             } else if (WaterNames.has(compId)) {
-                this.set({ id: compId, name: 'WATER', type: 'NON-POLYMER' });
+                this.set({ id: compId, name: 'WATER', type: 'non-polymer' });
             } else if (NonPolymerNames.has(compId.toUpperCase())) {
-                this.set({ id: compId, name: this.namesMap.get(compId) || compId, type: 'NON-POLYMER' });
+                this.set({ id: compId, name: this.namesMap.get(compId) || compId, type: 'non-polymer' });
             } else if (SaccharideCompIdMap.has(compId.toUpperCase())) {
-                this.set({ id: compId, name: this.namesMap.get(compId) || compId, type: 'SACCHARIDE' });
+                this.set({ id: compId, name: this.namesMap.get(compId) || compId, type: 'saccharide' });
             } else {
                 const atomIds = this.getAtomIds(index);
                 if (atomIds.size === 1 && CharmmIonComponents.has(compId)) {

+ 5 - 5
src/mol-model-formats/structure/common/entity.ts

@@ -11,7 +11,7 @@ import { BasicSchema } from '../basic/schema';
 export type EntityCompound = { chains: string[], description: string }
 
 // TODO add support for `branched`
-type EntityType = 'WATER' | 'POLYMER' | 'NON-POLYMER'
+type EntityType = 'water' | 'polymer' | 'non-polymer'
 
 export class EntityBuilder {
     private count = 0;
@@ -35,7 +35,7 @@ export class EntityBuilder {
     getEntityId(compId: string, moleculeType: MoleculeType, chainId: string, options?: { customName?: string }): string {
         if (moleculeType === MoleculeType.Water) {
             if (this.waterId === undefined) {
-                this.set('WATER', options?.customName || 'Water');
+                this.set('water', options?.customName || 'Water');
                 this.waterId = `${this.count}`;
             }
             return this.waterId;
@@ -44,14 +44,14 @@ export class EntityBuilder {
                 return this.compoundsMap.get(chainId)!;
             } else {
                 if (!this.chainMap.has(chainId)) {
-                    this.set('POLYMER', options?.customName || `Polymer ${this.chainMap.size + 1}`);
+                    this.set('polymer', options?.customName || `Polymer ${this.chainMap.size + 1}`);
                     this.chainMap.set(chainId, `${this.count}`);
                 }
                 return this.chainMap.get(chainId)!;
             }
         } else {
             if (!this.heteroMap.has(compId)) {
-                this.set('NON-POLYMER', options?.customName || this.namesMap.get(compId) || compId);
+                this.set('non-polymer', options?.customName || this.namesMap.get(compId) || compId);
                 this.heteroMap.set(compId, `${this.count}`);
             }
             return this.heteroMap.get(compId)!;
@@ -69,7 +69,7 @@ export class EntityBuilder {
     setCompounds(compounds: EntityCompound[]) {
         for (let i = 0, il = compounds.length; i < il; ++i) {
             const { chains, description } = compounds[i];
-            this.set('POLYMER', description);
+            this.set('polymer', description);
             for (let j = 0, jl = chains.length; j < jl; ++j) {
                 this.compoundsMap.set(chains[j], `${this.count}`);
             }

+ 11 - 11
src/mol-model-formats/structure/pdb/secondary-structure.ts

@@ -23,19 +23,19 @@ const HelixTypes: {[k: string]: mmCIF_Schema['struct_conf']['conf_type_id']['T']
     // Left-handed gamma                           8
     // 2 - 7 ribbon/helix                          9
     // Polyproline                                10
-    1: 'HELX_RH_AL_P',
-    2: 'HELX_RH_OM_P',
-    3: 'HELX_RH_PI_P',
-    4: 'HELX_RH_GA_P',
-    5: 'HELX_RH_3T_P',
-    6: 'HELX_LH_AL_P',
-    7: 'HELX_LH_OM_P',
-    8: 'HELX_LH_GA_P',
-    9: 'HELX_RH_27_P', // TODO or left-handed???
-    10: 'HELX_RH_PP_P', // TODO or left-handed???
+    1: 'helx_rh_al_p',
+    2: 'helx_rh_om_p',
+    3: 'helx_rh_pi_p',
+    4: 'helx_rh_ga_p',
+    5: 'helx_rh_3t_p',
+    6: 'helx_lh_al_p',
+    7: 'helx_lh_om_p',
+    8: 'helx_lh_ga_p',
+    9: 'helx_rh_27_p', // TODO or left-handed???
+    10: 'helx_rh_pp_p', // TODO or left-handed???
 };
 function getStructConfTypeId(type: string): mmCIF_Schema['struct_conf']['conf_type_id']['T'] {
-    return HelixTypes[type] || 'HELX_P';
+    return HelixTypes[type] || 'helx_p';
 }
 
 interface PdbHelix {

+ 1 - 1
src/mol-model-formats/structure/property/bonds/chem_comp.ts

@@ -73,7 +73,7 @@ export namespace ComponentBond {
             const nameA = atom_id_1.value(i)!;
             const nameB = atom_id_2.value(i)!;
             const order = value_order.value(i)!;
-            const aromatic = pdbx_aromatic_flag.value(i) === 'Y';
+            const aromatic = pdbx_aromatic_flag.value(i) === 'y';
 
             if (entry.id !== id) {
                 entry = addEntry(id);

+ 8 - 8
src/mol-model-formats/structure/property/bonds/struct_conn.ts

@@ -143,10 +143,10 @@ export namespace StructConn {
             let order = 1;
 
             switch (orderType) {
-                case 'SING': order = 1; break;
-                case 'DOUB': order = 2; break;
-                case 'TRIP': order = 3; break;
-                case 'QUAD': order = 4; break;
+                case 'sing': order = 1; break;
+                case 'doub': order = 2; break;
+                case 'trip': order = 3; break;
+                case 'quad': order = 4; break;
                 default:
                     order = getInterBondOrderFromTable(
                         struct_conn.ptnr1_label_comp_id.value(i),
@@ -157,14 +157,14 @@ export namespace StructConn {
             }
 
             switch (type) {
-                case 'COVALE':
+                case 'covale':
                     flags = BondType.Flag.Covalent;
                     break;
-                case 'DISULF': flags = BondType.Flag.Covalent | BondType.Flag.Disulfide; break;
-                case 'HYDROG':
+                case 'disulf': flags = BondType.Flag.Covalent | BondType.Flag.Disulfide; break;
+                case 'hydrog':
                     flags = BondType.Flag.HydrogenBond;
                     break;
-                case 'METALC': flags = BondType.Flag.MetallicCoordination; break;
+                case 'metalc': flags = BondType.Flag.MetallicCoordination; break;
             }
 
             entries.push({

+ 1 - 1
src/mol-model/structure/model/model.ts

@@ -303,7 +303,7 @@ export namespace Model {
         if (!MmcifFormat.is(model.sourceData)) return false;
         const { db } = model.sourceData.data;
         for (let i = 0, il = db.database_2.database_id.rowCount; i < il; ++i) {
-            if (db.database_2.database_id.value(i) === 'PDB') return true;
+            if (db.database_2.database_id.value(i) === 'pdb') return true;
         }
         return false;
     }

+ 2 - 2
src/mol-model/structure/model/properties/sequence.ts

@@ -60,11 +60,11 @@ namespace StructureSequence {
         for (let cI = 0 as ChainIndex, _cI = hierarchy.chains._rowCount; cI < _cI; cI++) {
             const entityKey = hierarchy.index.getEntityFromChain(cI);
             // Only for polymers, trying to mirror _entity_poly_seq
-            if (byEntityKey[entityKey] !== void 0 || entities.data.type.value(entityKey) !== 'POLYMER') continue;
+            if (byEntityKey[entityKey] !== void 0 || entities.data.type.value(entityKey) !== 'polymer') continue;
 
             const start = cI;
             cI++;
-            while (cI < _cI && entityKey === hierarchy.index.getEntityFromChain(cI) && entities.data.type.value(entityKey) !== 'POLYMER') {
+            while (cI < _cI && entityKey === hierarchy.index.getEntityFromChain(cI) && entities.data.type.value(entityKey) !== 'polymer') {
                 cI++;
             }
             cI--;

+ 31 - 31
src/mol-model/structure/model/types.ts

@@ -166,37 +166,37 @@ type ChemCompType = mmCIF_chemComp_schema['type']['T'];
 
 /** Chemical component type names for D-linked protein */
 export const DProteinComponentTypeNames = new Set<ChemCompType>([
-    'D-PEPTIDE LINKING', 'D-PEPTIDE NH3 AMINO TERMINUS',
-    'D-PEPTIDE COOH CARBOXY TERMINUS', 'D-GAMMA-PEPTIDE, C-DELTA LINKING',
-    'D-BETA-PEPTIDE, C-GAMMA LINKING'
+    'd-peptide linking', 'd-peptide nh3 amino terminus',
+    'd-peptide cooh carboxy terminus', 'd-gamma-peptide, c-delta linking',
+    'd-beta-peptide, c-gamma linking'
 ]);
 
 /** Chemical component type names for L-linked protein */
 export const LProteinComponentTypeNames = new Set<ChemCompType>([
-    'L-PEPTIDE LINKING', 'L-PEPTIDE NH3 AMINO TERMINUS',
-    'L-PEPTIDE COOH CARBOXY TERMINUS', 'L-GAMMA-PEPTIDE, C-DELTA LINKING',
-    'L-BETA-PEPTIDE, C-GAMMA LINKING'
+    'l-peptide linking', 'l-peptide nh3 amino terminus',
+    'l-peptide cooh carboxy terminus', 'l-gamma-peptide, c-delta linking',
+    'l-beta-peptide, c-gamma linking'
 ]);
 
 /** Chemical component type names for gamma protein, overlaps with D/L-linked */
 export const GammaProteinComponentTypeNames = new Set<ChemCompType>([
-    'D-GAMMA-PEPTIDE, C-DELTA LINKING', 'L-GAMMA-PEPTIDE, C-DELTA LINKING'
+    'd-gamma-peptide, c-delta linking', 'l-gamma-peptide, c-delta linking'
 ]);
 
 /** Chemical component type names for beta protein, overlaps with D/L-linked */
 export const BetaProteinComponentTypeNames = new Set<ChemCompType>([
-    'D-BETA-PEPTIDE, C-GAMMA LINKING', 'L-BETA-PEPTIDE, C-GAMMA LINKING'
+    'd-beta-peptide, c-gamma linking', 'l-beta-peptide, c-gamma linking'
 ]);
 
 /** Chemical component type names for protein termini, overlaps with D/L-linked */
 export const ProteinTerminusComponentTypeNames = new Set<ChemCompType>([
-    'D-PEPTIDE NH3 AMINO TERMINUS', 'D-PEPTIDE COOH CARBOXY TERMINUS',
-    'L-PEPTIDE NH3 AMINO TERMINUS', 'L-PEPTIDE COOH CARBOXY TERMINUS'
+    'd-peptide nh3 amino terminus', 'd-peptide cooh carboxy terminus',
+    'l-peptide nh3 amino terminus', 'l-peptide cooh carboxy terminus'
 ]);
 
 /** Chemical component type names for peptide-like protein */
 export const OtherProteinComponentTypeNames = new Set<ChemCompType>([
-    'PEPTIDE LINKING', 'PEPTIDE-LIKE',
+    'peptide linking', 'peptide-like',
 ]);
 
 /** Chemical component type names for protein */
@@ -206,41 +206,41 @@ export const ProteinComponentTypeNames = SetUtils.unionMany(
 
 /** Chemical component type names for DNA */
 export const DNAComponentTypeNames = new Set<ChemCompType>([
-    'DNA LINKING', 'L-DNA LINKING', 'DNA OH 5 PRIME TERMINUS', 'DNA OH 3 PRIME TERMINUS',
+    'dna linking', 'l-dna linking', 'dna oh 5 prime terminus', 'dna oh 3 prime terminus',
 ]);
 
 /** Chemical component type names for RNA */
 export const RNAComponentTypeNames = new Set<ChemCompType>([
-    'RNA LINKING', 'L-RNA LINKING', 'RNA OH 5 PRIME TERMINUS', 'RNA OH 3 PRIME TERMINUS',
+    'rna linking', 'l-rna linking', 'rna oh 5 prime terminus', 'rna oh 3 prime terminus',
 ]);
 
 /** Chemical component type names for saccharide */
 export const SaccharideComponentTypeNames = SetUtils.unionMany(
     new Set<ChemCompType>([
-        'D-SACCHARIDE, BETA LINKING', 'L-SACCHARIDE, BETA LINKING',
-        'D-SACCHARIDE, ALPHA LINKING', 'L-SACCHARIDE, ALPHA LINKING',
-        'L-SACCHARIDE', 'D-SACCHARIDE', 'SACCHARIDE',
+        'd-saccharide, beta linking', 'l-saccharide, beta linking',
+        'd-saccharide, alpha linking', 'l-saccharide, alpha linking',
+        'l-saccharide', 'd-saccharide', 'saccharide',
     ]),
     // deprecated in the mmCIF dictionary, kept for backward compatibility
     new Set([
-        'D-SACCHARIDE 1,4 AND 1,4 LINKING', 'L-SACCHARIDE 1,4 AND 1,4 LINKING',
-        'D-SACCHARIDE 1,4 AND 1,6 LINKING', 'L-SACCHARIDE 1,4 AND 1,6 LINKING'
+        'd-saccharide 1,4 and 1,4 linking', 'l-saccharide 1,4 and 1,4 linking',
+        'd-saccharide 1,4 and 1,6 linking', 'l-saccharide 1,4 and 1,6 linking'
     ]),
 );
 
 /** Chemical component type names for other */
 export const OtherComponentTypeNames = new Set<ChemCompType>([
-    'NON-POLYMER', 'OTHER'
+    'non-polymer', 'other'
 ]);
 
 /** Chemical component type names for ion (extension to mmcif) */
 export const IonComponentTypeNames = new Set<ChemCompType>([
-    'ION'
+    'ion'
 ]);
 
 /** Chemical component type names for lipid (extension to mmcif) */
 export const LipidComponentTypeNames = new Set<ChemCompType>([
-    'LIPID'
+    'lipid'
 ]);
 
 /** Common names for water molecules */
@@ -365,15 +365,15 @@ export function getPolymerType(compType: ChemCompType, molType: MoleculeType): P
 export function getComponentType(compId: string): ChemCompType {
     compId = compId.toUpperCase();
     if (AminoAcidNames.has(compId)) {
-        return 'PEPTIDE LINKING';
+        return 'peptide linking';
     } else if (RnaBaseNames.has(compId)) {
-        return 'RNA LINKING';
+        return 'rna linking';
     } else if (DnaBaseNames.has(compId)) {
-        return 'DNA LINKING';
+        return 'dna linking';
     } else if (SaccharideCompIdMap.has(compId)) {
-        return 'SACCHARIDE';
+        return 'saccharide';
     } else {
-        return 'OTHER';
+        return 'other';
     }
 }
 
@@ -385,7 +385,7 @@ export function getDefaultChemicalComponent(compId: string): ChemicalComponent {
         formula_weight: 0,
         id: compId,
         name: compId,
-        mon_nstd_flag: PolymerNames.has(compId) ? 'Y' : 'N',
+        mon_nstd_flag: PolymerNames.has(compId) ? 'y' : 'n',
         pdbx_synonyms: [],
         type: getComponentType(compId)
     };
@@ -394,13 +394,13 @@ export function getDefaultChemicalComponent(compId: string): ChemicalComponent {
 export function getEntityType(compId: string): mmCIF_Schema['entity']['type']['T'] {
     compId = compId.toUpperCase();
     if (WaterNames.has(compId)) {
-        return 'WATER';
+        return 'water';
     } else if (PolymerNames.has(compId)) {
-        return 'POLYMER';
+        return 'polymer';
     } else if (SaccharideCompIdMap.has(compId)) {
-        return 'BRANCHED';
+        return 'branched';
     } else {
-        return 'NON-POLYMER';
+        return 'non-polymer';
     }
 }
 

+ 4 - 4
src/mol-model/structure/query/queries/internal.ts

@@ -30,7 +30,7 @@ export function atomicSequence(): StructureQuery {
             l.unit = unit;
             const elements = unit.elements;
             l.element = elements[0];
-            if (P.entity.type(l) !== 'POLYMER') continue;
+            if (P.entity.type(l) !== 'polymer') continue;
 
             const residuesIt = Segmentation.transientSegments(unit.model.atomicHierarchy.residueAtomSegments, elements);
             let residueCount = 0;
@@ -59,7 +59,7 @@ export function water(): StructureQuery {
             l.unit = unit;
             const elements = unit.elements;
             l.element = elements[0];
-            if (P.entity.type(l) !== 'WATER') continue;
+            if (P.entity.type(l) !== 'water') continue;
             units.push(unit);
         }
         return StructureSelection.Singletons(inputStructure, Structure.create(units, { parent: inputStructure }));
@@ -78,8 +78,8 @@ export function atomicHet(): StructureQuery {
             l.unit = unit;
             const elements = unit.elements;
             l.element = elements[0];
-            if (P.entity.type(l) === 'WATER') continue;
-            if (P.entity.type(l) === 'POLYMER') {
+            if (P.entity.type(l) === 'water') continue;
+            if (P.entity.type(l) === 'polymer') {
                 const residuesIt = Segmentation.transientSegments(unit.model.atomicHierarchy.residueAtomSegments, elements);
                 let residueCount = 0;
                 while (residuesIt.hasNext) {

+ 3 - 3
src/mol-model/structure/query/queries/modifiers.ts

@@ -492,7 +492,7 @@ export function surroundingLigands({ query, radius, includeWater }: SurroundingL
                 const entityType = StructureProperties.entity.type(l);
 
                 // test entity and chain
-                if (entityType === 'WATER' || entityType === 'POLYMER') continue;
+                if (entityType === 'water' || entityType === 'polymer') continue;
 
                 residuesIt.setSegment(chainSegment);
                 while (residuesIt.hasNext) {
@@ -575,7 +575,7 @@ export function surroundingLigands({ query, radius, includeWater }: SurroundingL
 
 const _entity_type = StructureProperties.entity.type;
 function testIsWater(l: StructureElement.Location) {
-    return _entity_type(l) === 'WATER';
+    return _entity_type(l) === 'water';
 }
 
 function getPrdAsymIdx(structure: Structure) {
@@ -602,7 +602,7 @@ function getStructConnInfo(structure: Structure) {
 
     for (let i = 0; i < struct_conn._rowCount; i++) {
         const bondType = conn_type_id.value(i);
-        if (bondType !== 'COVALE' && bondType !== 'METALC') continue;
+        if (bondType !== 'covale' && bondType !== 'metalc') continue;
 
         const a: ResidueSetEntry = {
             label_asym_id: ptnr1_label_asym_id.value(i),

+ 2 - 2
src/mol-model/structure/structure/structure.ts

@@ -855,12 +855,12 @@ namespace Structure {
 
     function isWaterChain(model: Model, chainIndex: ChainIndex) {
         const e = model.atomicHierarchy.index.getEntityFromChain(chainIndex);
-        return model.entities.data.type.value(e) === 'WATER';
+        return model.entities.data.type.value(e) === 'water';
     }
 
     function isPolymerChain(model: Model, chainIndex: ChainIndex) {
         const e = model.atomicHierarchy.index.getEntityFromChain(chainIndex);
-        return model.entities.data.type.value(e) === 'POLYMER';
+        return model.entities.data.type.value(e) === 'polymer';
     }
 
     function partitionAtomicUnitByAtom(model: Model, indices: SortedArray, builder: StructureBuilder, multiChain: boolean, operator: SymmetryOperator) {

+ 13 - 13
src/mol-plugin-state/helpers/structure-selection-query.ts

@@ -91,7 +91,7 @@ const current = StructureSelectionQuery('Current Selection', MS.internal.generat
 const polymer = StructureSelectionQuery('Polymer', MS.struct.modifier.union([
     MS.struct.generator.atomGroups({
         'entity-test': MS.core.logic.and([
-            MS.core.rel.eq([MS.ammp('entityType'), 'POLYMER']),
+            MS.core.rel.eq([MS.ammp('entityType'), 'polymer']),
             MS.core.str.match([
                 MS.re('(polypeptide|cyclic-pseudo-peptide|peptide-like|nucleotide|peptide nucleic acid)', 'i'),
                 MS.ammp('entitySubtype')
@@ -104,7 +104,7 @@ const trace = StructureSelectionQuery('Trace', MS.struct.modifier.union([
     MS.struct.combinator.merge([
         MS.struct.modifier.union([
             MS.struct.generator.atomGroups({
-                'entity-test': MS.core.rel.eq([MS.ammp('entityType'), 'POLYMER']),
+                'entity-test': MS.core.rel.eq([MS.ammp('entityType'), 'polymer']),
                 'chain-test': MS.core.set.has([
                     MS.set('sphere', 'gaussian'), MS.ammp('objectPrimitive')
                 ])
@@ -112,7 +112,7 @@ const trace = StructureSelectionQuery('Trace', MS.struct.modifier.union([
         ]),
         MS.struct.modifier.union([
             MS.struct.generator.atomGroups({
-                'entity-test': MS.core.rel.eq([MS.ammp('entityType'), 'POLYMER']),
+                'entity-test': MS.core.rel.eq([MS.ammp('entityType'), 'polymer']),
                 'chain-test': MS.core.rel.eq([MS.ammp('objectPrimitive'), 'atomistic']),
                 'atom-test': MS.core.set.has([MS.set('CA', 'P'), MS.ammp('label_atom_id')])
             })
@@ -121,7 +121,7 @@ const trace = StructureSelectionQuery('Trace', MS.struct.modifier.union([
 ]), { category: StructureSelectionCategory.Structure });
 
 const _proteinEntityTest = MS.core.logic.and([
-    MS.core.rel.eq([MS.ammp('entityType'), 'POLYMER']),
+    MS.core.rel.eq([MS.ammp('entityType'), 'polymer']),
     MS.core.str.match([
         MS.re('(polypeptide|cyclic-pseudo-peptide|peptide-like)', 'i'),
         MS.ammp('entitySubtype')
@@ -129,7 +129,7 @@ const _proteinEntityTest = MS.core.logic.and([
 ]);
 
 const _nucleiEntityTest = MS.core.logic.and([
-    MS.core.rel.eq([MS.ammp('entityType'), 'POLYMER']),
+    MS.core.rel.eq([MS.ammp('entityType'), 'polymer']),
     MS.core.str.match([
         MS.re('(nucleotide|peptide nucleic acid)', 'i'),
         MS.ammp('entitySubtype')
@@ -275,7 +275,7 @@ const beta = StructureSelectionQuery('Beta Strand/Sheet', MS.struct.modifier.uni
 
 const water = StructureSelectionQuery('Water', MS.struct.modifier.union([
     MS.struct.generator.atomGroups({
-        'entity-test': MS.core.rel.eq([MS.ammp('entityType'), 'WATER'])
+        'entity-test': MS.core.rel.eq([MS.ammp('entityType'), 'water'])
     })
 ]), { category: StructureSelectionCategory.Type });
 
@@ -294,9 +294,9 @@ const lipid = StructureSelectionQuery('Lipid', MS.struct.modifier.union([
 const branched = StructureSelectionQuery('Carbohydrate', MS.struct.modifier.union([
     MS.struct.generator.atomGroups({
         'entity-test': MS.core.logic.or([
-            MS.core.rel.eq([MS.ammp('entityType'), 'BRANCHED']),
+            MS.core.rel.eq([MS.ammp('entityType'), 'branched']),
             MS.core.logic.and([
-                MS.core.rel.eq([MS.ammp('entityType'), 'NON-POLYMER']),
+                MS.core.rel.eq([MS.ammp('entityType'), 'non-polymer']),
                 MS.core.str.match([
                     MS.re('oligosaccharide', 'i'),
                     MS.ammp('entitySubtype')
@@ -327,7 +327,7 @@ const ligand = StructureSelectionQuery('Ligand', MS.struct.modifier.union([
                     MS.struct.generator.atomGroups({
                         'entity-test': MS.core.logic.and([
                             MS.core.logic.or([
-                                MS.core.rel.eq([MS.ammp('entityType'), 'NON-POLYMER']),
+                                MS.core.rel.eq([MS.ammp('entityType'), 'non-polymer']),
                                 MS.core.rel.neq([MS.ammp('entityPrdId'), ''])
                             ]),
                             MS.core.logic.not([MS.core.str.match([
@@ -343,7 +343,7 @@ const ligand = StructureSelectionQuery('Ligand', MS.struct.modifier.union([
                 ]),
                 MS.struct.modifier.union([
                     MS.struct.generator.atomGroups({
-                        'entity-test': MS.core.rel.eq([MS.ammp('entityType'), 'POLYMER']),
+                        'entity-test': MS.core.rel.eq([MS.ammp('entityType'), 'polymer']),
                         'chain-test': MS.core.rel.eq([MS.ammp('objectPrimitive'), 'atomistic']),
                         'residue-test': _nonPolymerResidueTest
                     })
@@ -352,7 +352,7 @@ 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']),
+                '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')
@@ -447,7 +447,7 @@ const nosBridges = StructureSelectionQuery('NOS Bridges', MS.struct.modifier.uni
 
 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']),
+        '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')
     })
@@ -683,7 +683,7 @@ export function getPolymerAndBranchedEntityQueries(structures: Structure[]) {
             l.unit = ug.units[0];
             l.element = ug.elements[0];
             const entityType = StructureProperties.entity.type(l);
-            if (entityType === 'POLYMER' || entityType === 'BRANCHED') {
+            if (entityType === 'polymer' || entityType === 'branched') {
                 const description = StructureProperties.entity.pdbx_description(l);
                 uniqueEntities.set(description.join(', '), description);
             }

+ 1 - 1
src/mol-plugin-ui/sequence.tsx

@@ -108,7 +108,7 @@ function getModelEntityOptions(structure: Structure, polymersOnly = false): [str
         const modelIdx = structure.getModelIndex(unit.model);
         const key = `${modelIdx}|${id}`;
         if (seen.has(key)) continue;
-        if (polymersOnly && SP.entity.type(l) !== 'POLYMER') continue;
+        if (polymersOnly && SP.entity.type(l) !== 'polymer') continue;
 
         let description = SP.entity.pdbx_description(l).join(', ');
         if (structure.models.length) {

+ 2 - 2
src/mol-plugin-ui/structure/focus.tsx

@@ -62,8 +62,8 @@ function getFocusEntries(structure: Structure) {
         l.element = ug.elements[0];
         const isMultiChain = Unit.Traits.is(l.unit.traits, Unit.Trait.MultiChain);
         const entityType = StructureProperties.entity.type(l);
-        const isNonPolymer = entityType === 'NON-POLYMER';
-        const isBranched = entityType === 'BRANCHED';
+        const isNonPolymer = entityType === 'non-polymer';
+        const isBranched = entityType === 'branched';
         const isBirdMolecule = !!StructureProperties.entity.prd_id(l);
 
         if (isBirdMolecule) {

+ 1 - 1
src/mol-plugin-ui/structure/superposition.tsx

@@ -272,7 +272,7 @@ export class SuperpositionControls extends PurePluginUIComponent<{ }, Superposit
 
             // only single polymer chain selections
             const l = StructureElement.Loci.getFirstLocation(selection, location)!;
-            if (selection.elements.length > 1 || StructureProperties.entity.type(l) !== 'POLYMER') return;
+            if (selection.elements.length > 1 || StructureProperties.entity.type(l) !== 'polymer') return;
 
             const stats = StructureElement.Stats.ofLoci(selection);
             const counts = structureElementStatsLabel(stats, { countsOnly: true });

+ 2 - 2
src/mol-theme/color/polymer-id.ts

@@ -60,7 +60,7 @@ function getPolymerAsymIdSerialMap(structure: Structure) {
                 const { index: chainIndex } = chainIt.move();
                 const entityId = chains.label_entity_id.value(chainIndex);
                 const eI = model.entities.getEntityIndex(entityId);
-                if (model.entities.data.type.value(eI) === 'POLYMER') {
+                if (model.entities.data.type.value(eI) === 'polymer') {
                     const asymId = chains.label_asym_id.value(chainIndex);
                     if (!map.has(asymId)) map.set(asymId, map.size);
                 }
@@ -75,7 +75,7 @@ function getPolymerAsymIdSerialMap(structure: Structure) {
                 const elementIndex = chainElementSegments.offsets[chainIndex];
                 const entityId = entity_id.value(elementIndex);
                 const eI = model.entities.getEntityIndex(entityId);
-                if (model.entities.data.type.value(eI) === 'POLYMER') {
+                if (model.entities.data.type.value(eI) === 'polymer') {
                     const asymId = asym_id.value(elementIndex);
                     if (!map.has(asymId)) map.set(asymId, map.size);
                 }