-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #910 from NFDI4Chem/development
Development
- Loading branch information
Showing
17 changed files
with
1,125 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use Illuminate\Console\Command; | ||
use Illuminate\Support\Facades\DB; | ||
|
||
class IndexMolecules extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'nmrxiv:index-molecules'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Reindex molecules'; | ||
|
||
/** | ||
* Execute the console command. | ||
*/ | ||
public function handle() | ||
{ | ||
return DB::transaction(function () { | ||
DB::statement('DROP TABLE IF EXISTS mols, fps'); | ||
DB::statement('create extension if not exists rdkit'); | ||
DB::statement('select * into mols from (select id,mol_from_smiles(canonical_smiles::cstring) m from molecules) tmp where m is not null'); | ||
DB::statement('create index molidx on mols using gist(m)'); | ||
DB::statement('alter table mols add primary key (id)'); | ||
DB::statement('select id, torsionbv_fp(m) as torsionbv,morganbv_fp(m) as mfp2, featmorganbv_fp(m) as ffp2 into fps from mols'); | ||
DB::statement('create index fps_ttbv_idx on fps using gist(torsionbv)'); | ||
DB::statement('create index fps_mfp2_idx on fps using gist(mfp2)'); | ||
DB::statement('create index fps_ffp2_idx on fps using gist(ffp2)'); | ||
DB::statement('alter table fps add primary key (id)'); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Admin; | ||
|
||
use App\Http\Controllers\Controller; | ||
use App\Models\Dataset; | ||
use Inertia\Inertia; | ||
|
||
class CurationController extends Controller | ||
{ | ||
public function spectra() | ||
{ | ||
return Inertia::render('Console/Spectra/Index'); | ||
} | ||
|
||
public function snapshots() | ||
{ | ||
return Inertia::render('Console/Spectra/Snapshot', [ | ||
'datasets' => Dataset::where('has_nmrium', 1)->where('dataset_photo_path', null)->pluck('id')->all(), | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.