Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
papillot committed Apr 28, 2024
1 parent 3de3ffd commit 0f37a74
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/parser/cif-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,6 @@ const valueOrder2bondOrder: Record<string, number> = {
TRIP: 3
}

function trimQuotes (str: string) {
if (str && str[0] === str[ str.length - 1 ] && (str[0] === "'" || str[0] === '"')) {
return str.substring(1, str.length - 1)
} else {
return str
}
}

function hasValue (d: string) {
return d !== '?'
}

function getBondOrder (valueOrder: string) {
switch (valueOrder.toLowerCase()) {
case '?': // assume single bond
Expand Down Expand Up @@ -624,9 +612,8 @@ function processSymmetry (cif: CifCategories, structure: Structure, asymIdDict:
}

if (cif.symmetry) {
unitcellDict.spacegroup = trimQuotes(
cif.symmetry.getField('space_group_name_H-M')!.str(0)
)
unitcellDict.spacegroup = cif.symmetry.getField('space_group_name_H-M')!.str(0)

}

// origx
Expand Down Expand Up @@ -724,7 +711,6 @@ function processConnections (cif: CifCategories, structure: Structure, asymIdDic

if (sc) {

const reDoubleQuote = /"/g
const ap1 = structure.getAtomProxy()
const ap2 = structure.getAtomProxy()
const atomIndicesCache: {[k: string]: Uint32Array|undefined} = {}
Expand Down

0 comments on commit 0f37a74

Please sign in to comment.