Introduction

Cellulose, a polysaccharide, is a complex carbohydrate composed of a linear chain of β(1 → 4) connected D-glucose units, ranging from several hundred to over ten thousand. Cellulose, found in the significant cell walls of green plants and algae, is an essential structural component1. It is the most abundant organic polymer on the planet, and it plays a critical function in supplying plant cells with strength and stiffness, allowing them to maintain their shape and endure gravity. Cellulose comprises repeated glucose units held together by β(1 → 4) glycosidic bonds2. Unlike starch, another polysaccharide found in plants, cellulose cannot be digested by humans and most animals because they lack the necessary enzymes (such as cellulose) to break the β(1 → 4) glycosidic bonds3. However, certain microorganisms, such as bacteria and fungi, can produce cellulase and break down cellulose into simpler sugars through a process called cellulolysis.

Cellulose possesses a unique and intricate configuration crucial for its role as a fundamental structural element in plant cell walls. Below are the principal structural attributes of cellulose4:

Cellulose has both crystalline and amorphous regions. The crystalline areas, where the chains are well-ordered and tightly packed, contribute to the material’s strength. The amorphous regions, with a more disordered arrangement, allow for flexibility and water absorption.

The arrangement of cellulose chains and the extensive hydrogen bonding make cellulose insoluble in water. However, cellulose can absorb water and swell, aiding in the hydration and suppleness of plant cell walls.

Understanding the detailed structure of cellulose is crucial for various applications, from producing paper and textiles to biofuel research. The unique arrangement of glucose units and the interactions between cellulose chains contribute to its remarkable mechanical and chemical properties.

The diverse chemical characteristics of cellulose render it adaptable for many industrial uses, from producing paper and textiles to the development of cellulose derivatives with specific traits for specialized uses. Understanding these properties is crucial for manipulating cellulose in textiles, pharmaceuticals, and materials science5.

In addition to its structural function within botanical organisms, cellulose possesses practical implications across diverse sectors. It is a crucial constituent of paper and textiles, imparting enhanced resilience and endurance to these materials. Moreover, cellulose derivatives, specifically cellulose Carboxymethyl and hydroxyethyl, are used in producing films, fibers, wastewater, dyes and, other industrial goods. Additionally, cellulose is presently being examined as a renewable and sustainable source for the generation of biofuels and used to manufacture calcium phosphate composites6.

Nanocomposite materials based on Cellulose (Fig. 1a) and hydroxyapatite (Fig. 1b) have garnered considerable interest recently. These composites are made from natural polymers like STIPA Tendrara as their starting material7.

Fig. 1
figure 1

(a) Hydroxyapatite structure (diamond software), and (b) cellulose structure planar view of (001) face (diamond software), and (c) schematic representation of the hydroxyapatite–cellulose composite scaffold.

Various kinds of natural fibers exist, categorized according to their sources, which include plants, animals, or minerals. Typically, plant-based fibers are employed to strengthen plastics8,9.

The utility of materials based on cellulose has been investigated in numerous applications, such as its employment as a reusable catalyst and in medical contexts10, orthopedic, environment, and wastewater. Furthermore, combining cellulose with calcium phosphate particles has been employed as an adsorbent for dyes and heavy metals11.

Hydroxyapatite is a family of calcium phosphates with a space group P63/m, Human bones and teeth consist mainly of this inorganic element, which leads to intensive biological and physicochemical research12. It has been the focus of many studies and is often used as a material for bone transplantation due to its chemical similarity with the natural calcium phosphate mineral found in biological hard tissues13. Moreover, it finds great application in the environmental, wastewater treatment and dyeing sectors due to its outstanding biocompatibility, bioactivity14 lack of inflammation and non-toxic nature15.

It is the principal inorganic constituent of human bones and teeth and consequently has become a topic of extensive biological and physicochemical investigations16. It is the subject of many studies. It is often used as a bone implant material because of its chemical similarity to the natural calcium phosphate mineral in biological hard tissues. It is mainly used in the environment and waste water and dye due to its excellent biocompatibility, bioactivity, non-inflammatory, and non-toxicity14 (Fig. 1a).

Environmental remediation is one of the fields where hydroxyapatite-based composites are used most frequently. In particular, HAp/Ce composites (Fig. 1) has shown promise in eliminating heavy metals and other impurities from dyes in wastewater17. Phosphonic groups on the surface of cellulose/HAp are responsible for the material’s potent attraction to cations, such as metals and dyes. As a result, the concentration of these cations in the surrounding solution can be reduced as they are efficiently adsorbed onto the surface of HAp, Ce and, HAp/Ce.

Hence, the general aim of the study is to investigate adsorption capability of cellulose composites made with hydroxyapatite by novel methods dissolution – precipitation which could possess high mechanical strength, biocompatibility, and biodegradability, then the individual components and hence be utilized at field conditions. Polymeric composites, namely hydroxyapatite, cellulose and hydroxyapatite/cellulose (HAp/Ce) were prepared and used for the removal of MB dyes from drinking water which has not been reported so far. Contact time, pH, and temperature were optimized for maximum sorption. The best-fit isotherm was identified for the sorption. A suitable mechanism for MB removal was proposed. A field study was also carried out. We used other methods for Theoretical calculations utilizing Monte Carlo (MC) and Molecular Dynamic (MD) simulation models.

Cellulose (Ce) and hydroxyapatite (HAp) composite material can have unique qualities that suit various uses in the industrial and environmental fields18. The physicochemical properties concerning the hydroxyapatite-based composite can be adapted depending on the synthesis method and the intended use in the environmental field. Researchers are exploring and developing new composites based on cellulose and hydroxyapatite materials to leverage the unique properties of natural polymers and calcium phosphate.

The integration of organic materials and inorganic materials has emerged as a significant trend in the field of biomaterials, particularly for applications in tissue engineering and regenerative medicine. Among these materials, cellulose/hydroxyapatite composites stand out due to their unique combination of biocompatibility, and biodegradability (Fig. 1c).

The development of cellulose-hydroxyapatite composites has gained momentum in recent years, with research focusing on optimizing their physicochemical properties for specific applications. These composites can be tailored to exhibit desirable characteristics such as enhanced mechanical strength, porosity, and surface chemistry, which are crucial for successful cell attachment, proliferation, and differentiation.

Biologically, cellulose-hydroxyapatite composites are being investigated for a range of applications, including bone regeneration, dental implants, drug delivery systems, and wound healing. Their ability to support cellular activities while providing a conducive environment for tissue growth positions them as promising candidates in the evolving landscape of biomaterials.

Connecting the concept of "A Novel Approach to Prepare Hydroxyapatite/Cellulose Nanocomposites by Novel Methods" to the objectives of the United Nations Sustainable Development Goals (UNSDGs) can be achieved by aligning the innovation in material science with the specific goals that focus on health, sustainability, and economic growth. Below is how this concept aligns with key UNSDGs: Goal 1: Good Health and Well-Being.

The development of hydroxyapatite/cellulose nanocomposites can significantly enhance medical applications, particularly in bone regeneration, dental restoratives, and implants. These advanced materials can improve the quality of medical treatments, leading to better patient outcomes, reduced recovery times, and a higher standard of health care. Additionally, these materials could be designed to be more biocompatible and efficient, reducing the risk of complications and improving overall health outcomes. Goal 2: Industry, Innovation, and Infrastructure. The novel methods for preparing hydroxyapatite/cellulose nanocomposites represent a significant innovation in material science. This aligns with Goal 2 by promoting advanced manufacturing techniques and the development of new materials that can be used various of industrial applications, including biomedical devices, sustainable packaging, and eco-friendly products. This innovation can lead to more sustainable and resilient industrial processes, fostering economic growth while minimizing environmental impact. Goal 3: Responsible Consumption and Production. The use of cellulose, a renewable and biodegradable material, in preparing nanocomposites contributes to sustainable production practices. By integrating cellulose with hydroxyapatite, the resulting composites can reduce the reliance on non-renewable resources and decrease waste generation. This aligns with Goal 3 by promoting the development and use of sustainable materials that minimize environmental impact and encourage responsible production practices.

The present study describes the creation of novel bio composites derived from cellulose and HAp. Initially, we detail the synthesis of HAp, followed by the modification of cellulose with HAp. Subsequently, we introduce a new method dissolution–precipitation, for integrating cellulose and hydroxyapatite into a composite mesh with dyes, aimed at extracting methylene blue from wastewater. Additionally, we explore its potential in the realm of handicrafts involving dyes. We characterize the composites using several techniques, such as attenuated total reflectance Fourier transform infrared spectroscopy (ATR-FTIR), X-ray diffraction analysis (XRD), thermogravimetric analysis (TGA), scanning electron microscopy (SEM), Atomic Force Microscopy (AFM), Spectra of X-ray photoelectron spectroscopy (XPS), and Ligand preparation and Prediction of ADME/Toxicity Properties. We compare our results with those obtained from other synthesis methods and discuss the advantages and limitations of our approach.

Materials and methods

Materials used

Hydroxyapatite (HAp) was synthesized following a documented method. Calcium Nitrate Tetrahydrate Ca(NO4)2, 4H2O, Ammonium Dihydrogen Phosphate NH4HPO4, and ammonium hydroxide (NH4OH) were procured from Sigma-Aldrich, all of the analytical grade with purity exceeding 99%. Distilled water was used in all experiments. Cellulose was extracted from Esparto "STIPA TENDRARA" originating from Eastern Morocco, employing the procedure developed by El Idrissi et al. Ca(NO3)2, 4H2O (99%) and (NH4)2HPO4 (99%) were obtained from Aldrich.

FTIR measurements

FTIR was utilized to examine the development of HAp/Cellulose composite in the composites. The spectra were obtained using an FT/IR-4700 spectrometer (JASCO International LTD., Tokyo, Japan). Each spectrum consisted of an average of 32 scans at a resolution of 4 cm−1, and the spectral range was 400–4000 cm−1. Each analysis was preceded by a background check.

XRD measurements

The crystal structure and elemental composition of the composites were examined using the XRD-EDX. Using a Cu Kα radiation source at 40 kV and 30 mA, as well as a scan rate of 2°/min, the Panalytical X’Pert Pro equipment (Malvern Panalytical GmbH, Kassel, Germany) was utilized to record the XRD patterns. The same instrument’s associated detector was used to obtain the EDX spectra.

Thermogravimetric analysis (TGA)

To find the thermal stability of the composite powder, DTG60 instruments (Shimadzu, Germany) were used for conventional thermogravimetric examination. A nitrogen (N2) atmosphere was used for the analysis, and the temperature was heated from room temperature to 900 °C at a rate of 10 °C per minute.

Thermogravimetric analysis

The TA Instrument TGA Q500 and Q50 are standard thermogravimetric analyzers with a temperature range of 20 to 900 °C and a heating rate of 10 °C/min. On a DSC Q2000 V24.4 Build 116, the differential scanning calorimetry (DSC) curves were recorded. Ten milligram samples were put inside aluminum DSC pans and sealed before being added to the DSC cell. The Shimadzu GCMS-QP2010 (Shimadzu, Japan) chromatography/mass spectrometry apparatus, along with the GCMS solution 2.5 software.

Morphological studies

A Thermo Scientific TM Quattro ESEM (Thermo Fisher Scientific, Paisley, United Kingdom) operating at an accelerating 15 kV was used to capture the SEM pictures. Before imaging, the films underwent sputter coating with gold to enhance their electron beam conductivity. The same instrument’s associated detector was used to obtain the EDX spectra.

Atomic force microscopy (AFM)

Atomic force microscopy (AFM) has examined surface morphological changes in mild steel during a 6-h immersion period at 303 K. Using an atomic force microscope, the VEECO CPII was used to perform the AFM measurements.

Spectra of X-ray photoelectron spectroscopy (XPS)

Using a hemispherical multichannel detector and non-monochromatic Mg–Kα radiation (300 W, 15 kV, and 1253.6 eV), XPS experiments were conducted on a Physical Electronic PHI 5700 spectrometer to analyze the core-level signals of the elements of interest. The circular analysis area measuring 720 μm in diameter was used to record the sample spectra, with a constant pass energy value set at 29.35 eV.

31P NMR spectroscopy

A high-resolution magic-angle spinning (MAS) Bruker DRX-500 MHz spectrometer with a 4 mm CP/MAS probe was used to capture solid-state 31P nuclear magnetic resonance (NMR).

Ligand preparation and prediction of ADME/toxicity properties

To optimize the energy levels of Methylene Blue and refine its structural characteristics, we accessed the structural data from the PubChem database (http://pubchem.ncbi.nlm.nih.gov), specifically CID: 6099, provided in the Structure Data File Format (SDF). Employing the LigPrep module in conjunction with Maestro 12.8 software10, we conducted energy minimization using the OPLS_2005 force field2. hydrogen atoms were incorporated, and considerations were made for eliminating salt and ionization at pH (7 ± 2). ADMET is an abbreviation for the properties of medications’ pharmacokinetics, which include toxicity, excretion, metabolism, distribution, and absorption, delineates the systemic circulation distribution and metabolic processes of a drug, followed by the elimination of drug metabolites from the body9,19. The study included toxicity analysis, a crucial component for comprehending potential harmful effects associated with the Methylene Blue molecule. For ADME analysis of Methylene Blue, the QikProp tool (Schrodinger 2021–2) was employed8, while Toxicity analysis was conducted using Pre-ADMET, a web-based service for ADMET prediction. In this particular analysis, we focused was on investigating the properties of Methylene Blue.

Synthesis of composite by the dissolution/precipitation method

HAp synthesis

The employed technique for the synthesis was the dissolution/precipitation method of HAp (Fig. 1). The procedure involved dissolving 1 g of HAp powder in 50 mL of distilled water, followed by acidification with HNO3 to break down the apatitic network (dissolution). Afterward, the pH of the solution was raised to 10.5 by adding NH4OH, resulting in the re-precipitation of HAp crystals with nano-metric dimensions.

Composite synthesis

Figure 1b illustrates the procedure for synthesizing the HAp-cellulose composite using the dissolution/precipitation method. To prepare Solution (A), HAp was dissolved in 50 mL of distilled water and, 0.5 mL of HNO3 was added. On the other hand, Solution (B) consisted of a cellulose solution that was stirred for 12 h at 10 °C until complete dissolution. Subsequently, Solution (A) was added dropwise to Solution B while adjusting the pH to 10.5 with NH4OH. The resulting mixture was then stirred for 2 h at 25–30 °C. To obtain the composite solution, the mixture was filtered washed with distilled water, and dried in an oven at 30 °C for 24 h. This process resulted in the desired composite as white powder.

Adsorption

This study chose methylene blue (MB) as the representative metal ion. The batch method was employed for the adsorption process, conducted at 25 °C with varying volumes of foam and MB ion solutions ranging in concentration from 40 to 50 mg/L. The influence of adsorption time and pH was examined, with pH adjustments made by adding HNO3 or NaOH. Thermodynamic parameters were utilized to elucidate the nature of the adsorption process. Changes in dye ion content were determined using flame atomic absorption spectroscopy (AAS). The adsorption capacity of the composites was calculated using Eqs. (1) and (2)20:

$${\text{\% Removal}} = \frac{{C_{0} - C_{e} }}{{C_{0} }} \cdot 100$$
(1)
$$Q_{e} = \frac{{C_{0} - C_{e} }}{W}V$$
(2)

where C0 represents the initial concentration of the metal ion, while Ce represents the equilibrium concentration of the metal ion in parts per million (ppm), Qe denotes the equilibrium adsorption capacity in ppm, W stands for the weight of the absorbent foam in milligrams (mg), and V represents the volume of the solution in liters (L).

Isotherm of the adsorption process

In the investigation of the adsorption process, the Langmuir and Freundlich isotherm models were employed to characterize the adsorption behavior of MB on HAp and HAp/Cellulose composite. The Langmuir isotherm model is delineated by Eqs. (3) and (4)20:

$$\frac{{ C_{e} }}{{Q_{e} }} = \frac{1}{{q_{max} }}C_{e} + \frac{1}{{q_{max} K_{L} }}$$
(3)

Ce represents the concentration of MB in parts per million (ppm), Qe denotes the amount of metal ion removed per unit mass of HAp-Cellulose or HAp at equilibrium (in milligrams per gram, mg/g), qmax represents the maximum single-layer adsorption capacity of the foam (in mg/g), and KL (in liters per milligram, L/mg) is the Langmuir constant.

The Langmuir isotherm model predicts whether adsorption will be favorable or unfavorable by employing the dimensionless constant separation factor as presented in Eq. (4)21.

$${\text{R}}_{{\text{L }}} = \frac{1}{{1 + { }K_{{L{ }}} C_{e} }}$$
(4)

where C0 represents the initial concentration of MB, and KL stands for the Langmuir constants. If the RL value surpasses one, the adsorption is deemed unfavorable; otherwise, it is regarded as favorable or linear if it falls between one and one.

The Freundlich isotherm model, delineated by Eqs. (5) and (6)21, symbolizes the heterogeneous surface energy of a non-ideal adsorption process.

$$\ln (q_{{e{ }}} ) = \ln k_{f} + \frac{1}{n}\ln C_{e}$$
(5)
$${\text{Q}}_{{\text{e}}} = {\text{K}}_{{\text{F}}} {\text{C}}_{{\text{e}}}^{{{1}/{\text{n}}}}$$
(6)

where KF stands for the relative adsorption capacity and 1/n for the adsorption intensity, adsorption is not favorable if 1/n is less than 0.1; it is beneficial if 1/n is between 0.1 and 0.5.

Kinetics of the adsorption process

The rates of MB adsorption on the surfaces of HAp and HAp-Cellulose were investigated using the pseudo-first-order and second-order kinetic models, which are detailed below. To calculate the linearized versions of the rate equations, Eqs. 7 through 10 were utilized21.

$$\ln (q_{{e{ }}} - { }q_{t} ) = \ln q_{e} - {\text{K}}_{1} {\text{t}}$$
(7)
$$\frac{{\text{t}}}{{{\text{q}}_{{\text{t}}} }} = \frac{1}{{{\text{K}}_{2} q_{e}^{2} }} + \frac{{\text{t}}}{{{\text{q}}_{{\text{e}}} }}$$
(8)
$${\text{Q}}_{{\text{t}}} = {\text{K}}_{{{\text{id}}}} {\text{t}}^{{{1}/{2}}} + {\text{Z}}$$
(9)
$$\ln \frac{{K\left( {T_{{2{ }}} } \right)}}{{K\left( {T_{1} } \right)}} = \frac{Ea}{R} \cdot \left( {\frac{1}{{T_{1} }}{ } - { }\frac{1}{{T_{2} }}} \right)$$
(10)
$${\text{ln}}\left( {{1} - {\text{F}}} \right) = - {\text{K}}_{{{\text{fd}}}} *{\text{t}}$$
(11)

where qe represents the equilibrium adsorption capacity (mg/g) and, Qt represents the temperature-dependent adsorption capacity. The rate constant for the pseudo-first-order reaction (in minutes) is denoted as K1, while the rate constant for the pseudo-second-order reaction (in grams per milligram per minute) is represented by K2. The boundary layer thickness can be ascertained using Z (in milligrams per gram), where Kid stands for the diffusion rate constant expressed in milligrams per gram per minute to the power of 1/2.

The rate of film diffusion is indicated as Kfd (in minutes) in Eq. (11), and the fraction of equilibrium attainment is represented by F (where F = qt/qe).

Equations (12), (13), and (14) were utilized to determine the entropy (S°), enthalpy (H°), and Gibbs free energy (G°)21.

$${\text{K}}_{{\text{c}}} = {\text{C}}_{{{\text{ads}}}} /{\text{C}}_{{\text{e}}}$$
(12)
$$\Delta {\text{G}}^{0} = - {\text{RTlnK}}_{{\text{c}}}$$
(13)
$$\ln \,K_{s} = \frac{{{\Delta S}^\circ }}{R} - \frac{{{\Delta H}^\circ }}{RT}$$
(14)

where T stands for the temperature of the solution measured in Kelvin (K), R denotes the ideal gas constant in joules per mole per Kelvin (J/mol K), Cads represents the amount of MB adsorbed at equilibrium measured in milligrams per liter (mg/L), and Ce represents the equilibrium concentration also measured in milligrams per liter (mg/L).

Density functional calculations

We used the density functional theory at the restricted orbitals B3LYB level22,23 and 6-311G (d, p) electronic basis set24. Van-der-Waals interactions were introduced through the Grimme’s D3 dispersion corrections25. The Geome TRIC algorithm was applied for rapid geometry optimizing26 as it is implemented in GPU-oriented TeraChem software. The solvent effects were introduced in the frame of the COSMO solvent model27 implemented in TeraChem. The dielectric constant of the solvent (water) was ε = 78.4. Conceptual DFT provides functional equations and electronic structure principle to highlight the local and global reactivity’s of the chemical systems through well-known reactivity descriptors chemical potential (µ), electronegativity (χ), hardness (η) and softness (σ). For the mathematical defining of these descriptors, in CDFT, the following relations are used27.

$$\mu = - \chi = \left[ {\frac{\partial E}{{\partial N}}} \right]_{\nu (r)}$$
(15)
$$\eta = \left[ {\frac{\partial \mu }{{\partial N}}} \right]_{\nu (r)} = \left[ {\frac{{\partial^{2} E}}{{\partial N^{2} }}} \right]_{\nu (r)}$$
(16)
$$\sigma = 1/\eta$$
(17)

In the given relations, E and N stand for total electronic energy and total number of electrons of the studied chemical system, respectively.

Chemical hardness is a widely used parameter in chemical reactivity analysis of atomic and molecular systems. To compute the chemical hardness based on ground state ionization energy (I) and electron affinity (A) of atoms, ions, and molecules, the following equation is used28.

$$\eta = I - A$$
(18)

For the approximate prediction of ionization energy and electron affinity of molecules, we considered the Koopmans Theorem (KT)26 giving the following relations based on frontier orbital energies.

$$I = - E_{HOMO}$$
(19)
$$A = - E_{LUMO}$$
(20)

Here, EHOMO and ELUMO are the energies of HOMO and LUMO orbital, respectively.

Results and discussion

FTIR analysis

Figure 2a illustrates the FTIR spectra of cellulose, HAp, and the Nanocomposite Cellulose/HAp. The vibrations of the hydroxyl (O–H) group are depicted by peaks at 3572 and 632 cm−1, while the stretching vibrations of phosphate are evident at 1089, 1045, and 962 cm−1, and the phosphate vibration is indicated by peaks at 601 and 570 cm−1. The IR analysis confirms the nature of the precipitated powders as hydroxyapatite.

Fig. 2
figure 2

(a) FTIR spectrum of cellulose, HAp and, cellulose/HAp, and (b) schematic model shows the interaction between the OH groups of cellulose and Ca2+ of hydroxyapatite.

Upon comparing the FTIR spectra of the composite with those of cellulose and HAp, a distinct absorption peak at 3444 cm−1 corresponds to the hydroxyl group (O–H) vibration is observed. Additionally, the band at 3446 cm−1 is associated with the hydroxyl ion of hydroxyapatite, while peaks at 1097, 1033, 962, 603, and 565 cm−1 in the composite spectrum characterize the phosphate stretching vibration. Azzaoui supports these findings, K. et al.’s study29.

The bending mode of water absorbed naturally is represented by the vibration bands that were seen at about 1645 cm−1, and the adsorptions at 2903 and 897 cm−1 are associated with the β-glycosidic linkages in cellulose and the stretching vibration of C–H groups in the pyranoid ring, respectively. In conclusion, the interaction between Ca2+ on HAp and –COO on cellulose resulted in the formation of chemical bonds.

A schematic model of the composite HAp/Ce is shown in Fig. 2b, explaining the results obtained from ATR-FTIR, TGA/TDA, 31P, and SEM investigations, all of which point to a strong interaction between the composite parts. The diagram illustrates the interaction sites between HAp and Ce, emphasizing the creation of hydrogen bonds between Ce’s OH groups and hydroxyapatite’s Ca2+. The method of composite fabrication, which consists of four steps— the dissolution of the reagents in an aqueous medium, the water diffusion through the organic and inorganic matrices, the initiation of linkages between the functionalities of the two components, and the formation of the HAp/Ce composite (Fig. 2b)—can be used to explain the process leading to the formation of hydrogen bonding. Furthermore, a picture of the completed film is shown in Fig. 3, showcasing the achievement of a smooth, transparent film and highlighting the materials’ good compatibility.

Fig. 3
figure 3

(a) Thermogravimetric/differential thermal analysis (TGA/DTA) of HAp/cellulose composite, and (b) X-ray diffraction patterns of nanocomposite based HAp/Ce.

Thermal analysis

DSC can identify melting-related phenomena (Tm), including first- and second-order thermal transitions. Three different thermal transitions can be seen in semi-crystalline polymers: a glass transition for the amorphous part, a melting transition for the crystalline component, and a transition brought on by crystallization. A heating run of HAp/Ce is shown in Fig. 3a. A 124 °C endothermic glass transition peak can be seen on the DSC thermogram. The composite’s polymerization primarily causes this endothermic peak, and the production of CO2 brings on the heat. The HAp/Cellulose composite’s TGA curve is displayed in Fig. 3a. The curve depicts both mass-loss events. First, water loss is correlated with temperatures between 50 and 100 °C. The decomposition of the organic material represented by cellulose leads to the second weight-loss phase, occurring between 200 and 350 °C. The subsequent weight loss between 700 °C and 850 °C, results from the breakdown of hydroxyapatite deposited on cellulose. The close interaction between cellulose and HAp could accelerate this breakdown. Consequently, incorporating HAp has the potential to enhance cellulose’s thermal stability notably.

X-ray diffraction patterns of nanocomposite

The sample’s XRD patterns were recorded to identify the products’ crystal phases as they were manufactured. The sample exhibits diffraction peaks around 2θ = 10.9°, 21.9°, 22.9°, 28.15°, and 35.5°, as depicted in Fig. 3b, which are attributed to the crystalline polymorphism of cellulose II as documented by D. Klemm et al. 30. The more excellent crystallinity of hydroxyapatite is demonstrated by the steep peaks at 2θ = 25.98°, 31.89°, 39.98°, 46.87°, and 48.6°. The findings are consistent with Fu et al. and Azzaoui et al. The strong and narrow diffraction peaks in the planes (0 0 2), (2 1 1), (1 1 2), and (3 0 0) show that the HAp crystallizes efficiently. A significant hydrogen bonding interaction between HAp and cellulose may have occurred as the cellulose peak intensity steadily decreased with the HAp level.

AFM analysis

The technique of atomic force microscopy (AFM) is a highly effective instrument for examining surfaces and has been employed to furnish qualitative and quantitative insights on biopolymers at the nanometer level, which are frequently unattainable through alternative experimental methodologies. Within this investigation, AFM was utilized to scrutinize the distinct attributes of the HAp/Cellulose composite’s surface. The diagram in Fig. 4a portrays the surface representation of a sample. This particular depiction exhibits the three-dimensional depiction of the HAp/Cellulose nanocomposite within the 5 µm scale. The AFM images of the nano-composite possess a polished, uneven, and consistent surface quality.

Fig. 4
figure 4

(a) AFM micrographs of mild steel surface in HAp/Ce at 1 g/l, and (b) SEM/FEG images of (1) HAp, (2) Ce and (3) HAp/Ce composite.

Surface morphology

The current study also considered SEM micrographs to assess the consistency observed in the hydroxyapatite (HAp) crystal deposition process onto cellulose (Fig. 4b). This was done to investigate the minute intricacies of the morphology depicted in these images. Larger aggregations with a plate-like structure are visible in the cellulose images (Fig. 4b), consistent with the agglomeration process by the functionalized cellulose’s physical solid interactions. The morphology of the cellulosic material altered noticeably to a rough and porous form during the mineralization of HAp, as a result of the incorporation of inorganic domains onto the nanocomposite’s surface. Solid, uniform particles with a noticeable roughness that intensifies are produced when the cationic species (Ca2+ and PO43−) interact with the cellulose-derived nanomaterial. Notably, the final sample had a more uniform porous surface with more HAp layers covering the material’s surface.

Toxic elemental composition

Ensuring the absence of harmful or toxic substances is essential due to the functional nature of the product. XRF analysis was conducted to verify the absence of such materials in the synthesized composite of hydroxyapatite and cellulose. It was imperative that elements such as Pb, Cd, Hg, and As, known for their high toxicity to humans and the environment, were notably absent. Additionally, although present in limited amounts, elements like Cu, Sr, and Ni should exhibit lower toxicity than those above. Their levels must comply with established guidelines to prevent their adverse effects, considering their unacceptable toxicity and environmental impact, particularly in pharmaceutical applications. Table 1 outlines the permissible limits and concentrations for each element. According to XRF analysis. All elements were either undiscovered or identified below predetermined limits. These results verify that the materials underwent several synthesis operations to successfully develop a toxic-free composite of cellulose and hydroxyapatite that is safe for the environment and human health.

Table 1 The hydroxyapatite-based materials’ component levels and restrictions of harmful elemental composition.

31P NMR spectroscopy

Figure 5a presents the solid-state 31P nuclear magnetic resonance (NMR) spectra of Hydroxyapatite/cellulose. The characteristic peak indicates the presence of hydroxyapatite in cellulose polymer at 2.3–2.5 (ppm). However, the intensity of this peak varies due to the existence of cellulose amorphous polymer.

Fig. 5
figure 5

(a) Plot of RMN, HAp/Ce, and (b) C 1s core level of HAp/Ce treated-mild steel in 1 M HCl.

X-ray photoelectron spectroscopy (XPS)

Even though the weight loss and electrochemical tests offer strong evidence, X-ray photoelectron spectroscopy (XPS) analysis was required to confirm the production of the organic inhibitive nanocomposite and the adsorption of inhibitory molecules onto the mild steel surface. The experiments were carried out after immersing the steel surface for 6 h in a solution containing 1 M HCl and 1 g/L of Ce. Four different contributions exist to the high-resolution XPS spectra for the C 1 s core energy level spectrum of the mild steel surface when HAp/Ce is present in a 1 M HCl solution.

Moreover, XPS analysis was used to investigate the HAp and cellulose nanocomposite in greater detail. The high-resolution C1s spectra are shown in Fig. 5b (cellulose and P1 = HAp/Cellulose). Three species were identified from the C1s bands: 286.8 eV (C–O in ether and hydroxyl groups), 288.4 eV (C = O), and 284.8 eV (C–H and C–C in aliphatic and aromatic structures).

Mechanism behind the dissolution–precipitation method for creating hydroxyapatite–cellulose composite

The dissolution–precipitation method is widely used to synthesize hydroxyapatite (HAp) on a cellulose substrate, leveraging the interaction between the precursor materials in a controlled environment to create a composite with desirable properties. Here’s how the process works and its impact on the final material properties:

Dissolution phase

Dissolution of precursors

Cellulose substrate The cellulose, typically in the form of a hydrogel or fibers, is immersed in an aqueous solution containing calcium (Ca2⁺) and phosphate (PO₄3⁻) ions, the primary precursors for hydroxyapatite.

Complexation These ions can be present in the form of soluble salts like calcium nitrate (Ca(NO₃)₂) and ammonium phosphate ((NH₄)₃PO₄). When dissolved in water, they dissociate into Ca2⁺ and PO₄3⁻ ions.

Interaction with cellulose

Surface functionalization The cellulose structure typically contains hydroxyl groups (-OH) that can interact with calcium ions through hydrogen bonding or electrostatic attraction. This interaction facilitates the uniform distribution of calcium ions on the cellulose surface, setting the stage for hydroxyapatite nucleation.

Precipitation phase

Formation of hydroxyapatite nuclei

Supersaturation As the solution reaches supersaturation due to controlled changes in pH, temperature, or ion concentration, calcium and phosphate ions begin to precipitate, forming hydroxyapatite (Ca₁₀(PO₄)₆(OH)₂) nuclei.

Nucleation on cellulose The nucleation of hydroxyapatite occurs preferentially on the cellulose surface, where calcium ions are already concentrated. The hydroxyl groups on cellulose act as nucleation sites, allowing the hydroxyapatite crystals to form and grow.

Crystal growth and integration

Crystal growth As the reaction continues, the hydroxyapatite crystals grow, integrating with the cellulose fibers. This growth process can be controlled by adjusting factors such as ion concentration, temperature, and time, which influences the size and morphology of the hydroxyapatite crystals.

Composite formation The result is a composite material where hydroxyapatite crystals are well-dispersed within or coated on the cellulose matrix. This intimate interaction between the two components ensures strong bonding and uniform distribution of hydroxyapatite throughout the cellulose structure.

Influence on final material properties

Mechanical strength and flexibility

Enhanced strength The integration of hydroxyapatite into the cellulose matrix increases the composite’s mechanical strength, making it suitable for load-bearing applications like bone implants.

Maintained flexibility Despite the increased strength, the cellulose matrix retains some of its inherent flexibility, resulting in a composite that is both strong and somewhat flexible a desirable combination for biomedical applications.

Biocompatibility and osteoconductivity

Biocompatibility Both hydroxyapatite and cellulose are biocompatible materials. The composite inherits this property, making it suitable for direct contact with biological tissues.

Osteoconductivity Hydroxyapatite is known for its ability to support bone cell attachment and growth. When integrated into the cellulose matrix, this property is retained, making the composite ideal for bone regeneration and repair applications.

Controlled porosity and surface area

Porosity The dissolution–precipitation method allows for control over the composite’s porosity by adjusting the concentration of the precursor ions and the conditions of the precipitation process. Higher porosity can benefit applications requiring high surface area, such as drug delivery systems or scaffolds for tissue engineering.

Surface area The method can also influence the surface area of the hydroxyapatite crystals, which is crucial for applications where surface interactions are essential, such as in catalysis or adsorption processes.

Structural integrity and stability

Uniform distribution The controlled nucleation and growth of hydroxyapatite on cellulose ensure that the crystals are evenly distributed, contributing to the composite’s structural integrity.

Chemical stability The strong interaction between cellulose and hydroxyapatite enhances the chemical stability of the composite, making it resistant to degradation in biological environments.

The dissolution–precipitation method used to create hydroxyapatite-cellulose composites involves a precise balance of dissolution of precursor ions, their interaction with the cellulose substrate, and controlled precipitation to form hydroxyapatite crystals. This method significantly influences the final material properties, including mechanical strength, flexibility, biocompatibility, porosity, surface area, and chemical stability. These properties make the composite highly suitable for advanced environmental applications (Fig. 6).

Fig. 6
figure 6

Proposed mechanism for the preparation of CMC/HAp composites.

ADME/toxicity analysis of methylene blue

A significant amount of methylene blue is frequently released by industries into natural water bodies, endangering microbial ecosystems as well as human health. Methylene blue is extremely poisonous and becomes dangerous for human health above a specific dosage. The absorption, distribution, metabolism, excretion, and toxicity of methylene blue can be predicted and evaluated using computational tools, as shown in Table 2. Using this concept as a foundation, methylene blue was examined. All compounds had their surface components (SASA, FOSA, FISA, and PISA) projected, and their values fell within Schrödinger’s Qikprop manual’s allowed range. Additionally, the projected brain/blood partition coefficient, or QPlogBB value, was calculated and found to be within the favorable range of − 3.0 to + 1.2. This parameter is essential for determining how well the substance crosses the blood–brain barrier. Furthermore, the QPPCaco values—a measure of the anticipated apparent permeability of Caco-2 cells—beyond 500 nm/s, demonstrating exceptional permeability in the cells. Caco-2 cells are frequently employed as an in vitro model to forecast intestinal absorption. Moreover, methylene blue showed a high level of qualitative human oral absorption (HOA). The procedure of toxicity analysis is complex and involves a number of descriptors. QPloghERG, one of QikProp’s main predictors, is based on the IC50 (half-maximal inhibitory concentration), which quantifies how well a drug inhibits a certain biological or biochemical activity, in this case, blockage of hERGK + channels. Methylene blue showed an unfavorable value (− 5.184 >  −5) for QPloghERG in this investigation, indicating a possibility of negative effects 31.

Table 2 ADMET profile of methylene blue.

The toxicity prediction of Methylene Blue was evaluated using PreADME. According to the results presented in Table 3, Methylene Blue showed no evidence of carcinogenic activity in mice and rats (The negative outcome of the test in mice and rats suggests that the compound is anticipated to be non-carcinogenic in these species). Predictions of acute toxicity for Daphnia also indicated low levels of toxicity. Based on the data collected and Directive 92/32/EEC of the European Chemicals Law, the compound is considered to induce adverse effects primarily in aquatic environments (with a solubility < 1 mg/L). Common small fish models employed in toxicology studies, such as minnow (Pimephales promelas) and medaka (Oryzias latipes), also exhibited considerable toxicity levels, given the maximum acceptable toxic concentration of up to 0.01 mg/L. Through preADME analysis, it was assessed whether Methylene Blue has the potential to inhibit hERG, a potassium channel crucial for cardiac repolarization. The compound poses a moderate risk for hERG inhibition, which could lead to prolongation of the QT interval, an important electrocardiographic parameter associated with cardiac contraction. Such a condition could result in a potentially life-threatening ventricular tachyarrhythmia known as Torsade de Pointes. Therefore, caution is advised when using Methylene Blue in individuals with cardiac conditions. Additionally, the Ames test, which evaluates the mutagenic potential of a compound against Salmonella typhimurium strains, was conducted using preADMET. The substance showed mutagenic potential; it tested negative for TA100_NA and TA1535_10RLI. In addition, strains TA100_10RLI and TA1535_NA showed no signs of mutagenic activity. It is important to remember that substances found to be mutagens in the Ames test are not always carcinogenic. These tests function as thorough procedures to assess a chemical compound’s toxicity.

Table 3 PreADME analysis toxicity predictions of methylene blue.

Adsorption of MB

The synthesized composite was tested for its ability to remove heavy metals, and the best conditions for the adsorption of heavy dyes were found using a batch adsorption approach. For the adsorption experiments, MB was chosen as the model ion.

Effects of various parameters

Effect of pH

The pH of the solution plays a crucial role in the adsorption of MB as it allows for alterations in the structures of both the adsorbent and adsorbate. To explore the impact of pH variation on MB adsorption, the process was investigated across a pH range of 6 to 12, with an initial concentration of 45 mg/L. As depicted in Fig. 7a, the adsorption capacity of MB is limited at low pH levels across the spectrum of HAp, Ce, and HAp/Ce. Conversely, MB adsorption on HAp, Ce, and HAp/Ce becomes more favorable in primary conditions, and the adsorption capability of MB increases with rising pH. This phenomenon may be attributed to HAp’s neutralization by adding H+ protons. Additionally, it was observed that HAp, Ce, and HAp/Ce remain stable in basic environments.

Fig. 7
figure 7

(a) Effect of temperature on methylene blue adsorption onto HAp, Ce, HAp/Ce (C0: 45 mg/L, adsorbent dose: 10 mg, time: 30 min, T = 25°C), and (b) effect of temperature on methylene blue adsorption onto HAp, Ce and HAp/Ce (C0: 45 mg/L, adsorbent dose: 10 mg, time: 30 min, pH: 7).

Influence of the temperature

Temperature is a significant factor in adsorption, particularly in understanding its influence on methylene blue’s adsorption onto hydroxyapatite surfaces. The impact of temperature on the adsorption of MB from aqueous solutions was investigated within the range of 25 to 60 °C. As the temperature increased in the adsorption system, the amount of MB adsorbed decreased (Fig. 7b). This discovery suggests that higher temperatures impede the adsorption process.

Adsorption analysis

Isotherm

The Langmuir (Eq. 2) and Freundlich isotherm (Eq. 4) models were employed to ascertain the adsorption equilibrium between MB and water’s HAp, Ce, and HAp/Ce composite. These models were also utilized to evaluate the dispersion of MB dyes on HAp, Ce, and HAp/Ce surfaces at equilibrium. One of the determining factors influencing the type of isotherm followed in the adsorption process is the correlation coefficient (R2).

The values of all adjustable parameters obtained from Fig. 8 are listed in Table 4. As indicated in Table 4, the data obtained reveals that the correlation coefficients obtained using the Langmuir isothermal model are lower, suggesting that the adsorption of lead cations conforms to the Langmuir equation, where MB cations are uniformly dispersed over the porous surfaces of the foam. For various dosages of foam adsorbent, the separation factor RL ranges from 0 to less than 1 (Table 4), indicating the strong affinity of HAp, Ce, and HAp/Ce for the relevant MB.

Fig. 8
figure 8

Langmuir and Freundlich adsorption plots of MB dyes by HAp, Ce and HAp/Ce at different temperatures.

Table 4 The isotherm parameters for the adsorption of MB by HAp, Ce and HAp/Ce.

Adsorption kinetics of MB ions on HAp, Ce and HAp/Ce

HAp, Ce, and HAp/Ce composite were subjected to analysis using various kinetic models to elucidate the adsorption mechanism. Among these, the pseudo-first and pseudo-second order models, which are widely employed in simulating metal adsorption by foam adsorbents, were utilized. The kinetic models utilized are presented in Eqs. (6) and (7).

The parameter values of the equations are depicted in Table 5 and Fig. 9. The value of K1 is determined from the plots of Ln(qe-qt) versus t (Fig. 9a), while the values of K2 and the adsorption capacity qe are obtained from the slope and intercept of the plot of t/Qt versus t (Fig. 9b). Additionally, Kid and Z were calculated by plotting Qt versus t1/2 (Fig. 9c).

Table 5 Parameters obtained by the kinetic models for the composite HAp, Ce and HAp/Ce.
Fig. 9
figure 9

Kinetic plots of MB adsorption by composite (a) pseudo first-order, (b) pseudo-second order, and (c) Intraparticle diffusion model.

Results from the experimental section reveal that the R2 value for the pseudo-second order (0.9685, 0.9927, and 0.995) is higher than that obtained by the pseudo-first order (0.9797, 0.9616, and 0.9823) for HAp, Ce, and HAp/Ce, respectively.

The computed qe values (3.6724, 4.4033, and 3.9339 mg/g) closely match the observed qe values (91.0018, 85.4815, and 92.001 mg/g) for HAp, Ce, and HAp/Ce, as shown in Table 5. Various rate-limiting processes may be operative during the adsorption process, as indicated by the straight-line nature of all graphs in Fig. 9, without crossing their respective origins.

From the linearity observed in the initial graphs in Fig. 9b, it can be inferred that MB adsorption on HAp, Ce, and HAp/Ce composites begins with instantaneous adsorption on the external surface, leading to chemical complexation between MB and surface functional groups. Subsequent steps also show linearity, indicating gradual MB adsorption and restricted intraparticle diffusion rates.

Table 5 shows an increase in the inner mass transfer potential and a decrease in the top layer and outside mass transfer potential. The energy of activation of the adsorption at 298, 313, and 323 K was calculated using Eq. 8.

These findings contribute to the understanding of how temperature affects the MB dye’s capacity to adsorb HAp, Ce, and HAp/Ce. A spontaneous adsorption mechanism was suggested by the predicted activation energy, which was almost nonexistent.

Thermodynamics study

The standard free energy, standard enthalpy, and standard entropy values were determined to understand spontaneity and the type of adsorption.

Using Eq. 11, the value of ΔG0 (J mol−1) was determined. The mapping of the ln Ks vs. 1/T is displayed in Fig. 10a. The many thermodynamic parameters that were determined using the slopes and crossings are listed in Table 5.

Fig. 10
figure 10

(a) Adsorption thermodynamics of MB onto HAp, Ce and HAp/Ce, (b) plot of Liquid film diffusion model for the adsorption of MB by HAp, Ce and HAp/Ce.

The positive results for ΔS0 and ΔH0 indicate that the adsorption process increases entropy at the solid/solution interface. Moreover, HAp, Ce, and HAp/Ce exhibited negative free energies, indicating a spontaneous uptake process over a wide range of temperatures30.

Adsorption is commonly employed for the removal of MB from solution phases. Initially, MB dyes migrate from the bulk solution to the outer surfaces of HAp, Ce, and HAp/Ce. Subsequently, they diffuse across the boundary layer to reach the coordination sites located on the surface of the composite material. Finally, intraparticle diffusion within HAp, Ce, and HAp/Ce particles facilitates further adsorption. Additional investigation was conducted using the liquid film model and the intraparticle diffusion model to gain a deeper understanding of the adsorption mechanism.

The adsorption process involves diffusion through a liquid film around HAp, Ce, and HAp/Ce, if the equation demonstrates that the plot of ln(1 − F) versus t results in a straight line passing through the origin. As seen in Fig. 10b, Qe stands for the equilibrium adsorption capacity (mg/g).

The graph shown in Fig. 10b exhibited significantly low R2 values of 0.8913, 0.905, and 0.8504 for MB, respectively, and did not show straight lines crossing the origin. This implies that the diffusion of MB through the liquid layer enclosing HAp, Ce, and HAp/Ce was not the step that determined the diffusion rate. These results suggest that, although not being the slowest step in determining the rate, the liquid film diffusion pattern can nevertheless affect the MB adsorption by the foam, especially in the early phases of adsorption, as shown in Table 5.

The adsorption of MB from aqueous solutions onto matrices based on HAp, Ce, and HAp/Ce has been the subject of numerous investigations. These investigations have shown that within the solid matrix, these MB interchange with MB molecules. Moreover, the removal process employs a different mechanism called dissolution–precipitation at high ion concentrations as opposed to straightforward diffusion. HAp, Ce, and HAp/Ce are materials used in our investigation to decontaminate MB-containing contaminated fluids. Akartasse, et al. 18 have reported that prior studies have indicated that the sorption of MB onto HAp, Ce, and HAp/Ce is a temporary occurrence. The mechanism of ion adsorption onto HAp, Ce, and HAp/Ce matrices likely involves a combination of three mechanisms, including ion exchange between MB dyes in the contaminated solution and MB in the solid. This ion exchange occurs through apatite dissolution followed by precipitation, as described by the following equation:

$${\text{Ca}}_{{{1}0}} \left( {{\text{PO}}_{{4}} } \right)_{{6}} \left( {{\text{OH}}} \right)_{{2}} + {\text{x M}}^{{{2} + }} \textregistered {\text{Ca}}_{{{1}0 - {\text{x}}}} {\text{M}}_{{\text{x}}} \left( {{\text{PO}}_{{4}} } \right)_{{6}} \left( {{\text{OH}}} \right)_{{2}} + {\text{x Ca}}^{{{2} + }}$$

This enables these MB to be exchanged with MB and adsorbed on the surface or linked in cationic gaps that already exist in apatite.

There are two steps in the elimination of MB: The following equations show that a metal phosphate precipitates after HAp dissolution:

$$\begin{aligned} & {\text{Ca}}_{{{1}0}} \left( {{\text{PO}}_{{4}} } \right)_{{6}} \left( {{\text{OH}}} \right)_{{2}} + {\text{12 H}}^{ + } \textregistered {1}0{\text{ Ca}}^{{{2} + }} + {\text{6H}}_{{2}} {\text{PO}}^{{{4} - }} + {\text{2OH}}^{ - } \,\left( {{\text{dissolution}}} \right) \\ & {1}0{\text{ M}}^{{{2} + }} + {\text{6H}}_{{2}} {\text{PO}}^{{{4} - }} + {\text{2OH}}^{ - } \textregistered {\text{M}}_{{{1}0}} \left( {{\text{PO4}}} \right)_{{6}} \left( {{\text{OH}}} \right)_{{2}} + {\text{12 H}}^{ + } \,\left( {{\text{precipitation}}} \right) \\ \end{aligned}$$

The Langmuir isotherm curve exhibits a hyperbolic shape, ultimately reaching a constant limit value asymptotically. This curve corresponds to a type I isotherm, as classified by Langmuir. Consequently, we can infer that the matrices adsorb a single layer of adsorbate, as beyond this layer, solute–solvent interactions surpass solute-surface interactions. MB typically functions as a cationic dye, while HAp/Ce exhibits an amphoteric nature. The amphoteric structure of HAp/Ce offers numerous active sites for MB dye molecules to interact with, facilitating MB dye adsorption. Various factors contribute to the effective adsorption of MB on HAp/Ce, as illustrated in Fig. 11, depicting a hypothetical dye adsorption mechanism.

Fig. 11
figure 11

Schematic mechanism of the adsorption of BM dye onto HAp/Ce.

The rapid adsorption rate of MB onto HAp may be attributed to the absence of internal diffusion resistance and a high number of unoccupied adsorption sites, enabling the swift adsorption of MB from an aqueous solution. Furthermore, strong hydrogen bonding interactions between the P-OH group of HAp/Ce and the nitrogen atom of MB molecules may aid in MB dye molecule adsorption. Additionally, nitrogen atoms of MB dye molecules could bind with Ca2+ groups in HAp through Lewis acid–base interactions.

In acidic conditions, they positively charged (CaOH2+) and neutral ≡P–OH sites become more positively charged, resulting in a positively charged surface over HAp/Ce and decreased adsorption. Conversely, at higher pH levels, neutral–CaOH moieties and negatively charged PO– species become predominant, causing the surface of HAp to become negatively charged. Adsorption occurs through electrostatic attraction between the negatively charged surface of HAp/Ce and the positively charged group of the dye.

Atomistic models of the adsorbent and adsorbate

We constructed the SiC64N4H98O5 molecular model for the adsorbent. Considering a representative finite-size molecular structure instead of an infinite periodic system allows the use of localized bases, which provide more accurate results and are less demanding on computer resources. The optimized geometry of this molecule and its frontier molecular orbitals are presented in Fig. 12a. The structure of the adsorbate (Rhodamine 2) is well known. We present this C28N2H31O3+ molecule and its frontier molecular orbitals in Fig. 12b. For all optimized structures, we check the absence of imaginary frequencies to confirm true minima.

Fig. 12
figure 12

(a) Geometry and frontier orbitals of the adsorbent model. Purple, brown, blue, white and red balls represent silicon, carbon, nitrogen, hydrogen and oxygen atoms, respectively, (b) Geometry and frontier orbitals of the adsorbate (Rhodamine B) molecule. Brown, blue, white and red balls represent carbon, nitrogen, hydrogen and oxygen atoms, respectively, and (c) Geometry and frontier orbitals of the “adsorbent + adsorbate” complex. Purple, brown, blue, white and red balls represent silicon, carbon, nitrogen, hydrogen and oxygen atoms, respectively.

Interaction between adsorbent and adsorbate

To get a complex, we optimized four trial initial guess geometries of two molecules (adsorbent and adsorbate). We did not apply Monte-Carlo or molecular dynamics approaches, based on force fields and inadequate for accurately describing the non-covalent interactions crucial for the system. Considering four reasonable initial geometries is sufficient to get realistic intermolecular interaction. The interaction energies Ei between adsorbent and adsorbate were calculated as Ei = E(complex) – E(adsorbent) – E(adsorbate). We chose the most stable complex with the highest Ei value (Fig. 11c). We obtained the value Ei = 1.02 eV for the most stable complex.

It should be noted that this value is approximately five times greater than the enthalpy value indicated in Table 6. Nevertheless, a direct quantitative comparison between DFT and experimentally measured enthalpy is not applicable. DFT offers insight into the interaction mechanism between the adsorbent and the adsorbate. It is impossible to directly compare the energy of this interaction and the enthalpy, which is merely a fitting parameter in the chosen adsorption model. Its frontier orbitals energies, dipole moment, and the same values for adsorbent and adsorbate are collected in Table 6. As shown in Fig. 12c, the HOMO of the complex is located on the adsorbent, whereas the LUMO of the complex is situated on the adsorbate. Chemical hardness is the resistance against the polarization of the electron cloud of atomic and molecular chemical systems 32,33.

Table 6 Calculated frontier orbitals and dipole moments of adsorbent, adsorbate and their complex.

This concept imparted to the literature via the Hard and Soft Acid–Base Principle by Pearson 25 has made it easier to understand many issues related to the nature of chemical interactions. According to the Maximum Hardness Principle (MHP) 34,35, “there seems to be a rule of nature that molecules arrange themselves to be as hard as possible.” From this point of view, it is not difficult to predict that this parameter is a good and valuable measure of stability. In the light of the calculated chemical hardness values for adsorbent, adsorbate and complex system obtained, it can be said that adsorbent system has higher hardness value than adsorbate. If so, it can be said that an adsorbent system is more stable than other systems.

Conclusion

A composite of HAp, Ce, and HAp/Ce was synthesized using a novel dissolution–precipitation method for potential commercial use in wastewater purification. The produced composites were characterized using SEM, XRD, and FT-IR techniques. XRD analysis revealed a well-crystalline structure for our HAp, which was calcined at 900 °C for 2 h, while SEM analysis demonstrated a homogeneous and spherical structure. Ligand preparation and Prediction of ADME/Toxicity Properties, with SEM micrographs revealing the product’s Nanometric size, XRD analysis shows that a significant hydrogen bonding interaction between HAp and cellulose may have occurred as the cellulose peak intensity steadily decreased with HAp level, NMR shows that the characteristic peak indicates the presence of hydroxyapatite in cellulose polymer at 2.3–2.5 (ppm).

The release of methylene blue (MB) into natural water sources by enterprises threatens human health and the environment. Potential side effects have been brought to light by computational analysis, and modest hazards have been highlighted by toxicity evaluations, especially in people with cardiac problems. Methylene blue should, therefore, be used with caution due to its possible adverse effects on health and the environment. To adequately address these issues, more investigation and governmental action might be required.

The synthesized HAp, Ce, and HAp/Ce composite were employed for the removal of hazardous MB dyes from wastewater. Optimal adsorption conditions were determined, and multiple MB dyes were quantitatively removed from the sewage sample. Kinetic studies revealed that MB adsorption followed pseudo-second-order kinetics, and thermodynamic analysis indicated negative Gibbs free energy values, suggesting spontaneous coordination of MB to the surface of the HAp-based composite.

The synthesized HAp, Ce, and HAp/Ce composite removed hazardous MB dyes from wastewater. Optimal adsorption conditions were determined, and multiple MB dyes were quantitatively removed from the sewage sample. Kinetic studies revealed that MB adsorption followed pseudo-second-order kinetics, and thermodynamic analysis indicated negative Gibbs free energy values, suggesting spontaneous MB coordination to the HAp-based composite’s surface.

The Freundlich isothermal model better fits the experimental data for MB adsorption onto apatites, particularly at neutral pH, where MB adsorption on apatites occurs preferentially. The results suggest that a pseudo-second-order kinetic mechanism best describes MB adsorption on apatites.

Based on the determined chemical hardness values for the adsorbent, adsorbate, and the complex system, the adsorbent system exhibits a more excellent hardness value than the adsorbate.

To get a complex, we optimized four trial initial guess geometries of two molecules (adsorbent and adsorbate). We obtained the value Ei = 1.02 eV for the most stable complex. HOMO of the complex is located on adsorbent, whereas the LUMO of the complex is situated on adsorbate. Chemical hardness is the resistance against the polarization of electron clouds of atomic and molecular chemical systems.

The unique properties of cellulose and hydroxyapatite pave the way for innovative and sustainable applications in the future. Cellulose’s biodegradability and strength make it ideal for applications in sustainable packaging, biodegradable electronics, and advanced textiles. Hydroxyapatite’s biocompatibility and similarity to bone make it a prime candidate for medical applications, such as intelligent bone implants, regenerative tissue scaffolds, and advanced dental materials. These materials could significantly impact the future of medicine, technology, and environmental sustainability, driving functional and eco-friendly innovations. Hydroxyapatite nanoparticles could be engineered to carry drugs and deliver them precisely to bone tissue. This could be particularly useful in treating bone-related diseases like osteoporosis, where the drug can be released directly at the site of bone loss, maximizing efficacy and minimizing side effects. Something else is promoting advanced manufacturing techniques and the development of new materials that can be used in various industrial applications, including biomedical devices, sustainable packaging, and eco-friendly products. This innovation can lead to more sustainable and resilient industrial processes, fostering economic growth while minimizing environmental impact.