Browse Source

fix unit cell spelling

Alexander Rose 4 years ago
parent
commit
8149a25ad4

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

@@ -80,7 +80,7 @@ namespace Symmetry {
         const gamma = radToDeg(anglesInRadians[2]).toFixed(2);
         const label: string[] = [];
         // name
-        label.push(`Unitcell <b>${name}</b> #${num}`);
+        label.push(`Unit Cell <b>${name}</b> #${num}`);
         // sizes
         label.push(`${a}\u00D7${b}\u00D7${c} \u212B`);
         // angles

+ 0 - 15
src/mol-model/structure/util.ts

@@ -65,21 +65,6 @@ export function elementLabel(model: Model, index: ElementIndex) {
     return `[${label_comp_id.value(residueIndex)}]${auth_seq_id.value(residueIndex)}:${auth_asym_id.value(chainIndex)}.${label_atom_id.value(index)}`;
 }
 
-// const centerPos = Vec3.zero()
-// const centerMin = Vec3.zero()
-// export function getCenterAndRadius(centroid: Vec3, unit: Unit, indices: ArrayLike<number>) {
-//     const pos = unit.conformation.position
-//     const { elements } = unit
-//     Vec3.set(centroid, 0, 0, 0)
-//     for (let i = 0, il = indices.length; i < il; ++i) {
-//         pos(elements[indices[i]], centerPos)
-//         Vec3.add(centroid, centroid, centerPos)
-//         Vec3.min(centerMin, centerMin, centerPos)
-//     }
-//     Vec3.scale(centroid, centroid, 1/indices.length)
-//     return Vec3.distance(centerMin, centroid)
-// }
-
 const tmpPositionsVec = Vec3.zero();
 export function getPositions(unit: Unit, indices: ArrayLike<number>): NumberArray {
     const pos = unit.conformation.position;

+ 4 - 4
src/mol-plugin-state/builder/structure/hierarchy-preset.ts

@@ -140,8 +140,8 @@ async function applyCrystalSymmetry(props: { ijkMin: Vec3, ijkMax: Vec3, theme?:
 const unitcell = TrajectoryHierarchyPresetProvider({
     id: 'preset-trajectory-unitcell',
     display: {
-        name: 'Unitcell', group: 'Preset',
-        description: 'Shows the fully populated unitcell.'
+        name: 'Unit Cell', group: 'Preset',
+        description: 'Shows the fully populated unit cell.'
     },
     isApplicable: o => {
         return Model.hasCrystalSymmetry(o.data[0]);
@@ -155,8 +155,8 @@ const unitcell = TrajectoryHierarchyPresetProvider({
 const supercell = TrajectoryHierarchyPresetProvider({
     id: 'preset-trajectory-supercell',
     display: {
-        name: 'Supercell', group: 'Preset',
-        description: 'Shows the supercell, i.e. the central unitcell and all adjacent unitcells.'
+        name: 'Super Cell', group: 'Preset',
+        description: 'Shows the super cell, i.e. the central unit cell and all adjacent unit cells.'
     },
     isApplicable: o => {
         return Model.hasCrystalSymmetry(o.data[0]);

+ 4 - 4
src/mol-plugin-state/transforms/representation.ts

@@ -699,7 +699,7 @@ export { ModelUnitcell3D };
 type ModelUnitcell3D = typeof ModelUnitcell3D
 const ModelUnitcell3D = PluginStateTransform.BuiltIn({
     name: 'model-unitcell-3d',
-    display: 'Model Unitcell',
+    display: 'Model Unit Cell',
     from: SO.Molecule.Model,
     to: SO.Shape.Representation3D,
     params: {
@@ -711,17 +711,17 @@ const ModelUnitcell3D = PluginStateTransform.BuiltIn({
         return true;
     },
     apply({ a, params }, plugin: PluginContext) {
-        return Task.create('Model Unitcell', async ctx => {
+        return Task.create('Model Unit Cell', async ctx => {
             const symmetry = ModelSymmetry.Provider.get(a.data);
             if (!symmetry) return StateObject.Null;
             const data = getUnitcellData(a.data, symmetry);
             const repr = UnitcellRepresentation({ webgl: plugin.canvas3d?.webgl, ...plugin.representation.structure.themes }, () => UnitcellParams);
             await repr.createOrUpdate(params, data).runInContext(ctx);
-            return new SO.Shape.Representation3D({ repr, source: a }, { label: `Unitcell`, description: symmetry.spacegroup.name });
+            return new SO.Shape.Representation3D({ repr, source: a }, { label: `Unit Cell`, description: symmetry.spacegroup.name });
         });
     },
     update({ a, b, newParams }) {
-        return Task.create('Model Unitcell', async ctx => {
+        return Task.create('Model Unit Cell', async ctx => {
             const symmetry = ModelSymmetry.Provider.get(a.data);
             if (!symmetry) return StateTransformer.UpdateResult.Null;
             const props = { ...b.data.repr.props, ...newParams };

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

@@ -34,7 +34,7 @@ export class GenericEntryListControls extends PurePluginUIComponent {
         }
         if (refs.length === 0) return null;
 
-        return <GenericEntry refs={refs} labelMultiple='Unitcells' />;
+        return <GenericEntry refs={refs} labelMultiple='Unit Cells' />;
     }
 
     get customControls(): JSX.Element[] | null {

+ 1 - 1
src/mol-repr/shape/model/unitcell.ts

@@ -107,5 +107,5 @@ export function getUnitcellData(model: Model, symmetry: Symmetry) {
 
 export type UnitcellRepresentation = Representation<UnitcellData, UnitcellParams>
 export function UnitcellRepresentation(ctx: RepresentationContext, getParams: RepresentationParamsGetter<UnitcellData, UnitcellParams>): UnitcellRepresentation {
-    return Representation.createMulti('Unitcell', ctx, getParams, Representation.StateBuilder, UnitcellVisuals as unknown as Representation.Def<UnitcellData, UnitcellParams>);
+    return Representation.createMulti('Unit Cell', ctx, getParams, Representation.StateBuilder, UnitcellVisuals as unknown as Representation.Def<UnitcellData, UnitcellParams>);
 }