Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iPPIDB
ippidb-web
Commits
dad06ecd
Commit
dad06ecd
authored
6 years ago
by
Bryan BRANCOTTE
Browse files
Options
Downloads
Patches
Plain Diff
formating Compound fields and naming attributes of all fields
parent
309ff7f5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ippisite/ippidb/models.py
+179
-51
179 additions, 51 deletions
ippisite/ippidb/models.py
with
179 additions
and
51 deletions
ippisite/ippidb/models.py
+
179
−
51
View file @
dad06ecd
...
@@ -448,78 +448,206 @@ class Compound(AutoFillableModel):
...
@@ -448,78 +448,206 @@ class Compound(AutoFillableModel):
"""
"""
objects
=
CompoundManager
()
objects
=
CompoundManager
()
canonical_smile
=
models
.
TextField
(
canonical_smile
=
models
.
TextField
(
'
Canonical Smile
'
,
unique
=
True
)
verbose_name
=
'
Canonical Smile
'
,
is_macrocycle
=
models
.
BooleanField
(
'
Contains one or more macrocycles
'
)
unique
=
True
,
)
is_macrocycle
=
models
.
BooleanField
(
verbose_name
=
'
Contains one or more macrocycles
'
,
)
aromatic_ratio
=
models
.
DecimalField
(
aromatic_ratio
=
models
.
DecimalField
(
'
Aromatic ratio
'
,
max_digits
=
3
,
decimal_places
=
2
)
verbose_name
=
'
Aromatic ratio
'
,
max_digits
=
3
,
decimal_places
=
2
,
)
balaban_index
=
models
.
DecimalField
(
balaban_index
=
models
.
DecimalField
(
'
Balaban index
'
,
max_digits
=
3
,
decimal_places
=
2
)
verbose_name
=
'
Balaban index
'
,
fsp3
=
models
.
DecimalField
(
'
Fsp3
'
,
max_digits
=
3
,
decimal_places
=
2
)
max_digits
=
3
,
decimal_places
=
2
,
)
fsp3
=
models
.
DecimalField
(
verbose_name
=
'
Fsp3
'
,
max_digits
=
3
,
decimal_places
=
2
,
)
gc_molar_refractivity
=
models
.
DecimalField
(
gc_molar_refractivity
=
models
.
DecimalField
(
'
GC Molar Refractivity
'
,
max_digits
=
5
,
decimal_places
=
2
)
verbose_name
=
'
GC Molar Refractivity
'
,
max_digits
=
5
,
decimal_places
=
2
,
)
log_d
=
models
.
DecimalField
(
log_d
=
models
.
DecimalField
(
'
LogD (Partition coefficient octanol-1/water, with pKa information)
'
,
max_digits
=
4
,
decimal_places
=
2
)
verbose_name
=
'
LogD (Partition coefficient octanol-1/water, with pKa information)
'
,
max_digits
=
4
,
decimal_places
=
2
,
)
a_log_p
=
models
.
DecimalField
(
a_log_p
=
models
.
DecimalField
(
'
ALogP (Partition coefficient octanol-1/water)
'
,
max_digits
=
4
,
decimal_places
=
2
)
verbose_name
=
'
ALogP (Partition coefficient octanol-1/water)
'
,
max_digits
=
4
,
decimal_places
=
2
,
)
mean_atom_vol_vdw
=
models
.
DecimalField
(
mean_atom_vol_vdw
=
models
.
DecimalField
(
'
Mean atom volume computed with VdW radii
'
,
max_digits
=
4
,
decimal_places
=
2
)
verbose_name
=
'
Mean atom volume computed with VdW radii
'
,
max_digits
=
4
,
decimal_places
=
2
,
)
molecular_weight
=
models
.
DecimalField
(
molecular_weight
=
models
.
DecimalField
(
'
Molecular weight
'
,
max_digits
=
6
,
decimal_places
=
2
)
verbose_name
=
'
Molecular weight
'
,
nb_acceptor_h
=
models
.
IntegerField
(
'
Number of hydrogen bond acceptors
'
)
max_digits
=
6
,
nb_aliphatic_amines
=
models
.
IntegerField
(
'
Number of aliphatics amines
'
)
decimal_places
=
2
,
nb_aromatic_bonds
=
models
.
IntegerField
(
'
Number of aromatic bonds
'
)
)
nb_aromatic_ether
=
models
.
IntegerField
(
'
Number of aromatic ethers
'
)
nb_acceptor_h
=
models
.
IntegerField
(
verbose_name
=
'
Number of hydrogen bond acceptors
'
,
)
nb_aliphatic_amines
=
models
.
IntegerField
(
verbose_name
=
'
Number of aliphatics amines
'
,
)
nb_aromatic_bonds
=
models
.
IntegerField
(
verbose_name
=
'
Number of aromatic bonds
'
,
)
nb_aromatic_ether
=
models
.
IntegerField
(
verbose_name
=
'
Number of aromatic ethers
'
,
)
nb_aromatic_sssr
=
models
.
IntegerField
(
nb_aromatic_sssr
=
models
.
IntegerField
(
'
Number of aromatic Smallest Set of System Rings (SSSR)
'
)
verbose_name
=
'
Number of aromatic Smallest Set of System Rings (SSSR)
'
,
nb_atom
=
models
.
IntegerField
(
'
Number of atoms
'
)
)
nb_atom_non_h
=
models
.
IntegerField
(
'
Number of non hydrogen atoms
'
)
nb_atom
=
models
.
IntegerField
(
nb_benzene_like_rings
=
models
.
IntegerField
(
'
Number of benzene-like rings
'
)
verbose_name
=
'
Number of atoms
'
,
nb_bonds
=
models
.
IntegerField
(
'
Number of bonds
'
)
)
nb_atom_non_h
=
models
.
IntegerField
(
verbose_name
=
'
Number of non hydrogen atoms
'
,
)
nb_benzene_like_rings
=
models
.
IntegerField
(
verbose_name
=
'
Number of benzene-like rings
'
,
)
nb_bonds
=
models
.
IntegerField
(
verbose_name
=
'
Number of bonds
'
,
)
nb_bonds_non_h
=
models
.
IntegerField
(
nb_bonds_non_h
=
models
.
IntegerField
(
'
Number of bonds not involving a hydrogen
'
)
verbose_name
=
'
Number of bonds not involving a hydrogen
'
,
nb_br
=
models
.
IntegerField
(
'
Number of Bromine atoms
'
)
)
nb_c
=
models
.
IntegerField
(
'
Number of Carbon atoms
'
)
nb_br
=
models
.
IntegerField
(
nb_chiral_centers
=
models
.
IntegerField
(
'
Number of chiral centers
'
)
verbose_name
=
'
Number of Bromine atoms
'
,
nb_circuits
=
models
.
IntegerField
(
'
Number of circuits
'
)
)
nb_cl
=
models
.
IntegerField
(
'
Number of Chlorine atoms
'
)
nb_c
=
models
.
IntegerField
(
nb_csp2
=
models
.
IntegerField
(
'
Number of sp2-hybridized carbon atoms
'
)
verbose_name
=
'
Number of Carbon atoms
'
,
nb_csp3
=
models
.
IntegerField
(
'
Number of sp3-hybridized carbon atoms
'
)
)
nb_donor_h
=
models
.
IntegerField
(
'
Number of hydrogen bond donors
'
)
nb_chiral_centers
=
models
.
IntegerField
(
nb_double_bonds
=
models
.
IntegerField
(
'
Number of double bonds
'
)
verbose_name
=
'
Number of chiral centers
'
,
nb_f
=
models
.
IntegerField
(
'
Number of fluorine atoms
'
)
)
nb_i
=
models
.
IntegerField
(
'
Number of iodine atoms
'
)
nb_circuits
=
models
.
IntegerField
(
nb_multiple_bonds
=
models
.
IntegerField
(
'
Number of multiple bonds
'
)
verbose_name
=
'
Number of circuits
'
,
nb_n
=
models
.
IntegerField
(
'
Number of nitrogen atoms
'
)
)
nb_o
=
models
.
IntegerField
(
'
Number of oxygen atoms
'
)
nb_cl
=
models
.
IntegerField
(
nb_rings
=
models
.
IntegerField
(
'
Number of rings
'
)
verbose_name
=
'
Number of Chlorine atoms
'
,
nb_rotatable_bonds
=
models
.
IntegerField
(
'
Number of rotatable bonds
'
)
)
inchi
=
models
.
TextField
(
'
InChi
'
)
nb_csp2
=
models
.
IntegerField
(
inchikey
=
models
.
TextField
(
'
InChiKey
'
)
verbose_name
=
'
Number of sp2-hybridized carbon atoms
'
,
)
nb_csp3
=
models
.
IntegerField
(
verbose_name
=
'
Number of sp3-hybridized carbon atoms
'
,
)
nb_donor_h
=
models
.
IntegerField
(
verbose_name
=
'
Number of hydrogen bond donors
'
,
)
nb_double_bonds
=
models
.
IntegerField
(
verbose_name
=
'
Number of double bonds
'
,
)
nb_f
=
models
.
IntegerField
(
verbose_name
=
'
Number of fluorine atoms
'
,
)
nb_i
=
models
.
IntegerField
(
verbose_name
=
'
Number of iodine atoms
'
,
)
nb_multiple_bonds
=
models
.
IntegerField
(
verbose_name
=
'
Number of multiple bonds
'
,
)
nb_n
=
models
.
IntegerField
(
verbose_name
=
'
Number of nitrogen atoms
'
,
)
nb_o
=
models
.
IntegerField
(
verbose_name
=
'
Number of oxygen atoms
'
,
)
nb_rings
=
models
.
IntegerField
(
verbose_name
=
'
Number of rings
'
,
)
nb_rotatable_bonds
=
models
.
IntegerField
(
verbose_name
=
'
Number of rotatable bonds
'
,
)
inchi
=
models
.
TextField
(
verbose_name
=
'
InChi
'
,
)
inchikey
=
models
.
TextField
(
verbose_name
=
'
InChiKey
'
,
)
randic_index
=
models
.
DecimalField
(
randic_index
=
models
.
DecimalField
(
'
Randic index
'
,
max_digits
=
4
,
decimal_places
=
2
)
verbose_name
=
'
Randic index
'
,
max_digits
=
4
,
decimal_places
=
2
,
)
rdf070m
=
models
.
DecimalField
(
rdf070m
=
models
.
DecimalField
(
'
RDF070m, radial distribution function weighted by the atomic masses at 7Å
'
,
max_digits
=
5
,
decimal_places
=
2
)
verbose_name
=
'
RDF070m, radial distribution function weighted by the atomic masses at 7Å
'
,
max_digits
=
5
,
decimal_places
=
2
,
)
rotatable_bond_fraction
=
models
.
DecimalField
(
rotatable_bond_fraction
=
models
.
DecimalField
(
'
Fraction of rotatable bonds
'
,
max_digits
=
3
,
decimal_places
=
2
)
verbose_name
=
'
Fraction of rotatable bonds
'
,
max_digits
=
3
,
decimal_places
=
2
,
)
sum_atom_polar
=
models
.
DecimalField
(
sum_atom_polar
=
models
.
DecimalField
(
'
Sum of atomic polarizabilities
'
,
max_digits
=
5
,
decimal_places
=
2
)
verbose_name
=
'
Sum of atomic polarizabilities
'
,
max_digits
=
5
,
decimal_places
=
2
,
)
sum_atom_vol_vdw
=
models
.
DecimalField
(
sum_atom_vol_vdw
=
models
.
DecimalField
(
'
Sum of atom volumes computed with VdW radii
'
,
max_digits
=
6
,
decimal_places
=
2
)
verbose_name
=
'
Sum of atom volumes computed with VdW radii
'
,
max_digits
=
6
,
decimal_places
=
2
,
)
tpsa
=
models
.
DecimalField
(
tpsa
=
models
.
DecimalField
(
'
Topological Polar Surface Area (TPSA)
'
,
max_digits
=
5
,
decimal_places
=
2
)
verbose_name
=
'
Topological Polar Surface Area (TPSA)
'
,
max_digits
=
5
,
decimal_places
=
2
,
)
ui
=
models
.
DecimalField
(
ui
=
models
.
DecimalField
(
'
Unsaturation index
'
,
max_digits
=
4
,
decimal_places
=
2
)
verbose_name
=
'
Unsaturation index
'
,
wiener_index
=
models
.
IntegerField
(
'
Wiener index
'
)
max_digits
=
4
,
decimal_places
=
2
,
)
wiener_index
=
models
.
IntegerField
(
verbose_name
=
'
Wiener index
'
,
)
common_name
=
models
.
CharField
(
common_name
=
models
.
CharField
(
'
Common name
'
,
unique
=
True
,
max_length
=
20
,
blank
=
True
,
null
=
True
)
verbose_name
=
'
Common name
'
,
unique
=
True
,
max_length
=
20
,
blank
=
True
,
null
=
True
,
)
pubchem_id
=
models
.
CharField
(
pubchem_id
=
models
.
CharField
(
'
Pubchem ID
'
,
max_length
=
10
,
blank
=
True
,
null
=
True
)
verbose_name
=
'
Pubchem ID
'
,
max_length
=
10
,
blank
=
True
,
null
=
True
,
)
chemspider_id
=
models
.
CharField
(
chemspider_id
=
models
.
CharField
(
'
Chemspider ID
'
,
unique
=
True
,
max_length
=
10
,
blank
=
True
,
null
=
True
)
verbose_name
=
'
Chemspider ID
'
,
unique
=
True
,
max_length
=
10
,
blank
=
True
,
null
=
True
,
)
chembl_id
=
models
.
CharField
(
chembl_id
=
models
.
CharField
(
'
Chembl ID
'
,
max_length
=
30
,
blank
=
True
,
null
=
True
)
verbose_name
=
'
Chembl ID
'
,
max_length
=
30
,
blank
=
True
,
null
=
True
,
)
iupac_name
=
models
.
CharField
(
iupac_name
=
models
.
CharField
(
'
IUPAC name
'
,
max_length
=
255
,
blank
=
True
,
null
=
True
)
verbose_name
=
'
IUPAC name
'
,
max_length
=
255
,
blank
=
True
,
null
=
True
,
)
class
Meta
:
class
Meta
:
ordering
=
[
'
id
'
]
ordering
=
[
'
id
'
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment