math-exercises 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/exercise.d.ts +1 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/logPowerEquation.js +2 -2
- package/lib/exercises/math/percent/findProportion.d.ts +8 -0
- package/lib/exercises/math/percent/findProportion.d.ts.map +1 -0
- package/lib/exercises/math/percent/findProportion.js +48 -0
- package/lib/exercises/math/percent/index.d.ts +1 -0
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +1 -0
- package/lib/exercises/math/powers/decimalToScientific.js +4 -4
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.d.ts +8 -0
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +58 -0
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.d.ts +8 -0
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +63 -0
- package/lib/exercises/pc/chemicalElements/calculateVolumetricMass.d.ts +5 -0
- package/lib/exercises/pc/chemicalElements/calculateVolumetricMass.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalElements/calculateVolumetricMass.js +76 -0
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts +10 -0
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +68 -0
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.d.ts +8 -0
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.js +58 -0
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.d.ts +8 -0
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.js +59 -0
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.d.ts +8 -0
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +101 -0
- package/lib/exercises/pc/chemicalElements/index.d.ts +9 -0
- package/lib/exercises/pc/chemicalElements/index.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalElements/index.js +24 -0
- package/lib/exercises/pc/chemicalElements/weightPercent.d.ts +10 -0
- package/lib/exercises/pc/chemicalElements/weightPercent.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalElements/weightPercent.js +107 -0
- package/lib/exercises/pc/chemicalEquations.js +1 -1
- package/lib/exercises/pc/forces/gravitationalAttractionValue.d.ts +7 -0
- package/lib/exercises/pc/forces/gravitationalAttractionValue.d.ts.map +1 -0
- package/lib/exercises/pc/forces/gravitationalAttractionValue.js +71 -0
- package/lib/exercises/pc/forces/index.d.ts +2 -0
- package/lib/exercises/pc/forces/index.d.ts.map +1 -0
- package/lib/exercises/pc/forces/index.js +17 -0
- package/lib/exercises/pc/index.d.ts +35 -0
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +40 -0
- package/lib/exercises/pc/math/index.d.ts +2 -0
- package/lib/exercises/pc/math/index.d.ts.map +1 -0
- package/lib/exercises/pc/math/index.js +18 -0
- package/lib/exercises/pc/math/isolateVariables.d.ts +8 -0
- package/lib/exercises/pc/math/isolateVariables.d.ts.map +1 -0
- package/lib/exercises/pc/math/isolateVariables.js +304 -0
- package/lib/exercises/pc/math/proportionnalityCoeffFromLine.d.ts +10 -0
- package/lib/exercises/pc/math/proportionnalityCoeffFromLine.d.ts.map +1 -0
- package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +81 -0
- package/lib/exercises/pc/motion/recognizeFreeFall.d.ts +1 -0
- package/lib/exercises/pc/motion/recognizeFreeFall.d.ts.map +1 -0
- package/lib/exercises/pc/motion/recognizeFreeFall.js +53 -0
- package/lib/exercises/pc/sound/findPeriodFromGraph.d.ts +8 -0
- package/lib/exercises/pc/sound/findPeriodFromGraph.d.ts.map +1 -0
- package/lib/exercises/pc/sound/findPeriodFromGraph.js +80 -0
- package/lib/exercises/pc/sound/findSoundFrequencyFromPeriod.d.ts +7 -0
- package/lib/exercises/pc/sound/findSoundFrequencyFromPeriod.d.ts.map +1 -0
- package/lib/exercises/pc/sound/findSoundFrequencyFromPeriod.js +51 -0
- package/lib/exercises/pc/sound/findSoundPeriodFromFrequency.d.ts +7 -0
- package/lib/exercises/pc/sound/findSoundPeriodFromFrequency.d.ts.map +1 -0
- package/lib/exercises/pc/sound/findSoundPeriodFromFrequency.js +58 -0
- package/lib/exercises/pc/sound/frequencyComparison.d.ts +9 -0
- package/lib/exercises/pc/sound/frequencyComparison.d.ts.map +1 -0
- package/lib/exercises/pc/sound/frequencyComparison.js +51 -0
- package/lib/exercises/pc/sound/index.d.ts +5 -0
- package/lib/exercises/pc/sound/index.d.ts.map +1 -0
- package/lib/exercises/pc/sound/index.js +20 -0
- package/lib/exercises/pc/waves/findDistanceFromEarth.d.ts +7 -0
- package/lib/exercises/pc/waves/findDistanceFromEarth.d.ts.map +1 -0
- package/lib/exercises/pc/waves/findDistanceFromEarth.js +66 -0
- package/lib/exercises/pc/waves/index.d.ts +2 -0
- package/lib/exercises/pc/waves/index.d.ts.map +1 -0
- package/lib/exercises/pc/waves/index.js +17 -0
- package/lib/exercises/pc/weight/index.d.ts +2 -0
- package/lib/exercises/pc/weight/index.d.ts.map +1 -0
- package/lib/exercises/pc/weight/index.js +17 -0
- package/lib/exercises/pc/weight/weightOnTheMoon.d.ts +8 -0
- package/lib/exercises/pc/weight/weightOnTheMoon.d.ts.map +1 -0
- package/lib/exercises/pc/weight/weightOnTheMoon.js +64 -0
- package/lib/exercises/utils/getAtoms.d.ts +2 -0
- package/lib/exercises/utils/getAtoms.d.ts.map +1 -0
- package/lib/exercises/utils/getAtoms.js +11 -0
- package/lib/exercises/utils/getElectronicConfigurationFromShells.d.ts +2 -0
- package/lib/exercises/utils/getElectronicConfigurationFromShells.d.ts.map +1 -0
- package/lib/exercises/utils/getElectronicConfigurationFromShells.js +19 -0
- package/lib/geogebra/geogebraConstructor.d.ts +2 -0
- package/lib/geogebra/geogebraConstructor.d.ts.map +1 -1
- package/lib/geogebra/geogebraConstructor.js +2 -0
- package/lib/index.d.ts +233 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -0
- package/lib/math/numbers/decimals/decimal.d.ts +3 -3
- package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
- package/lib/math/numbers/decimals/decimal.js +39 -19
- package/lib/math/utils/random/randfloat.d.ts +1 -1
- package/lib/math/utils/random/randfloat.d.ts.map +1 -1
- package/lib/math/utils/random/randfloat.js +4 -7
- package/lib/math/utils/round.d.ts +2 -1
- package/lib/math/utils/round.d.ts.map +1 -1
- package/lib/math/utils/round.js +10 -3
- package/lib/pc/constants/atoms.d.ts +8 -0
- package/lib/pc/constants/atoms.d.ts.map +1 -0
- package/lib/pc/constants/atoms.js +9 -0
- package/lib/pc/constants/earth.d.ts +9 -0
- package/lib/pc/constants/earth.d.ts.map +1 -0
- package/lib/pc/constants/earth.js +12 -0
- package/lib/pc/constants/gravity.d.ts +10 -0
- package/lib/pc/constants/gravity.d.ts.map +1 -0
- package/lib/pc/constants/gravity.js +16 -0
- package/lib/pc/measure/measure.d.ts +15 -0
- package/lib/pc/measure/measure.d.ts.map +1 -0
- package/lib/pc/measure/measure.js +97 -0
- package/lib/pc/molecularChemistry/atome.d.ts +3 -2
- package/lib/pc/molecularChemistry/atome.d.ts.map +1 -1
- package/lib/pc/molecularChemistry/atome.js +156 -120
- package/lib/pc/molecularChemistry/molecule.d.ts +3 -2
- package/lib/pc/molecularChemistry/molecule.d.ts.map +1 -1
- package/lib/pc/molecularChemistry/molecule.js +11 -0
- package/lib/pc/molecularChemistry/reaction.d.ts +2 -1
- package/lib/pc/molecularChemistry/reaction.d.ts.map +1 -1
- package/lib/pc/molecularChemistry/reaction.js +9 -0
- package/lib/server.d.ts +1 -0
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +5 -0
- package/lib/tree/nodes/algebraicNode.d.ts +1 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.js +0 -1
- package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
- package/lib/tree/nodes/node.d.ts +1 -0
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/numberNode.js +1 -1
- package/lib/tree/nodes/numbers/piNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts +2 -2
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +6 -5
- package/lib/types/keyIds.d.ts +4 -2
- package/lib/types/keyIds.d.ts.map +1 -1
- package/lib/utils/numberPrototype/toScientific.d.ts +3 -0
- package/lib/utils/numberPrototype/toScientific.d.ts.map +1 -0
- package/lib/utils/numberPrototype/toScientific.js +110 -0
- package/lib/utils/requiresApostropheBefore.d.ts +2 -0
- package/lib/utils/requiresApostropheBefore.d.ts.map +1 -0
- package/lib/utils/requiresApostropheBefore.js +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Measure = void 0;
|
|
4
|
+
const round_1 = require("../../math/utils/round");
|
|
5
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
6
|
+
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
7
|
+
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
8
|
+
class Measure {
|
|
9
|
+
constructor(value, exponent = 0) {
|
|
10
|
+
// console.log("bf", value, exponent);
|
|
11
|
+
if (value === 0) {
|
|
12
|
+
this.significantPart = 0;
|
|
13
|
+
this.exponent = 0;
|
|
14
|
+
}
|
|
15
|
+
else if (value >= 10) {
|
|
16
|
+
const stringValue = value.toString();
|
|
17
|
+
const length = stringValue.split(".")[0].length - 1;
|
|
18
|
+
this.exponent = exponent + length;
|
|
19
|
+
this.significantPart = Number(stringValue[0] + "." + stringValue.replace(".", "").slice(1));
|
|
20
|
+
}
|
|
21
|
+
else if (value <= -10) {
|
|
22
|
+
const stringValue = value.toString();
|
|
23
|
+
const length = stringValue.split(".")[0].length - 2;
|
|
24
|
+
this.exponent = exponent + length;
|
|
25
|
+
this.significantPart = Number("-" + stringValue[1] + "." + stringValue.replace(".", "").slice(1));
|
|
26
|
+
}
|
|
27
|
+
else if (value > 0 && value < 1) {
|
|
28
|
+
const stringValue = value.toString();
|
|
29
|
+
const firstSignificantIndex = stringValue
|
|
30
|
+
.split("")
|
|
31
|
+
.findIndex((el) => el.match(/[1-9]/));
|
|
32
|
+
const length = firstSignificantIndex - 1;
|
|
33
|
+
this.exponent = exponent - length;
|
|
34
|
+
this.significantPart = Number(stringValue[firstSignificantIndex] +
|
|
35
|
+
"." +
|
|
36
|
+
stringValue.slice(firstSignificantIndex + 1));
|
|
37
|
+
}
|
|
38
|
+
else if (value > -1 && value < 0) {
|
|
39
|
+
const stringValue = value.toString();
|
|
40
|
+
const firstSignificantIndex = stringValue
|
|
41
|
+
.split("")
|
|
42
|
+
.findIndex((el) => el.match(/[1-9]/));
|
|
43
|
+
const length = firstSignificantIndex - 2;
|
|
44
|
+
this.exponent = exponent - length;
|
|
45
|
+
this.significantPart = Number("-" +
|
|
46
|
+
stringValue[firstSignificantIndex] +
|
|
47
|
+
"." +
|
|
48
|
+
stringValue.slice(firstSignificantIndex + 1));
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
this.significantPart = value;
|
|
52
|
+
this.exponent = exponent;
|
|
53
|
+
}
|
|
54
|
+
// console.log("after", this.significantPart, this.exponent);
|
|
55
|
+
}
|
|
56
|
+
times(n) {
|
|
57
|
+
if (typeof n === "number")
|
|
58
|
+
return new Measure(this.significantPart * n, this.exponent);
|
|
59
|
+
return new Measure(this.significantPart * n.significantPart, this.exponent + n.exponent);
|
|
60
|
+
}
|
|
61
|
+
divide(n) {
|
|
62
|
+
if (typeof n === "number")
|
|
63
|
+
return new Measure(this.significantPart / n, this.exponent);
|
|
64
|
+
return new Measure(this.significantPart / n.significantPart, this.exponent - n.exponent);
|
|
65
|
+
}
|
|
66
|
+
toTex(opts) {
|
|
67
|
+
const decimals = opts?.scientific;
|
|
68
|
+
const nbTree = decimals === undefined
|
|
69
|
+
? this.significantPart.toTree()
|
|
70
|
+
: new numberNode_1.NumberNode(this.significantPart, (0, round_1.roundSignificant)(this.significantPart, decimals));
|
|
71
|
+
if (this.exponent === 0) {
|
|
72
|
+
return nbTree.toTex();
|
|
73
|
+
}
|
|
74
|
+
if (this.exponent === 1) {
|
|
75
|
+
return new multiplyNode_1.MultiplyNode(nbTree, (10).toTree()).toTex({
|
|
76
|
+
scientific: decimals,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return new multiplyNode_1.MultiplyNode(nbTree, new powerNode_1.PowerNode((10).toTree(), this.exponent.toTree())).toTex({ scientific: decimals });
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* n = nb decimals
|
|
83
|
+
*/
|
|
84
|
+
toSignificant(n) {
|
|
85
|
+
const significantString = this.significantPart.toString();
|
|
86
|
+
const [intPart, fracPart] = significantString.split(".");
|
|
87
|
+
if (n === 0)
|
|
88
|
+
return new Measure(Number(intPart), this.exponent);
|
|
89
|
+
return new Measure(Number(intPart + "." + fracPart.slice(0, n)), this.exponent);
|
|
90
|
+
}
|
|
91
|
+
//gravité = 9.32423432
|
|
92
|
+
//new Measure(9432432).toSignificant(1).times(39)
|
|
93
|
+
evaluate() {
|
|
94
|
+
return this.significantPart * Math.pow(10, this.exponent);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.Measure = Measure;
|
|
@@ -5,13 +5,14 @@ export declare class Atome {
|
|
|
5
5
|
symbole: AtomSymbols;
|
|
6
6
|
numeroAtomique: number;
|
|
7
7
|
masseAtomique: number;
|
|
8
|
-
|
|
8
|
+
electronsShells?: number[];
|
|
9
9
|
famille: string;
|
|
10
10
|
etatStandard: string;
|
|
11
11
|
couleur: string;
|
|
12
12
|
masseVolumique: number;
|
|
13
13
|
pointFusion: number;
|
|
14
|
-
|
|
14
|
+
valenceElectronsNumber?: number;
|
|
15
|
+
constructor(name: KeyId, symbole: AtomSymbols, numeroAtomique: number, masseAtomique: number, famille: string, etatStandard: string, couleur: string, masseVolumique: number, pointFusion: number, electronsShells?: number[], valenceElectronsNumber?: number);
|
|
15
16
|
}
|
|
16
17
|
export declare const atomes: Atome[];
|
|
17
18
|
//# sourceMappingURL=atome.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atome.d.ts","sourceRoot":"","sources":["../../../src/pc/molecularChemistry/atome.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,KAAK;IAChB,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,WAAW,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,
|
|
1
|
+
{"version":3,"file":"atome.d.ts","sourceRoot":"","sources":["../../../src/pc/molecularChemistry/atome.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,KAAK;IAChB,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,WAAW,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,CAAC,EAAE,MAAM,CAAC;gBAG9B,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,WAAW,EACpB,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,eAAe,CAAC,EAAE,MAAM,EAAE,EAC1B,sBAAsB,CAAC,EAAE,MAAM;CAclC;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,EA86CzB,CAAC"}
|
|
@@ -2,137 +2,173 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.atomes = exports.Atome = void 0;
|
|
4
4
|
class Atome {
|
|
5
|
-
constructor(name, symbole, numeroAtomique, masseAtomique,
|
|
5
|
+
constructor(name, symbole, numeroAtomique, masseAtomique, famille, etatStandard, couleur, masseVolumique, pointFusion, electronsShells, valenceElectronsNumber) {
|
|
6
6
|
this.name = name;
|
|
7
7
|
this.symbole = symbole;
|
|
8
8
|
this.numeroAtomique = numeroAtomique;
|
|
9
9
|
this.masseAtomique = masseAtomique;
|
|
10
|
-
this.
|
|
10
|
+
this.electronsShells = electronsShells;
|
|
11
11
|
this.famille = famille;
|
|
12
12
|
this.etatStandard = etatStandard;
|
|
13
13
|
this.couleur = couleur;
|
|
14
14
|
this.masseVolumique = masseVolumique;
|
|
15
15
|
this.pointFusion = pointFusion;
|
|
16
|
+
this.valenceElectronsNumber = valenceElectronsNumber;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
exports.Atome = Atome;
|
|
19
20
|
exports.atomes = [
|
|
20
|
-
new Atome("Hydrogène", "H", 1, 1.008, "
|
|
21
|
-
new Atome("Hélium", "He", 2, 4.0026, "
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
new Atome("
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
new Atome("
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
new Atome("
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
new Atome("
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
new Atome("
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
new Atome("
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
new Atome("
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
new Atome("
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
new Atome("
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
new Atome("
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
new Atome("
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
new Atome("
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
new Atome("
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
new Atome("
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
new Atome("
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
new Atome("
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
new Atome("
|
|
74
|
-
new Atome("
|
|
75
|
-
new Atome("
|
|
76
|
-
new Atome("
|
|
77
|
-
new Atome("
|
|
78
|
-
new Atome("
|
|
79
|
-
new Atome("
|
|
80
|
-
new Atome("
|
|
81
|
-
new Atome("
|
|
82
|
-
new Atome("
|
|
83
|
-
new Atome("
|
|
84
|
-
new Atome("
|
|
85
|
-
new Atome("
|
|
86
|
-
new Atome("
|
|
87
|
-
new Atome("
|
|
88
|
-
new Atome("
|
|
89
|
-
new Atome("
|
|
90
|
-
new Atome("
|
|
91
|
-
new Atome("
|
|
92
|
-
new Atome("
|
|
93
|
-
new Atome("
|
|
94
|
-
new Atome("
|
|
95
|
-
new Atome("
|
|
96
|
-
new Atome("
|
|
97
|
-
new Atome("
|
|
98
|
-
new Atome("
|
|
99
|
-
new Atome("
|
|
100
|
-
new Atome("
|
|
101
|
-
new Atome("
|
|
102
|
-
new Atome("
|
|
103
|
-
new Atome("
|
|
104
|
-
new Atome("
|
|
105
|
-
new Atome("
|
|
106
|
-
new Atome("
|
|
107
|
-
new Atome("
|
|
108
|
-
new Atome("
|
|
109
|
-
new Atome("
|
|
110
|
-
new Atome("
|
|
111
|
-
new Atome("
|
|
112
|
-
new Atome("
|
|
113
|
-
new Atome("
|
|
114
|
-
new Atome("
|
|
115
|
-
new Atome("
|
|
116
|
-
new Atome("
|
|
117
|
-
new Atome("
|
|
118
|
-
new Atome("
|
|
119
|
-
new Atome("
|
|
120
|
-
new Atome("
|
|
121
|
-
new Atome("
|
|
122
|
-
new Atome("
|
|
123
|
-
new Atome("
|
|
124
|
-
new Atome("
|
|
125
|
-
new Atome("
|
|
126
|
-
new Atome("
|
|
127
|
-
new Atome("
|
|
128
|
-
new Atome("
|
|
129
|
-
new Atome("
|
|
130
|
-
new Atome("
|
|
131
|
-
new Atome("
|
|
132
|
-
new Atome("
|
|
133
|
-
new Atome("
|
|
134
|
-
new Atome("
|
|
135
|
-
new Atome("
|
|
136
|
-
new Atome("
|
|
137
|
-
new Atome("
|
|
21
|
+
new Atome("Hydrogène", "H", 1, 1.008, "Non-métal", "Gaz", "Incolore", 0.08988, -259.16, [1], 1),
|
|
22
|
+
new Atome("Hélium", "He", 2, 4.0026, "Gaz noble", "Gaz", "Incolore", 0.1786, -272.2,
|
|
23
|
+
// "1s2",
|
|
24
|
+
[2], 2),
|
|
25
|
+
new Atome("Lithium", "Li", 3, 6.94, "Métal alcalin", "Solide", "Argenté", 0.534, 180.54,
|
|
26
|
+
// "[He] 2s1",
|
|
27
|
+
[2, 1], 1),
|
|
28
|
+
new Atome("Béryllium", "Be", 4, 9.0122, "Métal alcalino-terreux", "Solide", "Gris métallique", 1.848, 1287,
|
|
29
|
+
// "[He] 2s2",
|
|
30
|
+
[2, 2], 2),
|
|
31
|
+
new Atome("Bore", "B", 5, 10.81, "Métalloïde", "Solide", "Noir", 2.46, 2075,
|
|
32
|
+
// "[He] 2s2 2p1",
|
|
33
|
+
[2, 2, 1], 3),
|
|
34
|
+
new Atome("Carbone", "C", 6, 12.01, "Non-métal", "Solide", "Noir", 2.267, 3500,
|
|
35
|
+
// "[He] 2s2 2p2",
|
|
36
|
+
[2, 2, 2], 4),
|
|
37
|
+
new Atome("Azote", "N", 7, 14.01, "Non-métal", "Gaz", "Incolore", 0.001251, -210.01,
|
|
38
|
+
// "[He] 2s2 2p3",
|
|
39
|
+
[2, 2, 3], 5),
|
|
40
|
+
new Atome("Oxygène", "O", 8, 16, "Non-métal", "Gaz", "Incolore", 0.001429, -218.79,
|
|
41
|
+
// "[He] 2s2 2p4",
|
|
42
|
+
[2, 2, 4], 6),
|
|
43
|
+
new Atome("Fluor", "F", 9, 19, "Halogène", "Gaz", "Jaune pâle", 0.001696, -219.62,
|
|
44
|
+
// "[He] 2s2 2p5",
|
|
45
|
+
[2, 2, 5], 7),
|
|
46
|
+
new Atome("Néon", "Ne", 10, 20.18, "Gaz noble", "Gaz", "Incolore", 0.9002, -246.08,
|
|
47
|
+
// "[He] 2s2 2p6",
|
|
48
|
+
[2, 2, 6], 8),
|
|
49
|
+
new Atome("Sodium", "Na", 11, 22.99, "Métal alcalin", "Solide", "Argenté", 0.968, 97.72,
|
|
50
|
+
// "[Ne] 3s1",
|
|
51
|
+
[2, 2, 6, 1], 1),
|
|
52
|
+
new Atome("Magnésium", "Mg", 12, 24.31, "Métal alcalino-terreux", "Solide", "Gris métallique", 1.738, 650,
|
|
53
|
+
// "[Ne] 3s2",
|
|
54
|
+
[2, 2, 6, 2], 2),
|
|
55
|
+
new Atome("Aluminium", "Al", 13, 26.98, "Métal pauvre", "Solide", "Argenté", 2.7, 660.32,
|
|
56
|
+
// "[Ne] 3s2 3p1",
|
|
57
|
+
[2, 2, 6, 2, 1], 3),
|
|
58
|
+
new Atome("Silicium", "Si", 14, 28.09, "Métalloïde", "Solide", "Bleu-gris", 2.3296, 1414,
|
|
59
|
+
// "[Ne] 3s2 3p2",
|
|
60
|
+
[2, 2, 6, 2, 2], 4),
|
|
61
|
+
new Atome("Phosphore", "P", 15, 30.97, "Non-métal", "Solide", "Blanc", 1.82, 44.15,
|
|
62
|
+
// "[Ne] 3s2 3p3",
|
|
63
|
+
[2, 2, 6, 2, 3], 5),
|
|
64
|
+
new Atome("Soufre", "S", 16, 32.07, "Non-métal", "Solide", "Jaune", 2.067, 115.21,
|
|
65
|
+
// "[Ne] 3s2 3p4",
|
|
66
|
+
[2, 2, 6, 2, 4], 6),
|
|
67
|
+
new Atome("Chlore", "Cl", 17, 35.45, "Halogène", "Gaz", "Vert pâle", 0.003214, -101.5,
|
|
68
|
+
// "[Ne] 3s2 3p5",
|
|
69
|
+
[2, 2, 6, 2, 5], 7),
|
|
70
|
+
new Atome("Argon", "Ar", 18, 39.95, "Gaz noble", "Gaz", "Incolore", 1.3954, -189.34,
|
|
71
|
+
// "[Ne] 3s2 3p6",
|
|
72
|
+
[2, 2, 6, 2, 6], 8),
|
|
73
|
+
//Next atoms do not have valence number & electronic configuration for now
|
|
74
|
+
new Atome("Potassium", "K", 19, 39.1, "Métal alcalin", "Solide", "Argenté", 0.856, 63.38),
|
|
75
|
+
new Atome("Calcium", "Ca", 20, 40.08, "Métal alcalino-terreux", "Solide", "Argenté", 1.55, 842),
|
|
76
|
+
new Atome("Scandium", "Sc", 21, 44.96, "Métal de transition", "Solide", "Argenté", 2.989, 1541),
|
|
77
|
+
new Atome("Titane", "Ti", 22, 47.87, "Métal de transition", "Solide", "Argenté", 4.54, 1660),
|
|
78
|
+
new Atome("Vanadium", "V", 23, 50.94, "Métal de transition", "Solide", "Argenté", 6.11, 1910),
|
|
79
|
+
new Atome("Chrome", "Cr", 24, 52.0, "Métal de transition", "Solide", "Argenté", 7.15, 1857),
|
|
80
|
+
new Atome("Manganèse", "Mn", 25, 54.94, "Métal de transition", "Solide", "Argenté", 7.44, 1244),
|
|
81
|
+
new Atome("Fer", "Fe", 26, 55.85, "Métal de transition", "Solide", "Argenté", 7.874, 1538),
|
|
82
|
+
new Atome("Cobalt", "Co", 27, 58.93, "Métal de transition", "Solide", "Argenté", 8.86, 1495),
|
|
83
|
+
new Atome("Nickel", "Ni", 28, 58.69, "Métal de transition", "Solide", "Argenté", 8.912, 1455),
|
|
84
|
+
new Atome("Cuivre", "Cu", 29, 63.55, "Métal de transition", "Solide", "Rouge métallique", 8.92, 1357.77),
|
|
85
|
+
new Atome("Zinc", "Zn", 30, 65.38, "Métal de transition", "Solide", "Gris bleuâtre", 7.134, 692.68),
|
|
86
|
+
new Atome("Gallium", "Ga", 31, 69.72, "Métal pauvre", "Solide", "Argenté", 5.907, 302.9146),
|
|
87
|
+
new Atome("Germanium", "Ge", 32, 72.63, "Métalloïde", "Solide", "Gris", 5.323, 1211.4),
|
|
88
|
+
new Atome("Arsenic", "As", 33, 74.92, "Métalloïde", "Solide", "Gris métallique", 5.776, 1090),
|
|
89
|
+
new Atome("Sélénium", "Se", 34, 78.97, "Non-métal", "Solide", "Gris-noir", 4.809, 494),
|
|
90
|
+
new Atome("Brome", "Br", 35, 79.9, "Halogène", "Liquide", "Rouge foncé", 3.122, -7.2),
|
|
91
|
+
new Atome("Krypton", "Kr", 36, 83.8, "Gaz noble", "Gaz", "Incolore", 0.003749, -157.36),
|
|
92
|
+
new Atome("Rubidium", "Rb", 37, 85.47, "Métal alcalin", "Solide", "Argenté", 1.532, 312.45),
|
|
93
|
+
new Atome("Strontium", "Sr", 38, 87.62, "Métal alcalino-terreux", "Solide", "Argenté", 2.64, 1050),
|
|
94
|
+
new Atome("Yttrium", "Y", 39, 88.91, "Métal de transition", "Solide", "Argenté", 4.472, 1799),
|
|
95
|
+
new Atome("Zirconium", "Zr", 40, 91.22, "Métal de transition", "Solide", "Argenté", 6.52, 2128),
|
|
96
|
+
new Atome("Niobium", "Nb", 41, 92.91, "Métal de transition", "Solide", "Argenté", 8.57, 2750),
|
|
97
|
+
new Atome("Molybdène", "Mo", 42, 95.95, "Métal de transition", "Solide", "Argenté", 10.22, 2896),
|
|
98
|
+
new Atome("Technétium", "Tc", 43, 98, "Métal de transition", "Solide", "Argenté", 11.49, 2430),
|
|
99
|
+
new Atome("Ruthénium", "Ru", 44, 101.07, "Métal de transition", "Solide", "Argenté", 12.37, 2607),
|
|
100
|
+
new Atome("Rhodium", "Rh", 45, 102.91, "Métal de transition", "Solide", "Argenté", 12.41, 2237),
|
|
101
|
+
new Atome("Palladium", "Pd", 46, 106.42, "Métal de transition", "Solide", "Argenté", 12.02, 1828.05),
|
|
102
|
+
new Atome("Argent", "Ag", 47, 107.87, "Métal de transition", "Solide", "Blanc argenté", 10.49, 1234.93),
|
|
103
|
+
new Atome("Cadmium", "Cd", 48, 112.41, "Métal de transition", "Solide", "Blanc argenté", 8.65, 594.22),
|
|
104
|
+
new Atome("Indium", "In", 49, 114.82, "Métal pauvre", "Solide", "Blanc argenté", 7.31, 429.75),
|
|
105
|
+
new Atome("Étain", "Sn", 50, 118.71, "Métal pauvre", "Solide", "Blanc argenté", 7.31, 505.08),
|
|
106
|
+
new Atome("Antimoine", "Sb", 51, 121.76, "Métalloïde", "Solide", "Blanc argenté", 6.68, 903.78),
|
|
107
|
+
new Atome("Tellure", "Te", 52, 127.6, "Métalloïde", "Solide", "Blanc argenté", 6.24, 722.66),
|
|
108
|
+
new Atome("Iode", "I", 53, 126.9, "Halogène", "Solide", "Noir brillant", 4.94, 386.85),
|
|
109
|
+
new Atome("Xénon", "Xe", 54, 131.29, "Gaz noble", "Gaz", "Incolore", 0.005887, -111.75),
|
|
110
|
+
new Atome("Césium", "Cs", 55, 132.91, "Métal alcalin", "Solide", "Or jaune", 1.873, 301.59),
|
|
111
|
+
new Atome("Baryum", "Ba", 56, 137.33, "Métal alcalino-terreux", "Solide", "Argenté", 3.594, 1000),
|
|
112
|
+
new Atome("Lanthane", "La", 57, 138.91, "Lanthanide", "Solide", "Argenté", 6.145, 1193),
|
|
113
|
+
new Atome("Cérium", "Ce", 58, 140.12, "Lanthanide", "Solide", "Argenté", 6.77, 1068),
|
|
114
|
+
new Atome("Praséodyme", "Pr", 59, 140.91, "Lanthanide", "Solide", "Argenté", 6.77, 1208),
|
|
115
|
+
new Atome("Néodyme", "Nd", 60, 144.24, "Lanthanide", "Solide", "Argenté", 7.01, 1297),
|
|
116
|
+
new Atome("Prométhium", "Pm", 61, 145, "Lanthanide", "Solide", "Argenté", 7.26, 1315),
|
|
117
|
+
new Atome("Samarium", "Sm", 62, 150.36, "Lanthanide", "Solide", "Argenté", 7.52, 1345),
|
|
118
|
+
new Atome("Europium", "Eu", 63, 152.0, "Lanthanide", "Solide", "Argenté", 5.24, 1095),
|
|
119
|
+
new Atome("Gadolinium", "Gd", 64, 157.25, "Lanthanide", "Solide", "Argenté", 7.89, 1585),
|
|
120
|
+
new Atome("Térbium", "Tb", 65, 158.93, "Lanthanide", "Solide", "Argenté", 8.23, 1629),
|
|
121
|
+
new Atome("Dysprosium", "Dy", 66, 162.5, "Lanthanide", "Solide", "Argenté", 8.55, 1680),
|
|
122
|
+
new Atome("Holmium", "Ho", 67, 164.93, "Lanthanide", "Solide", "Argenté", 8.795, 1734),
|
|
123
|
+
new Atome("Erbium", "Er", 68, 167.26, "Lanthanide", "Solide", "Argenté", 9.066, 1802),
|
|
124
|
+
new Atome("Thulium", "Tm", 69, 168.93, "Lanthanide", "Solide", "Argenté", 9.321, 1818),
|
|
125
|
+
new Atome("Ytterbium", "Yb", 70, 173.05, "Lanthanide", "Solide", "Argenté", 6.965, 1092),
|
|
126
|
+
new Atome("Lutétium", "Lu", 71, 175.0, "Lanthanide", "Solide", "Argenté", 9.84, 1925),
|
|
127
|
+
new Atome("Hafnium", "Hf", 72, 178.49, "Métal de transition", "Solide", "Argenté", 13.31, 2506),
|
|
128
|
+
new Atome("Tantale", "Ta", 73, 180.95, "Métal de transition", "Solide", "Gris bleuâtre", 16.65, 3290),
|
|
129
|
+
new Atome("Tungstène", "W", 74, 183.84, "Métal de transition", "Solide", "Gris acier", 19.25, 3695),
|
|
130
|
+
new Atome("Rhénium", "Re", 75, 186.21, "Métal de transition", "Solide", "Argenté", 21.02, 3459),
|
|
131
|
+
new Atome("Osmium", "Os", 76, 190.23, "Métal de transition", "Solide", "Argenté bleuté", 22.59, 3306),
|
|
132
|
+
new Atome("Iridium", "Ir", 77, 192.22, "Métal de transition", "Solide", "Blanc argenté", 22.56, 2719),
|
|
133
|
+
new Atome("Platine", "Pt", 78, 195.08, "Métal de transition", "Solide", "Argenté", 21.45, 2041.4),
|
|
134
|
+
new Atome("Or", "Au", 79, 196.97, "Métal de transition", "Solide", "Jaune", 19.32, 1337.33),
|
|
135
|
+
new Atome("Mercure", "Hg", 80, 200.59, "Métal de transition", "Liquide", "Argenté", 13.55, -38.83),
|
|
136
|
+
new Atome("Thallium", "Tl", 81, 204.38, "Métal pauvre", "Solide", "Blanc argenté", 11.85, 577),
|
|
137
|
+
new Atome("Plomb", "Pb", 82, 207.2, "Métal pauvre", "Solide", "Bleu-gris", 11.34, 600.61),
|
|
138
|
+
new Atome("Bismuth", "Bi", 83, 208.98, "Métal pauvre", "Solide", "Blanc argenté", 9.8, 544.4),
|
|
139
|
+
new Atome("Polonium", "Po", 84, 209, "Métalloïde", "Solide", "Argenté", 9.32, 527),
|
|
140
|
+
new Atome("Astate", "At", 85, 210, "Halogène", "Solide", "Inconnue", 7, 575),
|
|
141
|
+
new Atome("Radon", "Rn", 86, 222, "Gaz noble", "Gaz", "Incolore", 0.00973, -61.85),
|
|
142
|
+
new Atome("Francium", "Fr", 87, 223, "Métal alcalin", "Solide", "Argenté", 1.87, 300),
|
|
143
|
+
new Atome("Radium", "Ra", 88, 226, "Métal alcalino-terreux", "Solide", "Argenté", 5.5, 973),
|
|
144
|
+
new Atome("Actinium", "Ac", 89, 227, "Actinide", "Solide", "Argenté", 10.07, 1323),
|
|
145
|
+
new Atome("Thorium", "Th", 90, 232.04, "Actinide", "Solide", "Argenté", 11.72, 2023),
|
|
146
|
+
new Atome("Protactinium", "Pa", 91, 231.04, "Actinide", "Solide", "Argenté", 15.37, 1841),
|
|
147
|
+
new Atome("Uranium", "U", 92, 238.03, "Actinide", "Solide", "Argenté", 19.05, 1405),
|
|
148
|
+
new Atome("Neptunium", "Np", 93, 237, "Actinide", "Solide", "Inconnue", 20.25, 912),
|
|
149
|
+
new Atome("Plutonium", "Pu", 94, 244, "Actinide", "Solide", "Argenté", 19.86, 912.5),
|
|
150
|
+
new Atome("Américium", "Am", 95, 243, "Actinide", "Solide", "Argenté", 13.67, 1449),
|
|
151
|
+
new Atome("Curium", "Cm", 96, 247, "Actinide", "Solide", "Argenté", 13.51, 1613),
|
|
152
|
+
new Atome("Berkélium", "Bk", 97, 247, "Actinide", "Solide", "Inconnue", 14.78, 1323),
|
|
153
|
+
new Atome("Californium", "Cf", 98, 251, "Actinide", "Solide", "Inconnue", 15.1, 1173),
|
|
154
|
+
new Atome("Einsteinium", "Es", 99, 252, "Actinide", "Solide", "Inconnue", 8.84, 1133),
|
|
155
|
+
new Atome("Fermium", "Fm", 100, 257, "Actinide", "Solide", "Inconnue", 9.7, 1800),
|
|
156
|
+
new Atome("Mendélévium", "Md", 101, 258, "Actinide", "Solide", "Inconnue", 10.3, 1100),
|
|
157
|
+
new Atome("Nobelium", "No", 102, 259, "Actinide", "Solide", "Inconnue", 9.9, 1100),
|
|
158
|
+
new Atome("Lawrencium", "Lr", 103, 262, "Actinide", "Solide", "Inconnue", 15.6, 1900),
|
|
159
|
+
new Atome("Rutherfordium", "Rf", 104, 267, "Métal de transition", "Inconnue", "Inconnue", 23.2, 2400),
|
|
160
|
+
new Atome("Dubnium", "Db", 105, 270, "Métal de transition", "Inconnue", "Inconnue", 29.3, 2370),
|
|
161
|
+
new Atome("Seaborgium", "Sg", 106, 271, "Métal de transition", "Inconnue", "Inconnue", 35, 2273),
|
|
162
|
+
new Atome("Bohrium", "Bh", 107, 270, "Métal de transition", "Inconnue", "Inconnue", 37.1, 0),
|
|
163
|
+
new Atome("Hassium", "Hs", 108, 277, "Métal de transition", "Inconnue", "Inconnue", 40.7, 0),
|
|
164
|
+
new Atome("Meitnérium", "Mt", 109, 278, "Métal de transition", "Inconnue", "Inconnue", 37.4, 0),
|
|
165
|
+
new Atome("Darmstadtium", "Ds", 110, 281, "Métal de transition", "Inconnue", "Inconnue", 34.8, 0),
|
|
166
|
+
new Atome("Roentgenium", "Rg", 111, 282, "Métal de transition", "Inconnue", "Inconnue", 28.7, 0),
|
|
167
|
+
new Atome("Copernicium", "Cn", 112, 285, "Métal de transition", "Inconnue", "Inconnue", 23.7, 0),
|
|
168
|
+
new Atome("Nihonium", "Nh", 113, 286, "Métal pauvre", "Inconnue", "Inconnue", 16, 0),
|
|
169
|
+
new Atome("Flerovium", "Fl", 114, 289, "Métal pauvre", "Inconnue", "Inconnue", 14, 0),
|
|
170
|
+
new Atome("Moscovium", "Mc", 115, 290, "Métal pauvre", "Inconnue", "Inconnue", 13.5, 0),
|
|
171
|
+
new Atome("Livermorium", "Lv", 116, 293, "Métal pauvre", "Inconnue", "Inconnue", 12.9, 0),
|
|
172
|
+
new Atome("Tennessine", "Ts", 117, 294, "Hallogène", "Inconnue", "Inconnue", 7.2, 0),
|
|
173
|
+
new Atome("Oganesson", "Og", 118, 294, "Gaz noble", "Inconnue", "Inconnue", 4.9, 0),
|
|
138
174
|
];
|
|
@@ -9,15 +9,16 @@ type AtomsData = {
|
|
|
9
9
|
count: number;
|
|
10
10
|
};
|
|
11
11
|
export declare class Molecule {
|
|
12
|
-
name:
|
|
12
|
+
name: string;
|
|
13
13
|
formula: string;
|
|
14
|
+
keyId: KeyId;
|
|
14
15
|
weight: number;
|
|
15
16
|
atoms: AtomsData[];
|
|
16
17
|
isOrganic: boolean;
|
|
17
18
|
state: "solid" | "liquid" | "gas" | "aqueous";
|
|
18
19
|
iupact?: string;
|
|
19
20
|
type?: string;
|
|
20
|
-
constructor(name:
|
|
21
|
+
constructor(name: string, formula: string, weight: number, atoms: AtomShortcut[], isOrganic: boolean, state: "solid" | "liquid" | "gas" | "aqueous", iupact?: string, type?: string);
|
|
21
22
|
}
|
|
22
23
|
export declare const molecules: Molecule[];
|
|
23
24
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"molecule.d.ts","sourceRoot":"","sources":["../../../src/pc/molecularChemistry/molecule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAU,MAAM,SAAS,CAAC;AAExC,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AACD,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;
|
|
1
|
+
{"version":3,"file":"molecule.d.ts","sourceRoot":"","sources":["../../../src/pc/molecularChemistry/molecule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAU,MAAM,SAAS,CAAC;AAExC,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AACD,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAYF,qBAAa,QAAQ;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;gBAGZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,YAAY,EAAE,EACrB,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,EAC7C,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM;CAiBhB;AAED,eAAO,MAAM,SAAS,YA43CrB,CAAC"}
|
|
@@ -2,10 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.molecules = exports.Molecule = void 0;
|
|
4
4
|
const atome_1 = require("./atome");
|
|
5
|
+
const getId = (s) => {
|
|
6
|
+
return ("Mol-" +
|
|
7
|
+
s
|
|
8
|
+
.replaceAll("(", "")
|
|
9
|
+
.replaceAll(")", "")
|
|
10
|
+
.replaceAll("_", "")
|
|
11
|
+
.replaceAll("^", "")
|
|
12
|
+
.replaceAll("{", "")
|
|
13
|
+
.replaceAll("}", ""));
|
|
14
|
+
};
|
|
5
15
|
class Molecule {
|
|
6
16
|
constructor(name, formula, weight, atoms, isOrganic, state, iupact, type) {
|
|
7
17
|
this.name = name;
|
|
8
18
|
this.formula = formula;
|
|
19
|
+
this.keyId = getId(formula);
|
|
9
20
|
this.weight = weight;
|
|
10
21
|
this.atoms = atoms.map((atomData) => {
|
|
11
22
|
return {
|
|
@@ -20,7 +20,8 @@ export declare class Reaction {
|
|
|
20
20
|
getReactionWithQuestionMark(specieIndexWithQuestionMark: number): string;
|
|
21
21
|
getUniqueAtomNames(): KeyId[];
|
|
22
22
|
getSpeciesFormula(): string[];
|
|
23
|
-
getSpeciesName():
|
|
23
|
+
getSpeciesName(): string[];
|
|
24
|
+
getKeyIds(): KeyId[];
|
|
24
25
|
}
|
|
25
26
|
export { molecules };
|
|
26
27
|
//# sourceMappingURL=reaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reaction.d.ts","sourceRoot":"","sources":["../../../src/pc/molecularChemistry/reaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"reaction.d.ts","sourceRoot":"","sources":["../../../src/pc/molecularChemistry/reaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB;AAED,8BAAsB,mBAAmB;IACvC,MAAM,CAAC,cAAc,IAAI,QAAQ;CAqVlC;AAED,qBAAa,QAAQ;IACnB,aAAa,EAAE,eAAe,EAAE,CAAC;gBAErB,aAAa,EAAE,eAAe,EAAE;IAI5C,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,kBAAkB;IAU1B,iBAAiB,IAAI,MAAM;IAU3B,sBAAsB,IAAI,MAAM;IAchC,wBAAwB,IAAI,MAAM;IAsBlC,OAAO,CAAC,oBAAoB;IAwB5B,2BAA2B,CAAC,2BAA2B,EAAE,MAAM,GAAG,MAAM;IAgCxE,kBAAkB,IAAI,KAAK,EAAE;IAc7B,iBAAiB,IAAI,MAAM,EAAE;IAW7B,cAAc,IAAI,MAAM,EAAE;IAW1B,SAAS,IAAI,KAAK,EAAE;CAWrB;AACD,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -458,5 +458,14 @@ class Reaction {
|
|
|
458
458
|
}
|
|
459
459
|
return speciesFormula;
|
|
460
460
|
}
|
|
461
|
+
getKeyIds() {
|
|
462
|
+
const speciesFormula = [];
|
|
463
|
+
for (const reactionSpecies of this.reactionArray) {
|
|
464
|
+
if (reactionSpecies.species) {
|
|
465
|
+
speciesFormula.push(reactionSpecies.species.keyId);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
return speciesFormula;
|
|
469
|
+
}
|
|
461
470
|
}
|
|
462
471
|
exports.Reaction = Reaction;
|
package/lib/server.d.ts
CHANGED
package/lib/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAoB3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;QACxB,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC;KACpD;CACF"}
|