Browse Source

mol format tweaks

Alexander Rose 5 years ago
parent
commit
b2376aea70

+ 1 - 1
src/mol-io/reader/mol/parser.ts

@@ -109,7 +109,7 @@ function parseInternal(data: string): Result<MolFile> {
 }
 
 export function parseMol(data: string) {
-    return Task.create<Result<MolFile>>('Parse PSF', async () => {
+    return Task.create<Result<MolFile>>('Parse Mol', async () => {
         return parseInternal(data)
     });
 }

+ 3 - 0
src/mol-model-formats/structure/mol.ts

@@ -47,8 +47,11 @@ async function getModels(mol: MolFile, ctx: RuntimeContext): Promise<Model[]> {
     }, atoms.count);
 
     const entityBuilder = new EntityBuilder()
+    entityBuilder.setNames([['UNK', 'Unknown Entity']])
     entityBuilder.getEntityId('UNK', MoleculeType.Unknown, 'A');
+
     const componentBuilder = new ComponentBuilder(seq_id, type_symbol);
+    componentBuilder.setNames([['UNK', 'Unknown Residue']])
     componentBuilder.add('UNK', 0);
 
     const basics = createBasic({

+ 1 - 0
src/mol-plugin-ui/structure/focus.tsx

@@ -37,6 +37,7 @@ function addSymmetryGroupEntries(entries: Map<string, FocusEntry[]>, location: S
         ])
 
         let label = lociLabel(loci, { reverse: true, hidePrefix: true, htmlStyling: false, granularity: 'residue' })
+        if (!label) label = lociLabel(loci, { hidePrefix: false, htmlStyling: false })
         if (unitSymmetryGroup.units.length > 1) {
             label += ` | ${loci.elements[0].unit.conformation.operator.name}`
         }