Case 2: Small Molecule Mixture (Water + Ethanol)
Case 2: Small Molecule Mixture (Water + Ethanol)
Section titled “Case 2: Small Molecule Mixture (Water + Ethanol)”In this case, we construct a system mixed with two types of small molecules (water and ethanol) at a specific numerical ratio.
Target System
Section titled “Target System”- Composition:
- Water: 300 molecules
- Ethanol: 150 molecules
- Total Atoms: 2,250
- Initial Target Density: 0.80 g/cm³
Calculation Code (run.py)
Section titled “Calculation Code (run.py)”import fbtk
# 1. Create each molecule object from SMILESwater = fbtk.Molecule.from_smiles("O", name="water")ethanol = fbtk.Molecule.from_smiles("CCO", name="ethanol")
# 2. Initialize the Builderbuilder = fbtk.Builder(density=0.80)
# 3. Add specified counts of each moleculebuilder.add_molecule(water, count=300)builder.add_molecule(ethanol, count=150)
# 4. Build the system and perform relaxationsystem = builder.build()print("Starting relaxation for Water + EtOH...")system.relax()
# 5. Output resultswater.to_file("water.mol")ethanol.to_file("ethanol.mol")system.to_file("water_etoh_cell.mol2")print("Done.")
Reviewing the Execution Log
Section titled “Reviewing the Execution Log”Atoms: 2250 | Bonds: 1800-------------------------------------------------------------------------------- | Fmax | FRMS | Total E |Iter | (kcal/mol/Å) | (kcal/mol/Å) | (kcal/mol) | Status-------------------------------------------------------------------------------- 0 | 36477.1705 | 3459.2950 | 204596098964.3458 | 10 | 1620.0353 | 134.2404 | 51220.1694 | 20 | 813.1749 | 50.6762 | 24796.0682 | ... 280 | 2.9743 | 0.2826 | 2533.5805 | 290 | 1.5966 | 0.2099 | 2532.7015 | FRMS-Conv--------------------------------------------------------------------------------=== Optimization Finished ===Reason: FRMS-ConvTotal Time: 5.678s (Avg: 19.512ms / step)Final Energy: 2532.7015 kcal/molFinal Fmax: 1.5966 kcal/mol/ÅFinal FRMS: 0.2088 kcal/mol/ÅMin Distance: 0.9979 Å (Atoms 1353 and 1359)--------------------------------------------------------------------------------Result Explanation
Section titled “Result Explanation”Initial Mixed State Structure
Section titled “Initial Mixed State Structure”The Min Distance after relaxation is 0.9979 Å. It can be confirmed that a stable initial arrangement that does not “explode” before the formation of a hydrogen-bonded network has been obtained.