A census of $\rho$ Oph candidate members from Gaia DR2
  The Ophiuchus cloud complex is one of the best laboratories to study the
earlier stages of the stellar and protoplanetary disc evolution. The wealth of
accurate astrometric measurements contained in the Gaia Data Release 2 can be
used to update the census of Ophiuchus member candidates. We seek to find
potential new members of Ophiuchus and identify those surrounded by a
circumstellar disc. We constructed a control sample composed of 188 bona fide
Ophiuchus members. Using this sample as a reference we applied three different
density-based machine learning clustering algorithms (DBSCAN, OPTICS, and
HDBSCAN) to a sample drawn from the Gaia catalogue centred on the Ophiuchus
cloud. The clustering analysis was applied in the five astrometric dimensions
defined by the three-dimensional Cartesian space and the proper motions in
right ascension and declination. The three clustering algorithms systematically
identify a similar set of candidate members in a main cluster with astrometric
properties consistent with those of the control sample. The increased
flexibility of the OPTICS and HDBSCAN algorithms enable these methods to
identify a secondary cluster. We constructed a common sample containing 391
member candidates including 166 new objects, which have not yet been discussed
in the literature. By combining the Gaia data with 2MASS and WISE photometry,
we built the spectral energy distributions from 0.5 to $22\microm$ for a subset
of 48 objects and found a total of 41 discs, including 11 Class II and 1 Class
III new discs. Density-based clustering algorithms are a promising tool to
identify candidate members of star forming regions in large astrometric
databases. If confirmed, the candidate members discussed in this work would
represent an increment of roughly 40% of the current census of Ophiuchus.
